@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  /* Tells browser this file covers all weights */
  font-display: swap;
  /* Good for performance */
  font-style: normal;
}

:root {
  /* bg-colors */
  --bg-dark: oklch(17% 0.005 271.152);
  --bg: oklch(from var(--bg-dark) 22% c h);
  --bg-light: oklch(from var(--bg-dark) 28% c h);

  /* text-colors */
  --text: oklch(98% 0 0);
  --text-muted: oklch(from var(--text) l c h / 0.6);

  /* shadows */
  --shadow-s: inset 0 1px 2px #ffffff30, 0 1px 2px black, 0 2px 4px black;
  --shadow-m:
    inset 0 1px 2px #ffffff50, 0 2px 4px #00000030, 0 4px 8px #00000015;
  --shadow-l:
    inset 0 1px 2px #ffffff70, 0 4px 6px #00000030, 0 6px 10px #00000015;
  --shadow-test-s: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-test-l:
    0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);

  /* spacing */
  --space-8: clamp(0.35rem, 0.2692rem + 0.3077vw, 0.5rem);
  --space-16: clamp(0.7rem, 0.5385rem + 0.6154vw, 1rem);
  --space-24: clamp(1.05rem, 0.8077rem + 0.9231vw, 1.5rem);
  --space-32: clamp(1.4rem, 1.0769rem + 1.2308vw, 2rem);
  --space-40: clamp(1.75rem, 1.3462rem + 1.5385vw, 2.5rem);
  --space-48: clamp(2.1rem, 1.6154rem + 1.8462vw, 3rem);
  --space-56: clamp(2.45rem, 1.8846rem + 2.1538vw, 3.5rem);
  --space-64: clamp(2.8rem, 2.1538rem + 2.4615vw, 4rem);
  --space-72: clamp(3.15rem, 2.4231rem + 2.7692vw, 4.5rem);
  --space-80: clamp(3.5rem, 2.6923rem + 3.0769vw, 5rem);
  --space-88: clamp(3.85rem, 2.9615rem + 3.3846vw, 5.5rem);
  --space-96: clamp(4.2rem, 3.2308rem + 3.6923vw, 6rem);

  /* text */
  --line-height-body: 1.6;
  --line-height-heading: 1.2;

  --font-size-body: clamp(0.9rem, 0.8462rem + 0.2051vw, 1rem);
  --font-size-h6: clamp(1.125rem, 1.0577rem + 0.2564vw, 1.25rem);
  --font-size-h5: clamp(1.4063rem, 1.3221rem + 0.3205vw, 1.5625rem);
  --font-size-h4: clamp(1.7578rem, 1.6526rem + 0.4006vw, 1.9531rem);
  --font-size-h3: clamp(2.1973rem, 2.0658rem + 0.5008vw, 2.4414rem);
  --font-size-h2: clamp(2.7466rem, 2.5823rem + 0.626vw, 3.0518rem);
  --font-size-h1: clamp(3.4332rem, 3.2278rem + 0.7825vw, 3.8147rem);

  /* transition */
  /* --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); */
  --transition: all 0.3s cubic-bezier(0.36, -0.05, 0.07, 1);
  --transition-long: all 2s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* transform */
  --transform-scale-s: scale(1.05);
  --transform-scale-m: scale(1.15);

  /* border radius */
  --border-radius-out: 4px;
  --border-radius-in: 2px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  color: var(--text);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: var(--line-height-body);
  overflow-x: hidden;

  background: linear-gradient(
    45deg,
    oklch(8% 0.005 271.152) 16%,
    oklch(16% 0.005 271.152) 100%
  );
}

html {
  scrollbar-gutter: stable;
}

input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
  appearance: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 60ch;
  line-height: var(--line-height-heading);
}

p {
  font-size: var(--font-size-body);
  text-wrap: balance;
  font-weight: 300;
}

h6 {
  font-size: var(--font-size-h6);
}

h4 {
  font-size: var(--font-size-h4);
}

h3 {
  font-size: var(--font-size-h3);
}

h2 {
  font-size: var(--font-size-h2);
  text-wrap: balance;
}

a {
  color: var(--text-muted);
  font-weight: 300;
  transition: var(--transition);
}

a:hover {
  color: var(--text);
  transform: var(--transform-scale-s);
}

video {
  max-width: 100%;
  max-height: 720px;
}

img {
  max-width: 100%;
  max-height: 720px;
}

.page-wrapper {
  padding: var(--space-32) var(--space-24);
  display: grid;
  row-gap: var(--space-72);
  align-items: center;
  justify-items: center;
  max-width: 1920px;
  margin: 0 auto;
  min-height: 100dvh;
  grid-template-rows: auto 1fr auto;
}

.wrapper {
  width: 100%;
  /* max-width: 1200px; */
}

main {
  display: grid;
  width: 100%;
}

