:root {
  --title-font: 'Courier New', Courier, monospace;
  --content-font: Arial, Helvetica, sans-serif;
  --base-font-size: 1rem;
  --card-color: color(display-p3 0.941 0.937 0.847);
  --paragraph-color: black;
  --white-color: white;
  --black-color: black;
  --grey-color: grey;
}

@supports not (color: color(display-p3 1 1 1)) {
  :root {
    --card-color: white;
  }
}

@property --main-color {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(226, 217, 199);
}

@property --alternative-color {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(201, 204, 180);
}

@property --text-color {
  syntax: "<color>";
  inherits: true;
  initial-value: rgb(120, 184, 81);
}

:root.dark-theme {
  --card-color: rgb(6, 70, 14); 
  --main-color: rgb(31, 34, 31); 
  --alternative-color: rgb(58, 70, 52); 
  --paragraph-color: lightgrey;
  --white-color: grey;
  --black-color: white;
  --grey-color: lightgrey;
}

.dark-theme strong{
  color: var(--text-color);
}

@font-face {
  /* resource: https://www.fontspace.com */
  font-family: "HandwrittenMarker";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Cookiemonster-gv11.ttf") format("truetype");
}

@font-face {
    /* resource: https://www.fontsaddict.com */
  font-family: "ReceiptTitleFont";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/receiptional-receipt-regular.ttf") format("truetype");
}

@font-face {
  /* resource: https://www.fontsaddict.com */
  font-family: "ReceiptContentFont";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/merchant-copy.ttf") format("truetype");
}

html,
body {
  background-color: var(--main-color);
  margin: 0;
  padding: 0;
}

header {
  background-color: var(--alternative-color);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 2rem;
  box-sizing: border-box;
}

main {
  margin: 2rem;
}

footer {
  background-color: var(--alternative-color);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start; 
  flex-wrap: wrap; 
}
nav {
  border: none;
  gap: 1rem;
  display: flex;
  justify-content: left;
  align-items: center;
  background-color: var(--alternative-color);
  flex-wrap: wrap;
}
nav a, .mobile-menu a, .mobile-menu span {
  text-decoration: none;
  color: var(--paragraph-color);
  font-size: var(--base-font-size);
  margin: 0 1rem;
}

nav a:hover, .mobile-menu a:hover, .mobile-menu span:hover {
  color: var(--text-color);
}

/* @media (max-width: 900px) {

} */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.hamburger span {
  font-size: 3rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* gap: 1rem; */
  background-color: var(--alternative-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
}

.mobile-menu a, .mobile-menu span {
  font-size: 2rem;
}

@media (max-width: 600px) {
  nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}
.mobile-menu span {
  color: var(--text-color);
  gap: 0;
  margin: 0;
}
.mobile-menu .close-button {
  color: var(--paragraph-color);
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font);
  color: var(--text-color);
}

p, li, span, div, article, section, a {
  font-family: var(--content-font);
  color: var(--paragraph-color);
  font-size: var(--base-font-size);
  line-height: 1.5;
}

article {
  background-color: var(--card-color);
  padding: 1rem; 
  border-radius: 10px; 
  margin-bottom: 1rem;
}

article:has(header):hover, article:has(ul):hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background-color: color-mix(in srgb, var(--card-color), white 10%);
}

#darkmode_button {
  margin: auto;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--white-color);
  color: var(--black-color);
  border: 2px solid;
  border-color: var(--black-color);
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#diy_button {
  margin: auto;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--white-color);
  color: var(--text-color);
  border: 2px solid;
  border-color: var(--text-color);
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#theme_modal {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  height: 50%;
  background-color: var(--alternative-color);
  justify-content: center;
  align-items: center;
  gap: 1rem;
  border: 2px solid var(--text-color);
  border-radius: 10px;
}

#theme_modal button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--text-color);
  color: var(--white-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#connection_method {
  display: flex;
  justify-content: left;
  gap: 1rem;
  font-size: var(--base-font-size);
}
#connection_method a {
  text-decoration: none;
  color: var(--text-color);
}

#connection_method a:hover {
  text-decoration: underline;
}

hr.dashed_border {
  border-top: 2px dashed var(--paragraph-color);
}

header.experience-header {
  background-color: transparent;
  display: flex;
  padding: 0;
  gap: 1rem;
  justify-content: left;
  align-items: center;
}
header.experience-header h2, header.experience-header h3 {
  margin: 0;
}

.logo img{
  width: 40px;
  height: 40px;
}

.demo img, .demo source, .demo picture {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}


form {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--alternative-color);
  border: 1px solid #ccc;
  border-radius: 10px;
  font-family: var(--content-font);
  color: var(--paragraph-color);
}

#skills {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

#skills p{
  aspect-ratio: 1 / 1;
  width: 200px;
  color: black;
  background-image: url(../images/ice.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  display: flex;
  margin: 0rem 0;
  padding: 2rem 2rem;
  flex-direction: column;  
  justify-content: center;
  align-items: center;
  text-align: center;
}


#skills p:hover{
  background-image: url(../images/ice_blurred.png);
  color: rgb(9, 44, 110);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

form fieldset {
  border: 1px solid var(--main-color);
  border-radius: 8px;
  margin: 1rem;
  font-weight: bold;
  font-family: var(--title-font);
}

form legend {
  font-weight: bold;
  font-family: var(--title-font);
}

form label {
  display: flex;
  flex-direction: row;
  margin: 1rem;
  font-family: var(--title-font);
}
form input,
form textarea {
  background-color: var(--white-color);
  border: 1px solid var(--main-color);
  border-radius: 6px;
  width: 80%;
}

form input:focus,
form textarea:focus {
  box-shadow: 0 0 5px blue;
}

form textarea {
  resize: vertical;
  min-height: 100px;
}

form button[type="submit"] {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  background-color: rgb(108, 167, 71);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

form button[type="submit"]:hover {
  background-color: rgb(95, 140, 63);
  transform: translateY(-2px);
}

@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
    animation-duration: 1s;
}


@keyframes move-out {
    from {opacity: 1;}
    to {opacity: 0;}
}

@keyframes move-in {
    from {opacity: 0;}
    to {opacity: 1;}
}

::view-transition-old(root) {
    animation: 1s move-out;

}

::view-transition-new(root) {
    animation: 1s move-in;
}

button.load {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--text-color);
  color: var(--white-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}