/* Minimal, type-led layout inspired by the Ferral Studio Framer template,
   coloured to match the CV: warm cream, forest green, sage, and a touch of clay.
   Fonts: Fraunces (headings) and Karla (text), as in the CV. */
:root {
  --bg: #fbf8f3;
  --cream: #f3eee6;
  --ink: #18221e;
  --muted: #47534e;
  --faint: #6f7c76;
  --line: #ddd5c7;
  --soft: #efe9df;
  --green: #1f4a3f;
  --green-2: #2f5d50;
  --sage: #5f8076;
  --sage-soft: #dbe7e0;
  --clay: #9a4a25;
  --band: #1f4a3f;
  --band-ink: #f6f1e7;
  --band-muted: #c9dad2;
  --band-accent: #f0c89d;
  --on-green: #f7f3ec;
  --block-bg: #2f5d50;
  --block-ink: #f3eee6;
  --block-muted: #b9ccc5;
  --block-line: #4a7366;
  --footer-bg: #24493f;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad-x: 32px;
  --max: 1360px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #111915;
  --cream: #16201c;
  --ink: #ece6da;
  --muted: #a5b2ac;
  --faint: #6f7e77;
  --line: #2a3631;
  --soft: #1b2622;
  --green: #8fc1ae;
  --green-2: #a9d1c1;
  --sage: #7fa195;
  --sage-soft: #1e2d27;
  --clay: #e09a72;
  --on-green: #111915;
  --block-bg: #1c2e28;
  --block-ink: #ece6da;
  --block-muted: #9db3aa;
  --block-line: #2e4a41;
  --footer-bg: #16241f;
  --band: #1c2e28;
  --band-ink: #ece6da;
  --band-muted: #a9bfb6;
  --band-accent: #e8b98c;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111915;
    --cream: #16201c;
    --ink: #ece6da;
    --muted: #a5b2ac;
    --faint: #6f7e77;
    --line: #2a3631;
    --soft: #1b2622;
    --green: #8fc1ae;
    --green-2: #a9d1c1;
    --sage: #7fa195;
    --sage-soft: #1e2d27;
    --clay: #e09a72;
    --on-green: #111915;
    --block-bg: #1c2e28;
    --block-ink: #ece6da;
    --block-muted: #9db3aa;
    --block-line: #2e4a41;
    --footer-bg: #16241f;
  --band: #1c2e28;
  --band-ink: #ece6da;
  --band-muted: #a9bfb6;
  --band-accent: #e8b98c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; transition: background 0.3s, color 0.3s; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); }
em.accent, .hero h1 em, .statement em, .contact-block h2 em { font-family: var(--serif); font-style: italic; color: var(--green); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; justify-self: start; color: var(--ink); }
.logo-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: var(--on-green); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { color: var(--muted); transition: color 0.2s; white-space: nowrap; position: relative; }
.nav a:hover { color: var(--green); }
.nav a[aria-current="page"] { color: var(--green); font-weight: 600; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 17px; transition: border-color 0.2s, color 0.2s; }
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
.menu-toggle { display: none; }
.resume-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform 0.2s, background 0.2s; }
.resume-btn:hover { transform: translateY(-1px); background: var(--green-2); }

