:root {
  --base-dark: #0d1117;
  --mid-dark: #1c2333;
  --light-section: #f5f2ec;
  --gold: #c9963a;
  --muted-dark: #8892a0;
  --cream: #f5f2ec;
  --dark-text: #1c2333;
  --border-soft: rgba(201, 150, 58, 0.15);
  --border-strong: rgba(201, 150, 58, 0.5);
  --drawer-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  background: var(--base-dark);
  color: var(--cream);
  overflow-x: hidden;
}

a,
button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 0;
  height: 2px;
  background: var(--gold);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.scrolled {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(20px);
}

.navbar {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.15em;
  font-size: clamp(1.1rem, 1.2vw, 1.35rem);
}

.brand-gold {
  color: var(--gold);
}

.brand-cream {
  color: var(--cream);
}

.nav-links,
.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.nav-links a,
.mobile-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
}

.nav-links a {
  position: relative;
  color: var(--cream);
  font-weight: 400;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  width: 48px;
  height: 48px;
  display: none;
  border: 1px solid rgba(245, 242, 236, 0.2);
  background: transparent;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--cream);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 1px;
  background: currentColor;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--drawer-ease);
  z-index: 1080;
}

.mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(75vw, 300px);
  height: 100dvh;
  background: var(--mid-dark);
  transform: translateX(100%);
  transition: transform 0.35s var(--drawer-ease);
  z-index: 1090;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 2rem;
}

.mobile-sidebar.is-open {
  transform: translateX(0);
}

.sidebar-close {
  margin-left: auto;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 242, 236, 0.2);
  border-radius: 8px;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}

.mobile-nav-links {
  margin-top: 2.5rem;
  display: grid;
  gap: 0.75rem;
}

.mobile-nav-links a {
  color: var(--cream);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  opacity: 0;
  transform: translateX(20px);
  transition:
    transform 0.35s var(--drawer-ease),
    opacity 0.35s var(--drawer-ease);
  transition-delay: calc(var(--item) * 0.08s);
}

.mobile-sidebar.is-open .mobile-nav-links a {
  opacity: 1;
  transform: translateX(0);
}

section {
  padding: clamp(4.25rem, 8vw, 7rem) 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 7rem 0 4.5rem;
  background: var(--base-dark);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.2;
}

.hero-art path {
  fill: none;
  stroke: rgba(201, 150, 58, 0.2);
  stroke-width: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-family: "DM Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  line-height: 0.93;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  color: var(--cream);
}

.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: hero-line-in 0.6s ease forwards;
  animation-delay: var(--line-delay);
}

.hero-subtext {
  margin: 1.35rem 0 0;
  max-width: 62ch;
  color: var(--muted-dark);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.7;
}

.hero-cta {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: rgba(201, 150, 58, 0.08);
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  width: 1px;
  height: 52px;
  background: rgba(201, 150, 58, 0.35);
  overflow: hidden;
}

.scroll-indicator span {
  position: absolute;
  left: 0;
  top: -50%;
  width: 100%;
  height: 50%;
  background: var(--gold);
  animation: scroll-track 1.4s ease-in-out infinite;
}

.section-light {
  background: var(--light-section);
  color: var(--dark-text);
}

.section-mid {
  background: var(--mid-dark);
}

.section-base {
  background: var(--base-dark);
}

.section-title {
  margin: 0 0 2rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  line-height: 1;
  font-size: clamp(2.2rem, 5.5vw, 4.1rem);
}

.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.about-quote {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  line-height: 1.1;
  color: var(--dark-text);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
}

.about-description {
  margin: 1.4rem 0 0;
  color: rgba(28, 35, 51, 0.82);
  line-height: 1.8;
  font-size: clamp(1rem, 1.3vw, 1.08rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-chip {
  padding: 1rem;
  border: 1px solid rgba(136, 146, 160, 0.28);
  background: var(--mid-dark);
}

.stat-value {
  margin: 0;
  color: var(--cream);
  font-family: "DM Mono", monospace;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
}

.stat-label {
  margin: 0.4rem 0 0;
  color: var(--muted-dark);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  grid-column: span 6;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  padding: 1.15rem 1.15rem 1.25rem;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(201, 150, 58, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-featured {
  grid-column: span 12;
  padding: 1.4rem;
}

.project-index {
  margin: 0 0 0.45rem;
  color: rgba(201, 150, 58, 0.85);
  font-family: "DM Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.project-status {
  color: rgba(245, 242, 236, 0.75);
  border: 1px solid rgba(245, 242, 236, 0.2);
  padding: 0.2rem 0.45rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "DM Mono", monospace;
  white-space: nowrap;
}

.project-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 2.1vw, 2.05rem);
  color: var(--cream);
}

.project-tag {
  margin: 0.6rem 0 0;
  color: var(--gold);
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.project-copy {
  margin: 0.75rem 0 1rem;
  color: var(--muted-dark);
  line-height: 1.62;
}

.project-card a {
  color: var(--cream);
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.project-card a:hover,
.project-card a:focus-visible {
  color: var(--gold);
}

.project-link-disabled {
  color: var(--muted-dark);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  cursor: not-allowed;
}

.skills .section-title {
  margin-bottom: 1.2rem;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.skills-row:last-child {
  margin-bottom: 0;
}

.skill-tag {
  border: 1px solid rgba(201, 150, 58, 0.42);
  background: rgba(28, 35, 51, 0.5);
  color: var(--cream);
  padding: 0.5rem 0.7rem;
  font-family: "DM Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.contact-wrap {
  max-width: 760px;
}

.contact-copy {
  margin: 0;
  color: rgba(28, 35, 51, 0.72);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.contact-form {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.65rem;
}

.contact-form label {
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  color: rgba(28, 35, 51, 0.82);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(28, 35, 51, 0.35);
  background: #fdf8f1;
  color: var(--dark-text);
  resize: vertical;
}

.contact-form textarea {
  min-height: 150px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.submit-btn {
  width: fit-content;
  min-height: 48px;
  margin-top: 0.35rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--base-dark);
  cursor: pointer;
}

.submit-btn:hover,
.submit-btn:focus-visible {
  background: #d6a853;
}

.form-message {
  min-height: 1.25rem;
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: rgba(28, 35, 51, 0.8);
}

.form-success {
  margin-top: 1.2rem;
  border: 1px solid rgba(28, 35, 51, 0.2);
  background: #fdf8f1;
  padding: 1rem;
  color: var(--dark-text);
}

.reveal-on-scroll {
  opacity: 1;
  transform: none;
}

.js-ready .reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transition-delay: var(--tag-delay, 0s);
}

.js-ready .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-line-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll-track {
  from {
    transform: translateY(-20%);
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  to {
    transform: translateY(220%);
    opacity: 0;
  }
}

@media (max-width: 960px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card-featured {
    grid-column: span 1;
  }

  .project-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    min-height: 100svh;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-line,
  .js-ready .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

