/* ---------- Tokens ---------- */

:root {
  --bg: #101214;
  --surface: #17191c;
  --text: #eceae6;
  --muted: #a09c94;
  --accent: #c9a15a;
  --hairline: rgba(236, 234, 230, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content-width: 1100px;
}

/* ---------- Base ---------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #14110a;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: #d9b06a;
  transform: translateY(-1px);
}

.btn-small {
  padding: 0.5rem 1.15rem;
  font-size: 0.875rem;
}

.link-quiet {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-quiet:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16, 18, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  text-decoration: none;
  margin-right: auto;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* ---------- Layout ---------- */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  border-top: 1px solid var(--hairline);
}

.section > h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 7rem 0 6rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 4.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.35;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 380px;
  width: 100%;
  justify-self: end;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface);
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--hairline);
}

/* ---------- Stats ---------- */

.stats {
  padding: 4.5rem 0;
  border-top: 1px solid var(--hairline);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-caption {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 15rem;
}

/* ---------- About ---------- */

.about-body {
  max-width: 44rem;
}

.about-body p + p {
  margin-top: 1.5rem;
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.skill-group h3 {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.skill-group li {
  color: var(--muted);
  padding: 0.6rem 0;
  border-top: 1px solid var(--hairline);
}

.skill-group li:last-child {
  border-bottom: 1px solid var(--hairline);
}

/* ---------- Education ---------- */

.education-list {
  max-width: 44rem;
}

.education-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--hairline);
}

.education-list li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.edu-school {
  color: var(--muted);
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* ---------- Contact ---------- */

.contact-lead {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.35;
  max-width: 32rem;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.contact-links a {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: fade-up both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4.5rem 0;
  }

  .hero-photo {
    justify-self: start;
    max-width: 300px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .education-list li {
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-links {
    flex-direction: column;
    gap: 1rem;
  }
}
