:root {
  --bg: #fbf9f7;
  --bg-alt: #f3eff3;
  --surface: #ffffff;
  --text: #1e1a24;
  --muted: #5f5868;
  --line: #e6e0e8;
  --accent: #5b2a86;
  --accent-strong: #47206a;
  --accent-soft: #efe6f6;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(30, 20, 40, .04), 0 8px 24px rgba(30, 20, 40, .06);
  --radius: 16px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141118;
    --bg-alt: #1b1720;
    --surface: #211c27;
    --text: #f1edf4;
    --muted: #b1a8ba;
    --line: #322b3a;
    --accent: #c9a4ec;
    --accent-strong: #dcc0f4;
    --accent-soft: #2e2439;
    --accent-text: #1a1220;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #141118;
  --bg-alt: #1b1720;
  --surface: #211c27;
  --text: #f1edf4;
  --muted: #b1a8ba;
  --line: #322b3a;
  --accent: #c9a4ec;
  --accent-strong: #dcc0f4;
  --accent-soft: #2e2439;
  --accent-text: #1a1220;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text); font-family: var(--serif); font-size: 15px;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-links .nav-cta { color: var(--accent-text); background: var(--accent); margin-left: 6px; }
.nav-links .nav-cta:hover { color: var(--accent-text); background: var(--accent-strong); }
.nav-tools { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.menu-btn { display: none; }

/* Hero */
.hero { padding: 72px 0 88px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 10%, var(--accent-soft), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, var(--accent-soft), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 4px rgba(47, 166, 106, .18); }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 40px; }
.hero-actions.center { justify-content: center; margin-bottom: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 32px; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--text); }
.hero-facts span { font-size: 14px; color: var(--muted); }

.hero-photo { position: relative; justify-self: center; width: 100%; max-width: 400px; }
.photo-frame {
  border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transform: rotate(1.5deg);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.photo-badge {
  position: absolute; left: -24px; bottom: 28px; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 12px 18px 12px 12px; border-radius: 14px; font-size: 14px; line-height: 1.35; color: var(--muted);
}
.photo-badge strong { color: var(--text); }
.badge-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.badge-icon svg { width: 20px; height: 20px; fill: currentColor; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 40px; }
.sub-h2 { margin-top: 72px; }

.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; }
.about-body p { color: var(--muted); font-size: 1.05rem; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.skills span {
  font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong);
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 180px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 180px 1fr; gap: 40px; position: relative; padding-bottom: 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 174px; top: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-alt); border: 3px solid var(--accent);
}
.tl-date { font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 20px; padding-right: 16px; text-align: right; }
.tl-card, .edu-card, .card, .quote {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: var(--shadow);
}
.tl-card h3 { margin-bottom: 4px; }
.tl-org { font-size: 15px; font-weight: 500; color: var(--accent); margin-bottom: 12px; }
.tl-card p:last-child, .card p:last-child, .edu-card p:last-child { margin-bottom: 0; }
.tl-card p:not(.tl-org) { color: var(--muted); }

/* Education */
.edu-card { padding: 32px; }
.edu-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.edu-icon, .card-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.edu-icon svg, .card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.edu-card > p { color: var(--muted); }
.coursework { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.coursework-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.coursework ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.coursework li { position: relative; padding-left: 18px; font-size: 15px; }
.coursework li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-date { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg-alt); padding: 4px 10px; border-radius: 999px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* Tags, button icons, footer links */
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.btn-icon { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-icon.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* IELTS */
.ielts-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.ielts-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.ielts-head h3 { margin: 12px 0 4px; font-size: 1.3rem; }
.ielts-head .tl-org { margin: 0; }
.ielts-overall {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 112px; height: 112px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
}
.ielts-overall strong { font-family: var(--serif); font-size: 2.4rem; line-height: 1; }
.ielts-overall span { font-size: 12px; font-weight: 500; margin-top: 4px; opacity: .9; }
.bands { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bands li {
  display: flex; flex-direction: column; align-items: flex-start; padding: 16px 18px;
  background: var(--bg-alt); border-radius: 12px;
}
.band-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.bands strong { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1.2; margin: 2px 0; }
.band-cefr { font-size: 12px; font-weight: 600; color: var(--accent); }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.quote { margin: 0; padding: 32px; position: relative; }
.quote::before {
  content: "\201C"; position: absolute; top: 4px; right: 24px; font-family: var(--serif);
  font-size: 96px; line-height: 1; color: var(--accent-soft);
}
.quote blockquote { margin: 0 0 20px; font-family: var(--serif); font-size: 1.25rem; line-height: 1.45; position: relative; }
.quote figcaption { display: flex; flex-direction: column; font-size: 14px; }
.quote figcaption span { color: var(--muted); }

/* Contact */
.contact { text-align: center; background: var(--bg-alt); }
.contact-inner { max-width: 720px; }
.contact .lead { margin: 0 auto; }
.location { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; margin: 0; }
.location svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* Reveal animation */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* Print */
@media print {
  .nav, .hero-actions, .theme-toggle, .footer a[href="#top"], .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .hero { padding: 16pt 0; }
  .section-alt, .contact { background: none; }
  .tl-card, .edu-card, .card, .quote, .ielts-card { box-shadow: none; break-inside: avoid; }
  .js .reveal { opacity: 1; transform: none; }
  .photo-frame { transform: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo { max-width: 340px; order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 8px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .coursework ul { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .menu-btn { display: grid; }
  .nav-tools { margin-left: auto; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }
  .nav-links .nav-cta { margin: 8px 0 0; text-align: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 64px; }
  .hero-photo { max-width: 260px; }
  .photo-badge { left: -8px; bottom: 16px; }
  .hero-facts { gap: 24px; }
  .section { padding: 72px 0; }
  .cards, .cards-2, .quotes { grid-template-columns: 1fr; }
  .bands { grid-template-columns: 1fr 1fr; }
  .ielts-card { padding: 22px; }
  .ielts-overall { width: 88px; height: 88px; }
  .ielts-overall strong { font-size: 1.9rem; }
  .ielts-overall span { font-size: 11px; }
  .contact .btn { width: 100%; }
  .coursework ul { grid-template-columns: 1fr; }
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 32px; }
  .timeline li::before { left: 1px; top: 4px; }
  .tl-date { text-align: left; padding: 0; }
  .edu-card, .quote { padding: 24px; }
  .brand-name { display: none; }
}
