:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #f3f0ef;
  --ink: #161315;
  --muted: #51484b;
  --accent: #d12632;
  --accent-strong: #b91f2a;
  --button-ink: #fff;
  --rule: rgb(22 19 21 / 22%);
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5.1vw, 5.75rem);
  --content-width: 80rem;
  --section-space: clamp(3.25rem, 5.8vw, 5.25rem);
  --group-space: clamp(1.75rem, 3.4vw, 3rem);
  --card-gap: clamp(.875rem, 1.6vw, 1.25rem);
  --header-height: 5.5rem;
  --ease: cubic-bezier(.2,.75,.25,1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1b2a;
  --surface: #1b263b;
  --ink: #f6f3f6;
  --muted: #c5b9c4;
  --accent: #f15d67;
  --accent-strong: #d12632;
  --button-ink: #fff;
  --rule: rgb(246 243 246 / 30%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; background: var(--bg); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background-color 240ms ease, color 240ms ease; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; z-index: 20; top: .75rem; left: .75rem; transform: translateY(-160%); padding: .7rem 1rem; color: #fff; background: var(--accent-strong); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: var(--header-height); padding: .75rem var(--gutter); border-bottom: 1px solid var(--rule); background: var(--bg); }
.wordmark { grid-column: 1; justify-self: start; display: flex; align-items: center; min-height: 2.75rem; width: fit-content; font: 700 1.5rem/.9 var(--font-display); letter-spacing: -.08em; text-decoration: none; }
.wordmark span, .accent-dot { color: var(--accent); }
.desktop-nav { grid-column: 2; display: flex; justify-content: center; gap: clamp(1.2rem, 3vw, 2.75rem); }
.desktop-nav a, .theme-toggle { font: 600 .83rem var(--font-body); text-decoration: none; }
.desktop-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.desktop-nav a { color: var(--muted); transition: color 180ms ease; }
.desktop-nav a:hover, .desktop-nav a[aria-current="location"] { color: var(--ink); }
.header-actions { grid-column: 3; grid-row: 1; display: flex; justify-self: end; align-items: center; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 2.75rem; min-height: 2.75rem; padding: .45rem .25rem; border: 0; color: var(--ink); background: transparent; cursor: pointer; }
.theme-mark { width: .9rem; height: .9rem; border: 1.5px solid var(--accent); border-radius: 50%; background: var(--accent); box-shadow: inset -.3rem -.08rem 0 var(--bg); }
.hero { overflow: clip; padding: 0 var(--gutter); }
.hero-stage { position: relative; min-height: clamp(32rem, calc(100svh - var(--header-height)), 56rem); overflow: visible; isolation: isolate; border-bottom: 1px solid var(--rule); }
.hero-word { position: absolute; z-index: 0; top: 0; left: 0; display: flex; align-items: center; justify-content: space-between; width: 100%; padding-inline: 0; margin: 0; color: var(--accent); font: 700 clamp(2.5rem, 14vw, 12rem)/.86 var(--font-display); letter-spacing: -.045em; white-space: nowrap; opacity: 1; animation: word-arrive 850ms var(--ease) both; }
.hero-word span { display: block; flex: 0 0 auto; }
.portrait-field { position: absolute; z-index: -1; bottom: 1rem; right: calc(1% - min(2.5vw, 2rem)); width: min(31vw, 25rem); aspect-ratio: 1; border-radius: 50%; background: var(--accent); animation: field-arrive 850ms 100ms var(--ease) both, field-breath 12s 1s ease-in-out infinite alternate; }
.portrait { position: absolute; z-index: 1; right: 1%; bottom: 1rem; width: min(26vw, 21rem); height: auto; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 1.2rem 1.5rem rgb(25 14 24 / 12%)); animation: portrait-arrive 900ms 120ms var(--ease) both; }
.hero-copy { position: absolute; z-index: 2; top: clamp(10.5rem, 28%, 18rem); left: 0; width: min(55%, 58rem); }
.hero-copy h1 { margin: 0; font: 700 clamp(1.7rem, 4.3vw, 3.6rem)/1.05 var(--font-display); letter-spacing: -.045em; white-space: nowrap; }
.descriptor { max-width: 29rem; margin: 1.2rem 0 .75rem; font: 600 clamp(1.08rem, 1.55vw, 1.38rem)/1.34 var(--font-display); letter-spacing: -.025em; }
.intro-copy { max-width: 38ch; margin: 0; color: var(--muted); font-size: clamp(.9rem, 1vw, 1rem); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 3rem; padding: .75rem 1rem; font-size: .84rem; font-weight: 700; text-decoration: none; }
.button-primary { color: var(--button-ink); background: var(--accent-strong); transition: transform 180ms var(--ease), background-color 180ms ease; }
.button-primary:hover { transform: translateY(-2px); background: var(--accent); }
.button-primary span { font-size: 1rem; }
.text-link { display: inline-flex; gap: .65rem; align-items: center; min-height: 2.8rem; font-size: .84rem; font-weight: 700; text-decoration: none; }
.text-link span, .contact-link span { color: var(--accent); transition: transform 180ms var(--ease); }
.text-link:hover span, .contact-link:hover span { transform: translate(2px, -2px); }
.scroll-cue { position: absolute; bottom: 1.3rem; left: 0; display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .75rem; text-decoration: none; }
.scroll-line { position: relative; width: 2rem; height: 1px; background: var(--rule); overflow: hidden; }
.scroll-line::after { position: absolute; inset: 0; content: ""; background: var(--accent); animation: cue-line 1.8s ease-in-out infinite; transform-origin: left; }

.work-section { padding: var(--section-space) var(--gutter); background: var(--surface); }
.work-section > * { width: min(100%, var(--content-width)); margin-inline: auto; }
h2 { margin: 0; font: 600 clamp(1.8rem, 3.4vw, 3.2rem)/1.05 var(--font-display); letter-spacing: -.055em; }
.work-statement { max-width: none; margin: 0; font: 600 clamp(2rem, 3.2vw, 3.4rem)/1.08 var(--font-display); letter-spacing: -.035em; }
.work-subsections { margin-top: var(--group-space); }
.work-subsection { padding: clamp(1.25rem, 2.6vw, 2rem) 0; border-top: 1px solid var(--rule); }
.subsection-heading, .certification-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 1rem; }
.subsection-heading h3 { margin: 0; font: 600 clamp(1.3rem, 2vw, 1.9rem)/1.1 var(--font-display); letter-spacing: -.035em; }
.view-all, .work-action { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-size: .84rem; font-weight: 700; text-decoration: none; }
.view-all span, .work-action span { color: var(--accent-strong); transition: transform 180ms var(--ease); }
.view-all:hover span, .work-action:hover span { transform: translate(2px, -2px); }
.work-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: var(--card-gap); }
.article-cards .work-card { display: flex; height: 100%; flex-direction: column; gap: 0; padding: .65rem; }
.work-card { display: flex; min-width: 0; height: 100%; flex-direction: column; padding: .65rem; border: 1px solid var(--rule); color: var(--ink); transition: border-color 180ms ease, background-color 180ms ease; }
.work-card:hover, .work-card:focus-within { border-color: var(--accent-strong); background: color-mix(in srgb, var(--bg) 45%, transparent); }
.work-card-primary { display: flex; flex: 1; flex-direction: column; color: inherit; text-decoration: none; }
.work-card-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.work-card-image { position: relative; display: block; overflow: hidden; background: #e9e5e1; }
.work-card-image img { display: block; width: 100%; aspect-ratio: 1.42; object-fit: cover; transition: transform 420ms var(--ease); }
.work-date { position: absolute; top: .6rem; right: .6rem; padding: .3rem .5rem; color: #fff; background: rgb(22 19 21 / 86%); font-size: .75rem; font-weight: 600; line-height: 1.2; }
.work-card:hover .work-card-image img, .work-card:focus-within .work-card-image img { transform: scale(1.025); }
.work-card-copy { display: flex; justify-content: space-between; align-items: flex-start; flex-direction: column; gap: .8rem; padding: 1rem; }
.article-cards .work-card-copy { flex: 1; justify-content: space-between; gap: .75rem; padding: 1rem .5rem .35rem; }
.work-kind { margin: 0 0 .55rem; color: var(--muted); font-size: .75rem; }
.work-kind span { color: var(--accent-strong); }
.work-title { display: block; max-width: 25ch; font: 600 clamp(1.1rem, 1.5vw, 1.45rem)/1.2 var(--font-display); letter-spacing: -.025em; }
.work-description { display: block; max-width: 48ch; margin: .4rem .5rem .35rem; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.inline-content-link { color: var(--accent-strong); text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.work-action { flex: 0 0 auto; min-height: 2.75rem; }

.certification-section { padding: var(--section-space) var(--gutter); border-bottom: 1px solid var(--rule); }
.certification-section > * { width: min(100%, var(--content-width)); margin-inline: auto; }
.certification-heading h2 { font-size: clamp(1.8rem, 3.4vw, 3.2rem); }
.credential-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: var(--card-gap); }
.credential-card { display: flex; min-width: 0; flex-direction: column; padding: .65rem; border: 1px solid var(--rule); }
.credential-preview { position: relative; display: block; overflow: hidden; background: var(--surface); }
.credential-preview img { display: block; width: 100%; aspect-ratio: 420 / 297; object-fit: cover; }
.credential-preview > span { position: absolute; right: .5rem; bottom: .5rem; padding: .3rem .45rem; color: #fff; background: rgb(22 19 21 / 88%); font-size: .75rem; }
.credential-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.credential-copy h3 { margin: 0 0 .65rem; font: 600 clamp(1rem, 1.5vw, 1.3rem)/1.2 var(--font-display); }
.credential-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1rem .45rem .5rem; }
.credential-copy p { margin: 0 0 .35rem; color: var(--muted); font-size: .875rem; }
.credential-link { margin-top: auto; padding-top: .6rem; color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: .2em; }
.credential-empty { grid-column: 1 / -1; margin: 0; padding: 1.25rem; border: 1px solid var(--rule); color: var(--muted); }

.contact-section { display: grid; grid-template-columns: 1fr; gap: 1.4rem; padding: var(--section-space) var(--gutter); }
.contact-section > * { width: min(100%, var(--content-width)); margin-inline: auto; }
.contact-section h2 { font-size: clamp(2.5rem, 6vw, 5rem); line-height: .98; }
.social-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.social-card { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; flex: 1 1 8.5rem; align-items: center; gap: .7rem; min-width: 0; max-width: 14rem; min-height: 3.75rem; overflow: hidden; padding: .65rem .75rem; border: 1px solid var(--rule); border-radius: .65rem; color: var(--ink); background: var(--bg); text-align: left; text-decoration: none; font: 600 .9rem/1.2 var(--font-body); transition: border-color 180ms ease, background-color 180ms ease, transform 180ms var(--ease); }
.social-card:hover:not(:disabled), .social-card:focus-visible { border-color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); transform: translateY(-2px); }
.social-card:active:not(:disabled) { transform: translateY(0) scale(.985); }
.social-card:disabled { opacity: 1; cursor: not-allowed; }
.social-name { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.social-arrow { color: var(--accent-strong); }
.social-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .4rem; color: #fff; font: 700 .9rem/1 var(--font-body); }
.social-mark svg { display: block; width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.social-linkedin { background: #0a66c2; font-size: .82rem; letter-spacing: -.07em; }
.social-facebook { background: #0866ff; font: 700 1.35rem/.95 var(--font-body); }
.social-instagram { background: #c13584; }
.social-instagram .social-icon-dot { fill: currentColor; stroke: none; }
.social-substack { background: #ff6719; font: 700 1.3rem/.9 Georgia, serif; }
.social-behance { background: #1769ff; font-size: .82rem; letter-spacing: -.08em; }
.social-gmail { color: #d93025; background: #fff; border: 1px solid var(--rule); }
.about-section { display: block; padding: var(--section-space) var(--gutter); background: var(--surface); }
.about-inner { width: min(100%, var(--content-width)); margin-inline: auto; }
.about-inner > h2 { font-size: clamp(2rem, 4vw, 3.8rem); }
.about-copy { display: grid; width: 100%; gap: 1rem; margin-top: 1.4rem; color: var(--muted); }
.about-copy p { margin: 0; text-align: justify; }
.about-details { display: flex; flex-direction: column; gap: clamp(1.75rem, 3.5vw, 2.75rem); margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.about-group h3 { margin: 0 0 .9rem; font: 600 clamp(1.2rem, 2vw, 1.6rem)/1.1 var(--font-display); }
.timeline-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.timeline-card { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); align-items: center; gap: 1rem; min-height: 6.25rem; padding: .8rem 1.1rem; border: 1px solid var(--rule); border-radius: .65rem; background: var(--bg); transition: border-color 180ms ease, transform 180ms var(--ease); }
.timeline-card:hover { border-color: var(--accent-strong); transform: translateX(3px); }
.timeline-mark { display: grid; width: 3.25rem; height: 3.25rem; place-items: center; overflow: hidden; border: 1px solid var(--rule); border-radius: .4rem; color: var(--accent-strong); background: #fff; font: 700 .78rem/1 var(--font-display); letter-spacing: .04em; }
.timeline-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.timeline-card h4 { margin: 0 0 .25rem; font: 600 1rem/1.2 var(--font-display); }
.timeline-card p, .timeline-card time { display: block; margin: 0; color: var(--muted); font-size: .82rem; }
.timeline-period { margin-top: .1rem !important; }
.timeline-period time { display: inline; }
.site-footer { display: flex; width: min(calc(100% - 2 * var(--gutter)), var(--content-width)); align-items: center; justify-content: space-between; gap: 1.5rem; margin-inline: auto; padding: 1.5rem 0 2rem; }
.footer-name { font: 600 1rem var(--font-display); text-decoration: none; }
.site-footer p, .back-top, .editor-link { margin: 0; color: var(--muted); font-size: .75rem; text-decoration: none; }
.editor-link { font-size: .68rem; transition: color 180ms var(--ease); }
.editor-link:hover, .editor-link:focus-visible { color: var(--ink); }

@keyframes word-arrive { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes field-arrive { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes field-breath { from { filter: brightness(1); } to { filter: brightness(1.08); } }
@keyframes portrait-arrive { from { opacity: .2; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes cue-line { 0%, 100% { transform: scaleX(.25); } 55% { transform: scaleX(1); } }

@media (min-width: 1450px) { .hero-stage { max-width: 96rem; margin-inline: auto; } }
@media (max-width: 900px) {
  :root { --header-height: 5rem; }
  .hero-stage { min-height: clamp(32rem, calc(100svh - var(--header-height)), 56rem); }
  .hero-word { top: 8%; font-size: clamp(3rem, 14vw, 7rem); }
  .article-cards, .credential-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait-field { top: auto; bottom: 1rem; right: calc(1% - 3vw); width: min(34vw, 25rem); }
  .portrait { right: 1%; bottom: 1rem; width: min(28vw, 21rem); height: auto; }
  .hero-copy { top: clamp(10.5rem, 28%, 18rem); width: 50%; }
  .hero-copy h1 { font-size: clamp(1.45rem, 3.8vw, 2.3rem); }
  .portrait-note { right: 1%; bottom: 11%; width: 8rem; }
}
@media (max-width: 620px) {
  :root { --gutter: 1.2rem; --header-height: 4.6rem; }
  .site-header { grid-template-columns: 1fr 1fr 1fr; gap: .1rem; padding: .4rem var(--gutter); }
  .desktop-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: clamp(1.5rem, 9vw, 3rem); padding: 0; }
  .desktop-nav a { min-height: 2.1rem; }
  .header-actions { grid-column: 3; justify-self: end; gap: .8rem; }
  .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .header-cta { padding: .58rem .65rem; font-size: .75rem; }
  .hero-stage { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "word" "portrait" "copy"; align-content: start; row-gap: .7rem; min-height: 0; padding: 1rem 0 3rem; }
  .hero-word { position: relative; top: auto; left: auto; grid-area: word; font-size: clamp(2.5rem, 15vw, 4.25rem); }
  .portrait-field { position: relative; top: auto; right: auto; bottom: auto; left: auto; grid-area: portrait; justify-self: center; align-self: center; width: min(92%, 24.5rem); margin: 0; z-index: 0; }
  .portrait { position: relative; top: auto; right: auto; bottom: auto; left: auto; grid-area: portrait; justify-self: center; align-self: end; width: min(87%, 23rem); height: auto; margin: 0; object-position: center top; }
  .hero-copy { position: relative; top: auto; bottom: auto; grid-area: copy; width: 100%; margin-top: .2rem; }
  .hero-copy h1 { font-size: clamp(1.2rem, 6.4vw, 2.15rem); }
  .descriptor { max-width: 27rem; margin: .8rem 0 .45rem; font-size: 1.05rem; }
  .intro-copy { max-width: 42ch; font-size: .875rem; line-height: 1.5; }
  .hero-actions { gap: 1rem; margin-top: 1rem; }
  .button { min-height: 2.75rem; padding: .45rem .55rem; font-size: .73rem; gap: .55rem; }
  .text-link { min-height: 2.75rem; font-size: .75rem; gap: .4rem; }
  .portrait-note { display: none; }
  .scroll-cue { bottom: .85rem; }
  .work-statement { font-size: clamp(2rem, 8vw, 3rem); }
  .subsection-heading, .certification-heading { margin-bottom: .9rem; }
  .work-cards, .article-cards, .credential-list { grid-template-columns: 1fr; gap: 1rem; }
  .work-card { grid-template-columns: 1fr; gap: 0; }
  .work-card-image img { aspect-ratio: 1.35; }
  .work-card-copy { align-items: flex-start; padding: .9rem .4rem .2rem; }
  .work-title { font-size: 1.2rem; }
  .credential-copy p, .credential-link { font-size: .75rem; }
  .contact-section { grid-template-columns: 1fr; gap: 1.1rem; }
  .contact-section h2 { font-size: clamp(2.5rem, 11.5vw, 4rem); }
  .social-links { gap: .6rem; }
  .social-card { grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .55rem; min-height: 3.75rem; padding: .6rem; }
  .social-mark { width: 1.8rem; height: 1.8rem; }
  .social-name { font-size: .86rem; }
  .timeline-card { grid-template-columns: 2.8rem minmax(0, 1fr); gap: .8rem; padding: .85rem; }
  .timeline-mark { width: 2.6rem; height: 2.6rem; }
  .site-footer { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
  .site-footer p { grid-row: 2; }
  .back-top { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}
@media (max-width: 380px) {
  .hero-actions { gap: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
