:root, html[data-theme="dark"] {
    color-scheme: dark;
    --page: #121816;
    --surface: #1b2420;
    --text: #edf3ee;
    --muted: #a2b0a7;
    --faint: #718078;
    --line: #34423a;
    --accent: #82e0b2;
    --accent-ink: #10251b;
    --image-shade: linear-gradient(180deg, transparent 55%, rgba(12, 19, 16, .82));
}

html[data-theme="light"] {
    color-scheme: light;
    --page: #f4f6f2;
    --surface: #e9eee8;
    --text: #1d2922;
    --muted: #53635a;
    --faint: #718078;
    --line: #d2dbd3;
    --accent: #087c55;
    --accent-ink: #f5fff9;
    --image-shade: linear-gradient(180deg, transparent 55%, rgba(12, 19, 16, .82));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--page); color: var(--text); font-family: "Manrope", sans-serif; font-size: 15px; line-height: 1.7; transition: background-color 220ms ease, color 220ms ease; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
figure, p, h1, h2, h3 { margin: 0; }
button { color: inherit; font: inherit; }
.mono { font-family: "DM Mono", monospace; }
.section-shell { width: min(1120px, 88%); margin-inline: auto; }

.site-header { position: sticky; z-index: 10; top: 0; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--page) 92%, transparent); padding: 0 max(6%, calc((100% - 1120px) / 2)); backdrop-filter: blur(14px); }
.wordmark { display: inline-flex; align-items: baseline; font-size: 19px; font-weight: 800; }
.brand-mark { letter-spacing: 0; }
.brand-dot { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 30px; color: var(--muted); font-size: 12px; font-weight: 600; }
.site-header nav a, .header-contact, .site-footer a { transition: color 160ms ease; }
.site-header nav a:hover, .header-contact:hover, .site-footer a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 22px; }
.theme-toggle { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: transparent; padding: 0 11px; cursor: pointer; font-size: 11px; font-weight: 700; transition: border-color 160ms ease, background-color 160ms ease; }
.theme-toggle:hover { border-color: var(--accent); background: var(--surface); }
.theme-icon { color: var(--accent); font-size: 16px; line-height: 1; }
.header-contact { font-size: 12px; font-weight: 700; }
.header-contact span { padding-left: 4px; color: var(--accent); }

