@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/dm-sans-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg: #fafaf9;
  --surface: #fff;
  --surface-alt: #f5f5f4;
  --text: #171717;
  --text-quote: #353535;
  --text-muted: #525252;
  --text-soft: #737373;
  --text-faint: #a3a3a3;
  --text-subtle: #c7c7c7;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --nav-bg: rgba(250, 250, 249, 0.88);
  --nav-border: rgba(0, 0, 0, 0.06);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --fs-xs: 0.8125rem; /* 13px */
  --fs-sm: 0.9375rem; /* 15px */
  --fs-base: 1.0625rem; /* 17px */
  --fs-md: 1.1875rem; /* 19px */
  --fs-lg: 1.5rem; /* 24px */
  --fs-hero: clamp(3rem, 8vw, 4.75rem);
}
:root[data-theme="dark"] {
  --bg: #171717;
  --surface: #1f1f1f;
  --surface-alt: #262626;
  --text: #fafaf9;
  --text-quote: #d4d4d4;
  --text-muted: #a3a3a3;
  --text-soft: #8f8f8f;
  --text-faint: #6b6b6b;
  --text-subtle: #525252;
  --border: #2e2e2e;
  --border-strong: #404040;
  --nav-bg: rgba(23, 23, 23, 0.88);
  --nav-border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 4.5rem;
}
section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.site {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.7;
  margin: 0;
  background-color: var(--bg);
  background-image: url("./assets/circuit_light.svg");
}

:root[data-theme="dark"] .site {
  background-image: url("./assets/circuit_dark.svg");
}

.container {
  max-width: 45rem;
  margin: 0 auto;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 4.5rem;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 400;
}
.nav-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}
.nav-right {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}
.nav-links a {
  font-size: var(--fs-sm);
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-toggle:hover {
  color: var(--text);
}
.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}
.nav-toggle .icon-close {
  display: none;
}
.nav-toggle.open .icon-bars {
  display: none;
}
.nav-toggle.open .icon-close {
  display: block;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.2s;
}
.theme-toggle:hover {
  color: var(--text);
  transform: rotate(45deg);
  transition: transform 0.3s;
}
.theme-toggle:not(:hover) {
  transform: rotate(0deg);
  transition: transform 0.15s;
}
.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

#experience,
#projects {
  scroll-margin-top: 1.5rem;
}

#testimonials {
  scroll-margin-top: -2.5rem;
}

/* Shared section */
.section {
  padding: 6.25rem 3rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 4.5rem;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin: 0 0 3rem 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 3rem;
}
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  transition: color 0.2s;
  animation: scroll-bounce 1.8s ease-in-out infinite;
}
.scroll-cue:hover {
  color: var(--text);
}
@keyframes scroll-bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 0.5rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue {
    animation: none;
  }
}
.hero-inner {
  max-width: 45rem;
  margin: 0 auto;
  width: 100%;
}
.hero-title {
  font-size: var(--fs-hero);
  font-weight: 600;
  line-height: 1;
  margin: 0 0 1.75rem 0;
}
.hero-title-name {
  font-weight: 400;
}
.hero-lead {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 32.5rem;
  margin: 0 0 2.25rem 0;
  line-height: 1.55;
}
.hero-hand {
  width: 4rem;
  height: 4rem;
}
.socials {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.social-icon {
  color: var(--text-soft);
  display: block;
  transition: color 0.2s;
}
.social-icon:hover {
  transform: translateY(-0.15rem);
  transition: transform 0.3s;
}
.social-icon:not(:hover) {
  transform: translateY(0rem);
  transition: transform 0.3s;
}
.socials a:hover .social-icon {
  color: var(--text);
}

/* About */
.lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}
.body-text {
  font-size: var(--fs-base);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

/* Experience */
.xp {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
}
.xp:last-child {
  margin-bottom: 0;
}
.xp-date-col {
  flex: none;
  width: 8.75rem;
}
.xp-date {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin: 0;
  line-height: 1.7;
}
.xp-body {
  flex: 1;
  min-width: 0;
}
.xp-title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
}
.xp-org {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin: 0 0 0.625rem 0;
}
.xp-desc {
  font-size: var(--fs-base);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}
.xp-link {
  text-decoration: none;
  color: var(--text-faint);
}
.xp-link:hover {
  color: var(--text-muted);
  transition: color 0.2s;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s;
}
.project-card:hover {
  border-color: var(--text-faint);
}
.project-title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0 0 0.625rem 0;
  line-height: 1.3;
}
.project-desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  line-height: 1.55;
  flex: 1;
}
.tags {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);

  background: var(--surface-alt);
  padding: 0.1875rem 0.5rem;
  color: var(--text-soft);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 8.75rem 1fr;
  gap: 1.5rem 3rem;
  align-items: baseline;
}
.skill-label {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin: 0;
}
.skill-list {
  font-size: var(--fs-base);
  color: var(--text-muted);
  margin: 0;
}

/* Testimonials */
.quote-block {
  margin-bottom: 3.5rem;
}
.quote-block:last-child {
  margin-bottom: 0;
}
.quote {
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--text-quote);
  margin: 0 0 1.25rem 0;
  font-style: italic;
}
.quote-author {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  margin: 0;
  text-decoration: none;
}
.quote-author:hover {
  color: var(--text-muted);
  transition: color 0.3s;
}
.quote-author strong {
  color: var(--text-muted);
  font-weight: 500;
}

/* Contact */
.contact-headline {
  font-size: var(--fs-lg);
  font-weight: 500;
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.02em;
}
.contact-text {
  font-size: var(--fs-base);
  color: var(--text-muted);
  margin: 0 0 2.5rem 0;
  line-height: 1.6;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-link {
  font-size: var(--fs-base);
  color: var(--text-muted);
  transition: color 0.2s;
  text-decoration: dotted underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25rem;
}
.contact-link > span {
  display: inline-block;
  transition: transform 0.2s;
}
.contact-link:hover {
  color: var(--text);
  text-decoration-color: var(--text);
  transition:
    text-decoration 0.2s,
    text-decoration-color 0.2s;
}

.contact-link:hover > span {
  transform: translateX(0.25rem);
}

/* Footer */
.footer {
  background: var(--nav-bg);
  padding: 3rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 45rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: var(--fs-sm);
  color: var(--text-soft);
  margin: 0;
}
.footer-vat {
  font-size: var(--fs-sm);
  color: var(--text-soft);
  margin: 0;
}

/* Mobile */
@media (max-width: 640px) {
  html {
    scroll-snap-type: none;
  }
  section {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }
  .nav-links {
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nav-border);
    transform: translateY(-0.5rem);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.2s,
      transform 0.2s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 0.75rem 3rem;
  }
  .nav-toggle {
    display: flex;
  }
  .section,
  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
  .nav {
    padding: 0 1.5rem;
  }
  .hero-hand {
    width: 2.5rem;
    height: 2.5rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .xp {
    flex-direction: column;
    gap: 0.5rem;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem 0;
  }
  .footer {
    padding: 3rem 1.5rem 3rem 1.5rem;
  }
}

@media (max-width: 360px) {
  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }
}