/* Links, buttons, chips */
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--green); }
.arrow-link .arr { display: inline-block; transition: transform 0.25s; }
.arrow-link:hover .arr { transform: translateX(4px); }
.arrow-link.down:hover .arr { transform: translateY(3px); }
.btn-pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: 16px; font-weight: 600; border: 1px solid var(--green); cursor: pointer; font-family: inherit; transition: transform 0.2s, opacity 0.2s; }
.btn-pill:hover { transform: translateY(-2px); }
.chip { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 14px; color: var(--green); background: var(--sage-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Hero */
.hero { padding: 112px 0 80px; }
.hero h1 { font-family: var(--serif); font-size: clamp(34px, 4.2vw, 62px); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; max-width: 22ch; font-variation-settings: "opsz" 96; }
.hero h1.long { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.25; max-width: 34ch; }
.hero-meta { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; font-size: 16px; }
.who { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }
.page-label { font-size: 15px; color: var(--clay); margin-bottom: 20px; font-weight: 600; letter-spacing: 0.02em; }
.hero .lead { margin-top: 28px; max-width: 62ch; font-size: 19px; color: var(--muted); }
.subnav { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.subnav a { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--muted); background: var(--bg); transition: all 0.2s; }
.subnav a:hover { color: var(--on-green); background: var(--green); border-color: var(--green); }
.hero-split { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 64px; align-items: end; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 999px 999px 24px 24px; overflow: hidden; background: var(--sage-soft); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait-wrap { position: relative; }
.portrait-wrap::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 999px 999px 24px 24px; background: var(--cream); border: 1px solid var(--line); z-index: -1; }
.hero-split .portrait-wrap { z-index: 0; max-width: 360px; justify-self: end; width: 100%; }

/* Highlight band */
.highlight { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 28px; padding: 10px 18px; border-radius: 14px; background: var(--sage-soft); color: var(--green); font-size: 16px; }
.highlight strong { font-family: var(--serif); font-size: 22px; font-weight: 600; }

/* Image strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0 var(--pad-x); max-width: var(--max); margin: 0 auto; }
.strip figure { aspect-ratio: 1 / 1; overflow: hidden; background: var(--soft); border-radius: 18px; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.strip figure:hover img { transform: scale(1.04); }

/* Sections */
.section { padding: 112px 0; }
.section.cream { background: var(--cream); }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.row-head h2, .split-label { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
.split-label p { margin-top: 14px; font-family: var(--sans); font-size: 16px; font-weight: 400; color: var(--muted); max-width: 34ch; line-height: 1.6; }
.split-label.sticky { position: sticky; top: 110px; align-self: start; }
.statement { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.3; letter-spacing: -0.015em; font-weight: 400; }
.prose p { color: var(--muted); font-size: 18px; margin-top: 18px; max-width: 62ch; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .statement { font-size: clamp(24px, 2.4vw, 34px); color: var(--ink); margin-top: 0; max-width: none; }

/* Philosophy of design (Home) */
.big-statement { font-family: var(--serif); font-size: clamp(28px, 3.3vw, 48px); font-weight: 400; line-height: 1.22; letter-spacing: -0.02em; max-width: 30ch; }
.big-statement em { font-family: var(--serif); font-style: italic; color: var(--green); }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 72px; }
.principles li { border-top: 2px solid var(--green); padding-top: 22px; }
.principles h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.3; margin-top: 10px; letter-spacing: -0.01em; }
.principles p { color: var(--muted); margin-top: 10px; font-size: 16px; }
.pull-quote { margin-top: 72px; padding: 32px 36px; border-radius: 22px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.pull-quote p { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.4; color: var(--green); max-width: 46ch; }

/* Numbered list (01) (02) */
.num-list > li { display: grid; grid-template-columns: 64px 1fr; gap: 8px 16px; padding: 30px 0; border-top: 1px solid var(--line); }
.num-list > li:last-child { border-bottom: 1px solid var(--line); }
.num { font-family: var(--serif); font-size: 16px; color: var(--clay); padding-top: 4px; font-style: italic; }
.num-list h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.num-list p { color: var(--muted); margin-top: 10px; max-width: 62ch; }
.num-list .chips { margin-top: 16px; }
.num-list .arrow-link { margin-top: 16px; }
.item-media { margin-top: 20px; display: block; max-width: 560px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); }
.item-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.6s; }
.item-media:hover img { transform: scale(1.03); }

/* Rows: experience and education */
.rows > li { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.rows .org { color: var(--green); font-size: 16px; font-weight: 600; grid-column: 1; }
.rows .date { color: var(--clay); font-size: 15px; font-weight: 600; white-space: nowrap; grid-column: 2; grid-row: 1; }
.rows .points { grid-column: 1 / -1; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); max-width: 74ch; }
.rows .points li { position: relative; padding-left: 20px; }
.rows .points li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.rows .points strong { color: var(--ink); font-weight: 600; }
.sub-title { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 64px 0 12px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.stat { padding: 24px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.section.cream .stat { background: var(--bg); }
.stat strong { display: block; font-family: var(--serif); font-size: clamp(40px, 4vw, 58px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; color: var(--green); }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Work cards */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.work-card .media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); border-radius: 18px; border: 1px solid var(--line); }
.work-card .media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.8s ease; }
.work-card .media img.center { object-position: center; }
.work-card:hover .media img { transform: scale(1.04); }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 16px; }
.work-meta strong { font-family: var(--serif); font-size: 21px; font-weight: 500; }
.work-meta span { color: var(--muted); text-align: right; font-size: 15px; }
.work-card:hover .work-meta strong { color: var(--green); }

