@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

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

:root {
  --bg: #faf8f3;
  --bg2: #fefdfa;
  --bg3: #f1efe6;
  --border: rgba(28, 25, 20, 0.12);
  --accent: #9a4429;
  --text: #1c1b19;
  --muted: #6b6459;
  --radius: 3px;
  --nav-height: 76px;
  --page-top-gap: 73px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

main, footer { min-width: 0; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--nav-height);
  padding: 22px 48px;
  background: rgba(250, 248, 243, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

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

.nav-cta {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(154,68,41,0.35);
  transition: text-decoration-color 0.15s;
}

.nav-cta:hover { text-decoration-color: var(--accent); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger svg {
  width: 22px;
  height: 22px;
  stroke: var(--text);
}

/* ── ACCESSIBILITY ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.nav-links a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ── MAIN ── */
.page-wrap {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--page-top-gap)) 40px 80px;
  width: 100%;
}

.page-wrap-wide {
  max-width: 1120px;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-heading {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 36px;
}

.page-subheading {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
  max-width: 620px;
  margin-bottom: 20px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    text-decoration-color 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg2);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 13px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  text-decoration-color: var(--muted);
}

/* ── HERO ── */
.hero {
  padding-top: calc(var(--nav-height) + var(--page-top-gap));
  padding-bottom: 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-name {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 28px;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-bottom: 36px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero-tag { padding: 0; }

.hero-tag:not(:last-child)::after {
  content: '·';
  margin: 0 10px;
  color: var(--border);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 64px;
}

/* ── STATS ROW ── */
.stats-row {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.stat-card {
  flex: 1;
  padding: 22px 24px;
  text-align: left;
}

.stat-card:not(:last-child) { border-right: 1px solid var(--border); }

.stat-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.35;
}

/* ── SECTION CARDS (home) ── */
.section-cards {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.section-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: padding-left 0.15s;
}

.section-card:hover { padding-left: 10px; }

.section-card h3 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 500;
  flex-shrink: 0;
}

.section-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

/* ── ABOUT ── */
.about-text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
  max-width: 640px;
}

.about-text p + p { margin-top: 22px; }
.about-text strong { color: var(--text); font-weight: 500; }

/* ── EXPERIENCE TIMELINE ── */
.timeline {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.job {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.job-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.job-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
}

.job-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 16px;
  margin-top: 4px;
}

.job-company {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 18px;
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-bullets li {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}

.job-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

.job-bullets strong { color: var(--text); font-weight: 500; }

.job-note {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}

.section-heading {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--text);
  margin: 64px 0 20px;
}

/* ── SKILLS ── */
.skills-intro {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 40px;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.skill-group {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 32px;
}

.skill-group-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  flex: 0 0 200px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--muted);
}

.tag { padding: 0; }

.tag:not(:last-child)::after {
  content: '·';
  margin: 0 10px;
  color: var(--border);
}

/* ── CONTACT ── */
.contact-cards {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-bottom: 40px;
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: padding-left 0.15s;
}

.contact-card:hover { padding-left: 10px; }

.contact-card h3 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 500;
  flex-shrink: 0;
}

.contact-card .contact-detail {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
}

.contact-card .contact-action {
  font-size: 0.82rem;
  color: var(--muted);
}

.contact-location {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-location h3 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.contact-location p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 28px 40px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root {
    --nav-height: 61px;
    --page-top-gap: 49px;
  }

  nav {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-links.show {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    min-width: 180px;
    padding: 16px 20px;
    flex-direction: column;
    gap: 14px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(28, 25, 20, 0.08);
  }

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

  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: block;
  }

  .page-wrap {
    padding: calc(var(--nav-height) + var(--page-top-gap)) 20px 50px;
  }

  .hero {
    padding-top: calc(var(--nav-height) + var(--page-top-gap));
  }

  .stats-row {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 0 0 50%;
  }

  .stat-card:nth-child(2n) {
    border-right: none;
  }

  .stat-card:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
    padding-bottom: 22px;
  }

  .section-card {
    flex-direction: column;
    gap: 4px;
  }

  .section-card p {
    text-align: left;
  }

  .skill-group {
    flex-direction: column;
    gap: 10px;
  }

  .skill-group-title {
    flex: none;
  }

  .contact-card {
    flex-direction: column;
    gap: 4px;
  }

  .job-top {
    flex-direction: column;
    gap: 4px;
  }

  .job-date {
    margin-left: 0;
  }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}