.header {
  width: 100%;
  /* max-width: 1200px; */
  margin: 0 auto;
}

.header h6 {
  text-wrap: balance;
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-64);
}

.logo {
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}

/* Desktop nav */
.desktop-nav {
  display: none;
}

.nav__list {
  display: flex;
  gap: var(--space-32);
}

.nav__link {
  padding: 0.5rem 0;
  position: relative;
  display: inline-block;
}

.nav__link-contact {
  position: relative;
  display: inline-block;
  padding: 0.75rem 1.875rem;
  background-color: var(--text);
  color: var(--bg-dark);
  cursor: pointer;
  font-weight: 600;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.36);
  border-radius: var(--border-radius-in);
  line-height: 1.2;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  border: 1px solid transparent;
}

a.nav__link-contact:hover {
  transform: none;
  background-color: transparent;
  color: var(--text);
  border-color: var(--text);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 102;
  position: relative;
}

.hamburger__line {
  width: 1.5rem;
  height: 2px;
  background-color: var(--text);
  margin: 2px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background-color: var(--bg-dark);
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__content {
  text-align: center;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mobile-menu__link {
  padding: 1rem 2rem;
  display: block;
  min-height: 44px;
  min-width: 44px;
}

.mobile-menu__link-contact {
  display: block;
  min-height: 44px;
  min-width: 44px;
  padding: 1rem 2.5rem;
  background-color: var(--text);
  color: var(--bg-dark);
  cursor: pointer;
  font-weight: 600;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.36);
  border-radius: var(--border-radius-in);
  line-height: 1.2;
  border: 1px solid transparent;
}

a.mobile-menu__link-contact:hover {
  transform: none;
  background-color: transparent;
  color: var(--text);
  border-color: var(--text);
}

/* Prevent body scroll when menu is open */
body.menu-open {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Hero */
.hero {
  padding-top: 40vh;
}

.hero__content {
  display: grid;
  gap: var(--space-24);
  justify-items: center;
  align-items: center;
  text-align: center;
}

.hero p {
  color: var(--text-muted);
  max-width: 85ch;
}

.hero strong {
  color: var(--text);
  font-weight: 600;
}

/* Separator */
.separator__line {
  border: none;
  height: 1px;
  background-color: var(--bg-light);
  margin: 0;
}

/* Projects */

.projects__grid {
  --min-col-size: 320px;

  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(
      min(max(var(--min-col-size), (100% - 2 * var(--space-24)) / 3), 100%),
      1fr
    )
  );
  /* grid-template-rows: auto auto auto; */
  row-gap: var(--space-72);
  column-gap: var(--space-24);
}

.project-card {
  /* background-color: var(--bg-dark); */
  /* padding: var(--space-24); */
  /* border-radius: var(--border-radius-out); */
  /* box-shadow: var(--shadow-s); */
  /* box-shadow: 6px 6px 12px oklch(10% 0.005 271.152),
    -6px -6px 12px oklch(20% 0.005 271.152); */
  overflow: hidden;
  /* cursor: pointer; */
  /* transition: var(--transition); */
  /* max-width: min(560px, 100%); */

  display: grid;
  row-gap: var(--space-16);
  align-self: start;
  /* gap: var(--space-24); */

  /* gap: var(--space-24); */
}

.project-card__media {
  overflow: hidden;
}

.project-card__image {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: var(--transition);
}

.project-card__image-container {
  overflow: hidden;
}

.project-card__image:hover {
  transform: scale(1.05);
}

.project-card__content {
  /* padding: var(--space-24) 0; */

  /* display: grid; */
  /* grid-template-rows: subgrid;
  grid-row: span 3; */
  display: grid;
  row-gap: calc(var(--space-8) * 0.48);
}

.project-card h6 {
  text-wrap: balance;
  line-height: 1.5;
  color: var(--text);
  font-size: var(--font-size-body);
}

.project-card p {
  color: var(--text-muted);
}

/* .project-card__button {
  border: none;
  padding: 12px 30px;
  align-items: center;
  justify-content: center;
  background-color: var(--text);
  color: var(--bg);
  cursor: pointer;
  font-weight: 400;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24), 0 1px 2px rgba(0, 0, 0, 0.36);
  border-radius: var(--border-radius-in);
  line-height: 1.2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.project-card__button:hover {
  color: var(--bg);
} */

.project-card a {
  color: var(--text);
  font-size: var(--font-size-body);
  justify-self: start;
}

.project-card a:hover {
  transform: none;
}

.projectdetails {
  display: grid;
  row-gap: var(--space-32);
}

.projectdetails img {
  aspect-ratio: 16/9;
}

.projectdetails__text h1 {
  text-wrap: pretty;
}

.projectdetails__text {
  display: grid;
  gap: var(--space-16);
  padding: var(--space-48) 0;
}

.projectdetails__text p {
  max-width: 75ch;
  text-wrap: pretty;
  /* margin-bottom: var(--space-24); */
}

.img-gallery {
  --min-col-size: 320px;

  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(
      min(max(var(--min-col-size), (100% - 2 * var(--space-24)) / 3), 100%),
      1fr
    )
  );
  gap: var(--space-24);
  /* max-width: 1280px; */
}