.hero { display: grid; min-height: 620px; grid-template-columns: 1fr 0.92fr; align-items: center; gap: 8%; padding-top: 65px; padding-bottom: 80px; }
.hero-copy { max-width: 590px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.eyebrow-divider { color: var(--faint); }
h1, h2 { font-weight: 700; letter-spacing: 0; line-height: 1.12; }
h1 { margin-top: 25px; font-size: 58px; }
h1 > span { color: var(--accent); }
.intro { max-width: 510px; margin-top: 24px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--line); border-radius: 4px; padding: 0 16px; font-size: 12px; font-weight: 800; transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: transparent; color: var(--accent); }
.button-quiet:hover { border-color: var(--accent); }
.hero-caption { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 42px; color: var(--faint); font-size: 11px; }
.hero-caption .mono { color: var(--accent); font-size: 10px; }
.hero-visual { position: relative; padding: 0 0 25px 25px; }
.hero-visual::before { position: absolute; top: -18px; right: -18px; width: 48%; height: 60%; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); content: ""; opacity: .7; }
.hero-image { position: relative; overflow: hidden; aspect-ratio: 1.12; background: var(--surface); }
.hero-image::after { position: absolute; inset: 30% 0 0; background: var(--image-shade); content: ""; }
.image-overlay { position: absolute; z-index: 1; right: 22px; bottom: 20px; left: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #f4faf5; font-size: 9px; }
.image-overlay .mono { letter-spacing: 1px; }
.availability { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.availability .status-dot { width: 7px; height: 7px; box-shadow: none; }
.visual-index { position: absolute; right: 2px; bottom: 0; color: var(--faint); font-size: 9px; }

.content-section { padding-top: 90px; padding-bottom: 100px; }
.section-heading { max-width: 650px; }
.section-heading .eyebrow { margin-bottom: 17px; }
.section-heading .eyebrow .mono { color: var(--accent); }
.section-heading h2, .contact-inner h2 { font-size: 38px; }
.section-heading > p:last-child { margin-top: 14px; color: var(--muted); font-size: 14px; }
.career-layout { display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: 9%; margin-top: 44px; }
.timeline { border-top: 1px solid var(--line); }
.timeline-entry { display: grid; grid-template-columns: 140px 1fr; gap: 20px; border-bottom: 1px solid var(--line); padding: 23px 0 25px; }
.timeline-period { padding-top: 4px; color: var(--accent); font-size: 10px; }
.timeline-entry h3 { font-size: 17px; font-weight: 700; line-height: 1.4; }
.timeline-entry p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.timeline-entry .entry-place { margin-top: 4px; color: var(--faint); }
.timeline-entry p:not(.entry-place) { margin-top: 10px; }
.entry-type { display: inline-block; margin-top: 11px; color: var(--faint); font-family: "DM Mono", monospace; font-size: 9px; }
.section-image { overflow: hidden; background: var(--surface); }
.section-image img { aspect-ratio: 1.42; transition: transform 350ms ease; }
.section-image:hover img { transform: scale(1.025); }
.career-image { margin-top: 15px; }
.career-image img { aspect-ratio: .95; }
.career-image figcaption { padding: 12px 14px; color: var(--muted); font-size: 9px; }

.expertise-section { background: var(--surface); }
.expertise-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10%; padding-top: 92px; padding-bottom: 100px; }
.expertise-layout .section-heading h2 { max-width: 350px; }
.expertise-content { border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 170px 1fr; gap: 20px; border-bottom: 1px solid var(--line); padding: 21px 0; }
.skill-row h3 { padding-top: 6px; font-size: 12px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-list span { border: 1px solid var(--line); border-radius: 4px; padding: 5px 9px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.expertise-image { margin-top: 24px; }
.expertise-image img { aspect-ratio: 2.1; }

.interest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 38px; }
.interest-item .section-image { margin-bottom: 19px; }
.interest-item .eyebrow { font-size: 9px; }
.interest-item .eyebrow .mono { color: var(--accent); }
.interest-item h3 { margin-top: 11px; font-size: 18px; line-height: 1.4; }
.interest-item > p:last-child { max-width: 330px; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.8; }

.contact-section { border-top: 1px solid var(--line); background: var(--surface); }
.contact-inner { display: grid; grid-template-columns: 1fr .85fr; align-items: start; gap: 10%; padding-top: 76px; padding-bottom: 82px; }
.contact-inner .eyebrow { margin-bottom: 16px; }
.contact-inner .eyebrow .mono { color: var(--accent); }
.contact-inner h2 { max-width: 450px; }
.contact-links { border-top: 1px solid var(--line); }
.contact-links a { display: grid; grid-template-columns: 75px 1fr 20px; align-items: center; gap: 12px; min-height: 61px; border-bottom: 1px solid var(--line); font-size: 11px; }
.contact-links a > span:first-child { color: var(--faint); }
.contact-links strong { overflow-wrap: anywhere; font-weight: 700; }
.contact-links a > span:last-child { color: var(--accent); font-size: 15px; }
.welcome-dialog { position: fixed; width: min(940px, calc(100% - 36px)); max-width: none; max-height: min(720px, calc(100% - 36px)); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--page); color: var(--text); padding: 28px; box-shadow: 0 24px 90px rgb(0 0 0 / 42%); }
.welcome-dialog::backdrop { background: rgb(5 10 8 / 76%); backdrop-filter: blur(5px); }
.welcome-layout { display: grid; min-height: 360px; grid-template-columns: minmax(0, .8fr) minmax(220px, 1.2fr); align-items: stretch; gap: 24px; }
.welcome-layout.has-personal-image { grid-template-columns: minmax(0, .8fr) minmax(220px, 1fr) minmax(0, .8fr); }
.welcome-panel { position: relative; min-height: 340px; overflow: hidden; background: var(--surface); }
.welcome-panel[hidden] { display: none; }
.welcome-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; }
.welcome-greeting::after, .welcome-personal::after { position: absolute; inset: 35% 0 0; background: linear-gradient(180deg, transparent, rgb(8 14 11 / 82%)); content: ""; }
.welcome-panel figcaption { position: absolute; z-index: 1; right: 14px; bottom: 14px; left: 14px; color: #f3f8f4; font-size: 9px; }
.welcome-copy { align-self: center; padding: 18px 0; }
.welcome-copy h2 { margin-top: 20px; font-size: 32px; }
.welcome-copy > p:last-child { margin-top: 15px; color: var(--muted); font-size: 14px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.welcome-close { display: flex; min-height: 38px; align-items: center; gap: 11px; margin: 22px 0 0 auto; border: 1px solid var(--line); border-radius: 4px; background: transparent; padding: 0 12px; cursor: pointer; font-size: 11px; font-weight: 700; }
.welcome-close:hover { border-color: var(--accent); color: var(--accent); }
.welcome-close span { font-size: 17px; }
.login-page { display: grid; min-height: calc(100vh - 152px); place-items: center; padding: 64px 6%; }
.login-panel { width: min(440px, 100%); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 34px; }
.login-panel .eyebrow { margin-bottom: 15px; }
.login-panel h1 { margin: 0; font-size: 34px; }
.login-description { margin-top: 12px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 16px; margin-top: 28px; }
.login-field { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.login-field input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--page); color: var(--text); padding: 0 12px; font: inherit; font-size: 13px; }
.login-field input:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.login-submit { min-height: 44px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--accent-ink); cursor: not-allowed; font: inherit; font-size: 12px; font-weight: 800; opacity: .7; }
.login-notice { margin-top: 18px; border-left: 2px solid var(--accent); padding-left: 11px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.login-back { display: inline-flex; margin-top: 22px; color: var(--accent); font-size: 11px; font-weight: 700; }
.site-footer { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px max(6%, calc((100% - 1120px) / 2)); color: var(--faint); font-size: 10px; }
.site-footer p .mono { padding: 0 6px; color: var(--accent); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

@media (max-width: 800px) {
    .site-header { min-height: 70px; gap: 15px; padding-inline: 5%; }
    .site-header nav { gap: 17px; font-size: 11px; }
    .header-actions { gap: 12px; }
    .header-contact { display: none; }
    .hero { min-height: 0; grid-template-columns: 1fr 0.82fr; gap: 5%; padding-top: 65px; padding-bottom: 70px; }
    h1 { font-size: 44px; }
    .intro { font-size: 13px; }
    .hero-caption { margin-top: 28px; }
    .hero-visual { padding-left: 14px; }
    .image-overlay { right: 12px; bottom: 12px; left: 12px; align-items: flex-start; flex-direction: column; }
    .career-layout { grid-template-columns: 1fr .75fr; gap: 5%; }
    .timeline-entry { grid-template-columns: 108px 1fr; gap: 12px; }
    .expertise-layout { grid-template-columns: .75fr 1.25fr; gap: 6%; }
    .skill-row { grid-template-columns: 130px 1fr; }
}

@media (max-width: 600px) {
    html { scroll-padding-top: 115px; }
    .site-header { min-height: 98px; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; padding-top: 12px; padding-bottom: 9px; }
    .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: 8px; padding-top: 8px; }
    .header-actions { margin-left: auto; }
    .theme-toggle { min-height: 34px; padding-inline: 9px; }
    .hero { grid-template-columns: 1fr; gap: 35px; padding-top: 58px; padding-bottom: 70px; }
    h1 { font-size: 34px; }
    .hero-visual { width: 88%; justify-self: center; }
    .hero-image { aspect-ratio: 1.2; }
    .content-section { padding-top: 68px; padding-bottom: 74px; }
    .section-heading h2, .contact-inner h2 { font-size: 31px; }
    .career-layout { grid-template-columns: 1fr; gap: 28px; margin-top: 30px; }
    .career-image img { aspect-ratio: 1.7; }
    .timeline-entry { grid-template-columns: 105px 1fr; gap: 12px; padding-block: 19px; }
    .timeline-entry h3 { font-size: 15px; }
    .expertise-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 68px; padding-bottom: 74px; }
    .expertise-layout .section-heading h2 { max-width: none; }
    .skill-row { grid-template-columns: 1fr; gap: 10px; }
    .interest-grid { grid-template-columns: 1fr; gap: 34px; }
    .interest-item .section-image img { aspect-ratio: 1.7; }
    .contact-inner { grid-template-columns: 1fr; gap: 30px; padding-top: 65px; padding-bottom: 70px; }
    .welcome-dialog { padding: 18px; }
    .welcome-layout, .welcome-layout.has-personal-image { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .welcome-greeting { min-height: 145px; }
    .welcome-greeting .welcome-photo { object-fit: contain; object-position: center; }
    .welcome-personal { min-height: 145px; }
    .welcome-copy { grid-column: auto; grid-row: auto; padding: 8px 0; }
    .welcome-copy h2 { font-size: 27px; }
    .welcome-copy > p:last-child { font-size: 13px; }
    .welcome-close { margin-top: 15px; }
    .login-page { min-height: calc(100vh - 168px); padding: 40px 6%; }
    .login-panel { padding: 26px 22px; }
    .site-footer { min-height: 70px; }
    .site-footer p { display: none; }
}