@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #16111d;
  --bg-soft: #1d1626;
  --surface: rgba(30, 22, 40, 0.9);
  --surface-strong: #231a2f;
  --text: #ede6db;
  --muted: #8a7f94;
  --line: rgba(230, 200, 210, 0.09);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --accent: #c07a92;
  --accent-strong: #c9a06a;
  --accent-soft: rgba(192, 122, 146, 0.12);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
}

/* ─── Topbar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 32px;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.brand-mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.nav {
  display: flex;
  gap: 28px;
  padding: 0;
  border: none;
  background: none;
}

.nav a {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color 200ms ease;
}

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

/* ─── Buttons ─── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(201, 160, 106, 0.4);
  border-radius: 2px;
  background: transparent;
  color: var(--accent-strong);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.button:focus-visible {
  background: rgba(201, 160, 106, 0.08);
  border-color: var(--accent-strong);
}

.button-quiet {
  border-color: var(--line);
  color: var(--muted);
}

.button-quiet:hover {
  border-color: rgba(230, 200, 210, 0.25);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Layout ─── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px 80px;
}

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

/* ─── Hero ─── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 64px;
  padding: 80px 0 72px;
  border-top: none;
}

.eyebrow,
.section-label,
.card-kicker,
.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.hero h1 {
  margin: 20px 0 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.2;
  max-width: 22ch;
  color: var(--text);
  letter-spacing: 0.01em;
}

.section h2 {
  margin: 14px 0 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

.hero-summary,
.intro-text,
.section-copy,
#contactBlurb,
.timeline-summary,
.project-copy {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
  font-weight: 300;
}

.hero-summary {
  max-width: 52ch;
  margin: 20px 0 0;
}

.hero-actions,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.hero-meta {
  margin-top: 36px;
}

.hero-meta > div {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
}

/* ─── Hero visual ─── */
.hero-visual {
  position: relative;
}

.portrait-frame {
  position: relative;
  min-height: 520px;
  padding: 20px;
  border-radius: 2px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portrait-image {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  border-radius: 1px;
}

.floating-card {
  position: absolute;
  max-width: 240px;
  padding: 14px 16px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(22, 17, 29, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.floating-card-top {
  top: 32px;
  right: 24px;
}

.floating-card-bottom {
  left: 24px;
  bottom: 24px;
  max-width: 280px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.stat {
  padding: 10px 12px;
  border-radius: 1px;
  background: rgba(192, 122, 146, 0.08);
  border: 1px solid rgba(192, 122, 146, 0.12);
}

.stat strong {
  display: block;
  font-size: 1.1rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  color: var(--accent-strong);
}

.stat span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ─── Intro / Contact bands ─── */
.intro-band,
.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: start;
}

.intro-band h2,
.contact-band h2,
.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 32px;
}

/* ─── Grid containers ─── */
.timeline,
.skill-grid,
.project-grid,
.contact-links {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

/* ─── Timeline ─── */
.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 28px;
  background: var(--bg);
  transition: background 200ms ease;
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.timeline-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
}

.timeline-item h3,
.project-card h3,
.skill-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.timeline-summary {
  margin: 10px 0 14px;
}

.timeline-highlights {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.92rem;
}

/* ─── Skills ─── */
.skill-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.filter-chip:hover {
  color: var(--text);
  border-color: rgba(230, 200, 210, 0.2);
}

.filter-chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(192, 122, 146, 0.3);
}

.skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card {
  padding: 24px;
  background: var(--bg);
  transition: background 200ms ease;
}

.skill-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  padding: 7px 12px;
  border-radius: 2px;
  background: rgba(201, 160, 106, 0.06);
  border: 1px solid rgba(201, 160, 106, 0.14);
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 300;
}

/* ─── Projects ─── */
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--bg);
  transition: background 200ms ease;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.project-type {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 2px;
  background: rgba(192, 122, 146, 0.08);
  border: 1px solid rgba(192, 122, 146, 0.18);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.project-links a,
.contact-link a {
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(201, 160, 106, 0.3);
  transition: border-color 180ms ease;
}

.project-links a:hover,
.contact-link a:hover {
  border-color: var(--accent-strong);
}

/* ─── Contact ─── */
.contact-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-link {
  padding: 24px;
  background: var(--bg);
  transition: background 200ms ease;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.02);
}

.contact-link span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ─── Reveal animation ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero,
  .intro-band,
  .contact-band,
  .section-heading,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .skill-grid,
  .contact-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portrait-frame {
    min-height: 460px;
  }

  .portrait-image {
    min-height: 400px;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    flex-wrap: wrap;
    padding: 18px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  main {
    padding: 0 18px 56px;
  }

  .hero {
    gap: 36px;
    padding: 48px 0 56px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .portrait-frame {
    min-height: 420px;
    padding: 12px;
  }

  .portrait-image {
    min-height: 360px;
  }

  .floating-card {
    position: static;
    max-width: none;
    margin-top: 10px;
  }

  .stats,
  .project-grid,
  .skill-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }
}