.img-gallery img {
  aspect-ratio: 4/5;
  object-position: center;
  object-fit: cover;
}

.aboutme-body {
  display: grid;
  gap: var(--space-64);
  justify-self: start;
}

.aboutme-body img {
  max-width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
}

.aboutme-wrapper {
  display: grid;
  max-width: 75ch;
  gap: var(--space-64);
}

.aboutme-elements {
  display: grid;
  gap: var(--space-16);
  text-wrap: pretty;
}

.aboutme-subtext {
  color: var(--text-muted);
  font-size: calc(var(--font-size-body) * 0.88);
}

/* Contact Page Design */

.contact-wrapper {
  display: grid;
  gap: var(--space-32);
  justify-self: start;
  width: fit-content;
}

.contact-text {
  display: grid;
  gap: var(--space-8);
}

.contact-form {
  display: grid;
  /* gap: var(--space-24); */
}

.contactform-name,
.contactform-email,
.contactform-message,
.contactform-button {
  display: grid;
  gap: 1ch;
}

.contactform-button input {
  margin-top: var(--space-8);
  padding: 0.75rem 1.875rem;
  background-color: var(--text);
  color: var(--bg-dark);
  cursor: pointer;
  font-weight: 600;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.36);
  border-radius: var(--border-radius-in);
  line-height: 1.2;
  border: 1px solid transparent;
  transition: var(--transition);
  width: fit-content;
}

.contactform-button input:hover {
  background-color: transparent;
  color: var(--text);
  border-color: var(--text);
}

input,
textarea {
  background-color: var(--bg);
  border: none;
  color: var(--text);
  padding: 0.8rem;
  border-radius: var(--border-radius-out);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--text-muted);
}

textarea {
  resize: block;
  box-sizing: content-box;
  height: 3lh;
}

.contactform-legaltext {
  color: var(--text-muted);
  font-size: calc(var(--font-size-body) * 0.72);
}

input:user-invalid,
textarea:user-invalid {
  outline: 2px solid oklch(65% 0.18 25);
  outline-offset: 2px;
}

.field-error {
  display: block;
  font-size: calc(var(--font-size-body) * 0.85);
  color: oklch(65% 0.18 25);
  margin-top: var(--space-8);
  min-height: 1em;
}

/* Footer */

footer {
  color: var(--text-muted);
  display: grid;
  row-gap: var(--space-8);
}

footer p {
  text-align: center;
  font-size: calc(var(--font-size-body) * 0.8);
}

.footer__social {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  align-items: center;
}

.footer__social a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transition: var(--transition);
}

.footer__social a:hover {
  color: var(--text);
  transform: var(--transform-scale-m);
}

.footer__social img,
.footer__social svg {
  width: 20px;
  height: 20px;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--text);
  color: var(--bg-dark);
  border: none;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.36);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  /* border-radius: var(--border-radius-in); */
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: hover) {
  .scroll-to-top:hover {
    background-color: var(--bg);
    color: var(--text);
    transform: translateY(-4px);
  }
}

.scroll-to-top__arrow {
  display: block;
  width: 20px;
  height: 20px;
}

/* Responsive adjustments */
@media (max-width: 755px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
}

/* Forms */
/* .form-control {
  display: block;
  width: 100%;
  padding: 8px 12px;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0;
  transition: border-color 150ms cubic-bezier(0.16,1,0.3,1);
  appearance: none;
  background-image: none;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
textarea.form-control {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.form-control::placeholder { color: #aaa; }
.form-control:focus {
  border-color: #e5e5e5;
  outline: 2px solid #fff;
  outline-offset: 2px;
} */

/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Responsive */
@media (min-width: 755px) {
  .desktop-nav {
    display: block;
  }

  .hamburger {
    display: none;
  }
}

@media (min-width: 1024px) {
  .page-wrapper {
    padding: var(--space-40) var(--space-96);
  }
}

/* @media (min-width: 1600px) {
  .aboutme-body {
    grid-template-columns: 75ch 1fr;
    justify-content: space-between;
  }

  .aboutme-body img {
    max-width: min(720px, 75%);
    aspect-ratio: 1/1;
  }

  .aboutme-img {
    text-align: end;
  }
} */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Animations */

/* @keyframes slideDown {
  0% {
    transform: translateY(-24px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.slideDown {
  animation: slideDown .75s ease-out;
} */

/* Utility Classes */

.todo {
  opacity: 0;
  transition: var(--transition-long);
}

.todo.show {
  opacity: 1;
}