/* Interactive tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.tool-card { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.tool-card .media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--soft); }
.tool-card .media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.6s; }
.tool-card:hover .media img { transform: scale(1.03); }
.tool-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.tool-card h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.tool-card p { color: var(--muted); font-size: 16px; margin-top: 10px; }
.tool-card .chips { margin-top: 16px; }
.tool-card .arrow-link { margin-top: auto; padding-top: 18px; }

.gallery video.clip { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; background: #000; }
.ep-pages .shot { aspect-ratio: 1 / 1.3; }
.tool-card .arrow-link.second { margin-top: 0; padding-top: 8px; }
.muted-intro em { font-family: var(--serif); color: var(--green); }
.muted-intro { color: var(--muted); font-size: 18px; max-width: 70ch; margin: -12px 0 56px; }

/* Recommendations */
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.rec-card { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 22px; background: var(--cream); border: 1px solid var(--line); }
.rec-quote { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.4; color: var(--green); }
.rec-card details summary { cursor: pointer; font-weight: 600; color: var(--green); font-size: 15px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.rec-card details summary::-webkit-details-marker { display: none; }
.rec-card details summary::after { content: "+"; font-size: 18px; line-height: 1; transition: transform 0.2s; }
.rec-card details[open] summary::after { transform: rotate(45deg); }
.rec-full { color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 10px; }
.rec-card details .rec-full { margin-top: 14px; }
.rec-person { display: flex; gap: 14px; align-items: flex-start; padding-top: 18px; border-top: 1px solid var(--line); margin-top: auto; }
.rec-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: var(--on-green); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 600; font-size: 15px; }
.rec-person strong { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.rec-person span { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }
.rec-person .rec-meta { color: var(--clay); font-weight: 600; margin-top: 4px; }
.rec-person .rec-avatar { display: inline-flex; color: var(--on-green); font-size: 15px; line-height: 1; }
.letter-card { margin-top: 32px; display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; padding: 32px; border-radius: 22px; background: var(--sage-soft); }
.gallery.letter-thumb { display: block; }
.letter-thumb .shot { aspect-ratio: 1 / 1.414; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px -14px rgba(31, 42, 38, 0.35); }
.letter-thumb .shot img { object-fit: cover; object-position: top; }
.letter-thumb figcaption { display: none; }
.letter-body .rec-quote { font-size: 23px; }
.letter-text { color: var(--muted); margin-top: 14px; max-width: 64ch; }
.letter-body .rec-person { margin-top: 22px; border-top-color: color-mix(in srgb, var(--green) 20%, transparent); }

/* Galleries */
.gallery-group + .gallery-group { margin-top: 88px; }
.gallery-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; margin-bottom: 28px; }
.gallery-head h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.gallery-head p { color: var(--muted); }
.gallery-head .chips { margin-top: 14px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gallery figure { display: flex; flex-direction: column; gap: 10px; }
.shot { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 16px; background: var(--soft); cursor: zoom-in; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.shot:hover img { transform: scale(1.03); }
.gallery.contain .shot { padding: 10px; border: 1px solid var(--line); background: var(--bg); }
.gallery.contain .shot img { object-fit: contain; border-radius: 8px; }
.gallery figcaption { font-size: 15px; color: var(--muted); line-height: 1.45; }

/* Empty states */
.empty { padding: 48px 32px; border: 1.5px dashed var(--sage); border-radius: 20px; text-align: center; color: var(--muted); background: color-mix(in srgb, var(--sage-soft) 50%, transparent); }
.empty strong { display: block; font-family: var(--serif); color: var(--green); font-weight: 500; font-size: 22px; margin-bottom: 6px; }

/* Contact block and footer */
.contact-block { background: var(--block-bg); color: var(--block-ink); padding: 120px 0 96px; position: relative; overflow: hidden; }
.contact-block::after { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(181, 100, 60, 0.28), transparent 65%); pointer-events: none; }
.contact-block h2 { font-family: var(--serif); font-size: clamp(32px, 3.8vw, 54px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.12; max-width: 18ch; }
.contact-block h2 em { color: #e8c9a8; }
.contact-block .actions { margin-top: 88px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; position: relative; z-index: 1; }
.contact-block .btn-pill { background: var(--block-ink); color: var(--block-bg); border-color: var(--block-ink); }
.copy-email { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; font: inherit; font-size: 16px; cursor: pointer; padding: 0; }
.copy-hint { font-size: 13px; padding: 2px 10px; border: 1px solid var(--block-line); border-radius: 999px; color: var(--block-muted); }
.site-footer { background: var(--footer-bg); color: var(--block-ink); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 13px; font-weight: 600; color: var(--block-muted); margin-bottom: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 56px; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--block-muted); }

/* Toast and lightbox */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); background: var(--green); color: var(--on-green); padding: 10px 18px; border-radius: 999px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: rgba(14, 24, 20, 0.94); }
.lightbox[hidden] { display: none; }
.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(1400px, 100%); }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; background: #fff; border-radius: 8px; }
.lb-figure figcaption { color: #e9e4da; font-size: 15px; text-align: center; }
.lb-btn { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: background 0.2s; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lb-close { position: absolute; top: 16px; right: 16px; font-size: 18px; }
body.lb-open { overflow: hidden; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Tablet */
@media (max-width: 1100px) {
  .nav { gap: 18px; }
  .header-actions .send { display: none; }
}
@media (max-width: 960px) {
  :root { --pad-x: 24px; }
  .header-inner { grid-template-columns: 1fr auto; height: auto; min-height: 64px; padding-top: 12px; padding-bottom: 12px; row-gap: 8px; }
  .menu-toggle { display: inline-flex; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .nav { display: none; grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 4px; padding: 0 0 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .split, .gallery-head, .hero-split { grid-template-columns: 1fr; gap: 28px; }
  .hero-split .portrait-wrap { justify-self: start; max-width: 300px; }
  .split-label.sticky { position: static; }
  .work-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; }
  .rec-grid { grid-template-columns: 1fr; }
  .letter-card { grid-template-columns: 200px 1fr; gap: 28px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 88px 0; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --pad-x: 20px; }
  body { font-size: 16px; }
  .logo { font-size: 18px; white-space: nowrap; gap: 8px; }
  .header-actions { gap: 8px; }
  .resume-btn { padding: 6px 14px; font-size: 14px; }
  .hero { padding: 56px 0 48px; }
  .hero .lead { font-size: 17px; }
  .section { padding: 64px 0; }
  .row-head h2, .split-label { font-size: 26px; }
  .work-grid, .tool-grid, .gallery, .principles { grid-template-columns: 1fr; }
  .principles { gap: 24px; }
  .letter-card { grid-template-columns: 1fr; padding: 22px; }
  .gallery.letter-thumb { max-width: 220px; }
  .rec-card { padding: 22px; }
  .rec-quote { font-size: 19px; }
  .pull-quote { margin-top: 48px; padding: 24px; }
  .num-list > li { grid-template-columns: 44px 1fr; padding: 24px 0; }
  .num-list h3 { font-size: 21px; }
  .rows > li { grid-template-columns: 1fr; }
  .rows .date { grid-column: 1; grid-row: auto; }
  .stats { grid-template-columns: 1fr; }
  .strip { gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
  .contact-block { padding: 80px 0 64px; }
  .contact-block .actions { margin-top: 56px; }
  .lightbox { padding: 64px 8px 16px; flex-wrap: wrap; align-content: center; }
  .lb-figure { order: -1; width: 100%; }
  .lb-figure img { max-height: calc(100vh - 200px); }
}

/* ---------- Readability: emphasis and labels ---------- */
em.accent, .hero h1 em, .statement em, .big-statement em { font-weight: 500; }
.chip { font-weight: 600; }

/* ---------- About: highlighted "Who I am" band ---------- */
.about-hero { background: var(--band); color: var(--band-ink); padding: 96px 0 88px; }
.about-hero .page-label { color: var(--band-accent); }
.about-hero h1 { font-family: var(--serif); font-size: clamp(34px, 4vw, 58px); font-weight: 400; line-height: 1.12; letter-spacing: -0.02em; max-width: 20ch; }
.about-hero h1 em { font-style: italic; color: var(--band-accent); font-weight: 500; }
.about-hero .lead { color: var(--band-muted); font-size: 18px; margin-top: 22px; max-width: 64ch; }
.about-hero .lead strong { color: var(--band-ink); font-weight: 600; }
.about-hero .stats { margin-top: 36px; }
.about-hero .stat { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); }
.about-hero .stat strong { color: var(--band-accent); }
.about-hero .stat span { color: var(--band-muted); }
.about-hero .subnav a { background: transparent; color: var(--band-ink); border-color: rgba(255, 255, 255, 0.3); }
.about-hero .subnav a:hover { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.about-hero .portrait-wrap::before { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }
.about-hero .hero-split { align-items: center; }

/* ---------- Crisp design philosophy with word animation ---------- */
.design-philosophy .big-statement { max-width: 26ch; }
.design-philosophy .big-statement.second { margin-top: 14px; font-size: clamp(22px, 2.3vw, 32px); color: var(--muted); max-width: 40ch; }
.animate-words .w { display: inline-block; opacity: 0; transform: translateY(0.45em); filter: blur(4px); transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease; }
.animate-words.in .w { opacity: 1; transform: none; filter: none; }
.design-philosophy .accordion { margin-top: 56px; }

/* ---------- Collapsible (accordion) lists ---------- */
.accordion > li { display: block; padding: 0; }
.accordion details summary { display: grid; grid-template-columns: 64px 1fr 32px; align-items: center; gap: 8px 16px; padding: 24px 0; cursor: pointer; list-style: none; }
.accordion details summary::-webkit-details-marker { display: none; }
.accordion details summary h3 { margin: 0; }
.accordion details summary:hover h3 { color: var(--green); }
.accordion .toggle { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--green); justify-self: end; transition: transform 0.25s, background 0.25s; }
.accordion .toggle::before, .accordion .toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--green); transform: translate(-50%, -50%); }
.accordion .toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity 0.2s; }
.accordion details[open] .toggle { background: var(--green); }
.accordion details[open] .toggle::before { background: var(--on-green); }
.accordion details[open] .toggle::after { opacity: 0; }
.accordion .detail-body { padding: 0 48px 26px 80px; animation: accordion-open 0.35s ease; }
.accordion .detail-body p { margin-top: 0; }
@keyframes accordion-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.two-col-acc { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.two-col-acc > li:nth-last-child(2) { border-bottom: 1px solid var(--line); }

/* ---------- See more for long galleries ---------- */
.gallery figure.is-hidden { display: none; }
.see-more { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--green); background: transparent; color: var(--green); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.see-more:hover { background: var(--green); color: var(--on-green); }

/* ---------- DP category cards and pages ---------- */
.work-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-card .card-desc { color: var(--muted); font-size: 15px; margin-top: 8px; }
.work-card .arrow-link { margin-top: 12px; }
.work-grid.four .work-meta { flex-direction: column; gap: 2px; }
.work-grid.four .work-meta span { text-align: left; }
.arrow-link.back { margin-bottom: 28px; }
.arrow-link.back:hover .arr { transform: translateX(-4px); }

@media (max-width: 1100px) { .work-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .two-col-acc { grid-template-columns: 1fr; }
  .two-col-acc > li:nth-last-child(2) { border-bottom: 0; }
  .about-hero { padding: 64px 0; }
}
@media (max-width: 640px) {
  .work-grid.four { grid-template-columns: 1fr; }
  .accordion details summary { grid-template-columns: 40px 1fr 30px; padding: 20px 0; }
  .accordion .detail-body { padding: 0 0 22px 56px; }
  .about-hero .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .animate-words .w { opacity: 1; transform: none; filter: none; }
}

/* Typing role line in the About band */
.role-line { font-size: clamp(20px, 2.2vw, 28px); color: var(--band-muted); margin-top: 14px; min-height: 1.5em; }
.role-line .typed { color: var(--band-ink); font-weight: 600; }
.role-line .cursor { color: var(--band-accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* About: Experience, Education, and Skills as side-by-side cards */
.card-grid { display: grid; gap: 20px; }
.card-grid > li { padding: 26px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
.card-grid > li:last-child { border-bottom: 1px solid var(--line); }
.section.cream .card-grid > li { background: var(--bg); }
.exp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.exp-grid > li { grid-template-columns: 1fr auto; }
.edu-head { margin-top: 64px; }
.edu-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.edu-grid > li { display: flex; flex-direction: column; gap: 6px; }
.edu-grid > li h3 { font-size: 18px; }
.edu-grid > li .date, .edu-grid > li .org { grid-column: auto; grid-row: auto; }
.skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.skill-grid > li { display: block; }
.skill-grid > li .num { display: block; margin-bottom: 6px; }
.skill-grid > li h3 { font-size: 21px; }
@media (max-width: 960px) {
  .exp-grid, .skill-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .card-grid > li { padding: 20px; }
}

/* MYP: two panels for lesson plans and interactive classes */
.two-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.panel { display: flex; flex-direction: column; padding: 30px 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--cream); }
.panel h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.panel-intro { color: var(--muted); margin-top: 10px; }
.panel .item-media { max-width: none; }
.panel .chips { margin-top: 16px; }
.panel .arrow-link { margin-top: 16px; }
.lp-list { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lp-slot { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 16px; border: 1.5px dashed var(--sage); background: var(--bg); min-height: 120px; }
.lp-slot h4 { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.lp-slot p { color: var(--faint); font-size: 14px; margin-top: 4px; }

/* DP: How I teach as a two-column card grid */
.two-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-grid > li { display: grid; grid-template-columns: 52px 1fr; }

@media (max-width: 960px) {
  .two-panel, .two-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .panel { padding: 22px; }
  .lp-list { grid-template-columns: 1fr; }
}

/* Other initiatives: compact two-column cards */
.hero.compact { padding: 80px 0 48px; }
.section.tight { padding: 56px 0 88px; }
.init-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.init-card { display: flex; flex-direction: column; gap: 12px; padding: 28px 30px; border-radius: 22px; background: var(--bg); border: 1px solid var(--line); scroll-margin-top: 90px; }
.init-card.wide { grid-column: 1 / -1; }
.init-card h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.init-card p { color: var(--muted); }
.init-card .arrow-link { margin-top: 4px; }
.init-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px 40px; align-items: end; margin-bottom: 8px; }
.init-head p { margin-top: 10px; }
.init-head .chips { justify-content: flex-end; }
.init-card .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.init-card .gallery figcaption { font-size: 14px; }
.init-card .see-more { align-self: flex-start; margin-top: 4px; }
.slot-row { margin-top: 6px; }
.photo-slot { display: flex; align-items: center; justify-content: center; min-height: 140px; border-radius: 16px; border: 1.5px dashed var(--sage); background: color-mix(in srgb, var(--sage-soft) 55%, transparent); color: var(--green); font-weight: 600; font-size: 15px; }
@media (max-width: 960px) {
  .init-grid { grid-template-columns: 1fr; }
  .init-head { grid-template-columns: 1fr; }
  .init-head .chips { justify-content: flex-start; }
  .init-card .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .init-card { padding: 22px; }
  .init-card .gallery { grid-template-columns: 1fr; }
}

/* ---------- Mobile-only layout (phones) ---------- */
.stat .short, .exp-toggle { display: none; }
@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .row-head { margin-bottom: 20px; }
  .muted-intro { font-size: 16px; margin-bottom: 28px; }

  /* Intro: photo first, one paragraph, stats in one row */
  .about-hero { padding: 32px 0 40px; }
  .about-hero .hero-split { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
  .about-hero .hero-split > .reveal { width: 100%; min-width: 0; }
  .row-head { flex-wrap: wrap; row-gap: 6px; }
  .about-hero .portrait-wrap { order: -1; width: 112px; max-width: 112px; justify-self: auto; }
  .about-hero .portrait-wrap::before { display: none; }
  .about-hero .portrait { border-radius: 50%; aspect-ratio: 1 / 1; border: 3px solid rgba(255, 255, 255, 0.25); }
  .about-hero h1 { font-size: 38px; }
  .about-hero .role-line { font-size: 18px; min-height: 2.9em; }
  .about-hero .lead { font-size: 16px; margin-top: 14px; }
  .about-hero .lead-more { display: none; }
  .about-hero .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
  .about-hero .stat { padding: 12px 10px; border-radius: 14px; }
  .about-hero .stat strong { font-size: 26px; }
  .stat .full { display: none; }
  .stat .short { display: block; font-size: 12px; margin-top: 6px; line-height: 1.3; }
  .subnav { flex-wrap: nowrap; overflow-x: auto; margin-top: 22px; padding-bottom: 4px; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex: 0 0 auto; }

  /* Experience: headline only, details on tap */
  .exp-grid .points { display: none; }
  .exp-grid > li.open .points { display: flex; }
  .exp-toggle { display: inline-flex; align-items: center; gap: 6px; grid-column: 1 / -1; justify-self: start; margin-top: 10px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--green); background: transparent; color: var(--green); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .exp-grid > li { padding: 18px 20px; }
  .exp-grid h3 { font-size: 19px; }

  /* Swipeable rows instead of long stacks */
  .edu-grid, .skill-grid, #teaching-areas .work-grid, .rec-grid {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%;
    gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-left: calc(-1 * var(--pad-x)); margin-right: calc(-1 * var(--pad-x));
    padding: 0 var(--pad-x) 10px; scroll-padding: 0 var(--pad-x); scrollbar-width: none;
  }
  .edu-grid::-webkit-scrollbar, .skill-grid::-webkit-scrollbar, #teaching-areas .work-grid::-webkit-scrollbar, .rec-grid::-webkit-scrollbar { display: none; }
  .edu-grid > *, .skill-grid > *, #teaching-areas .work-grid > *, .rec-grid > * { scroll-snap-align: start; }
  .edu-grid { grid-auto-columns: 62%; }
  .edu-head { margin-top: 40px; }
  .skill-grid > li { padding: 20px; }
  .rec-card { padding: 20px; }
  p.swipe-hint { display: block; font-size: 13px; font-weight: 600; color: var(--faint); margin: -8px 0 12px; }
  .letter-card { margin-top: 20px; }
}
.swipe-hint { display: none; }
