* { box-sizing: border-box; }
:root { color-scheme: light; --paper: #f7f7f2; --ink: #242b26; --muted: #666d65; --line: #dddfd6; --accent: #4d614b; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Segoe UI', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 2px; }
a:hover { color: var(--accent); }
::selection { background: #d9e2cc; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 20; padding: 14px 20px; background: var(--ink); color: white; }
.skip-link:focus { top: 20px; }
.site-header { max-width: 1440px; margin: auto; min-height: 100px; padding: 22px 5.6%; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 34px; font-weight: 750; letter-spacing: -3px; line-height: 1; }
.wordmark span { color: var(--accent); }
nav { display: flex; gap: 34px; font-size: 14px; }
.header-tools { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.version-link { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; transition: background 180ms; }
.version-link:hover { background: #e9ede2; }
.version-link span { margin-left: 8px; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
main, footer { max-width: 1280px; margin: auto; padding: 0 40px; }
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 9%; align-items: center; padding: 88px 0 78px; }
.availability { display: flex; gap: 9px; align-items: center; color: var(--accent); font-size: 12px; margin: 0 0 38px; }
.availability > span { width: 7px; height: 7px; border-radius: 50%; background: #6c8552; box-shadow: 0 0 0 4px #6c855215; }
.intro-name { font-size: 16px; margin: 0 0 20px; }
h1 { margin: 0; font-size: clamp(48px, 5.3vw, 78px); line-height: 1.04; letter-spacing: -3.5px; font-weight: 500; }
h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--accent); letter-spacing: -3px; }
.hero-description { max-width: 440px; margin: 28px 0; font-size: 17px; line-height: 1.75; color: var(--muted); }
.hero-actions { display: flex; align-items: center; gap: 30px; margin: 32px 0; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 36px; padding: 16px 23px; border-radius: 5px; font-size: 14px; }
.primary { color: white; background: var(--ink); transition: background 180ms; }
.primary:hover { color: white; background: var(--accent); }
.text-link { display: inline-flex; gap: 18px; align-items: center; font-size: 14px; border-bottom: 1px solid #a9b1a5; padding-bottom: 5px; }
.location { color: var(--muted); font-size: 11px; margin: 37px 0 0; }
.location span { margin: 0 9px; }
.portrait { margin: 0; padding: 16px 16px 0; background: #e8ebdf; border-radius: 8px; transform: rotate(2deg); }
.portrait img { display: block; width: 100%; height: 450px; object-fit: cover; object-position: 50% 35%; border-radius: 3px; filter: saturate(.7); }
.portrait figcaption { display: flex; justify-content: space-between; padding: 20px 2px; gap: 10px; font-size: 11px; color: #596451; }
.portrait figcaption > :last-child { font-size: 20px; }
.expertise-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.expertise-strip > span { color: var(--muted); }
.expertise-strip p { margin: 0; font-weight: 500; }
.expertise-strip b { margin: 0 13px; color: #9ca78f; font-weight: 400; }
.work-section { padding: 100px 0 88px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.eyebrow { font-size: 11px; font-weight: 500; color: var(--accent); letter-spacing: 1.4px; text-transform: uppercase; margin: 0 0 22px; }
h2 { font-size: clamp(30px, 3.1vw, 44px); font-weight: 450; line-height: 1.16; letter-spacing: -1.5px; margin: 0; }
.section-heading > p { font-size: 13px; line-height: 1.8; margin: 0; color: var(--muted); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 55px 32px; }
.project-image { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 1.65; background: #e2e8db; }
.project-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms; }
.project:hover .project-image img { transform: scale(1.025); }
.project-state { position: absolute; top: 16px; left: 16px; background: #f7f7f2f2; font-size: 10px; border: 1px solid #ffffff60; border-radius: 999px; padding: 7px 11px; }
.project-topline { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; margin: 22px 0 11px; }
h3 { font-size: 23px; font-weight: 500; letter-spacing: -.6px; margin: 0 0 12px; }
.project > p { color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 490px; margin: 0 0 19px; }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); font-size: 12px; }
summary::-webkit-details-marker { display: none; }
summary span { font-size: 21px; line-height: 1; transition: transform 180ms; }
details[open] summary span { transform: rotate(45deg); }
.project-detail { font-size: 13px; line-height: 1.8; color: var(--muted); padding-bottom: 8px; }
.detail-label { color: var(--accent); font-size: 11px; }
.work-note { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; margin: 35px 0 0; }
.work-note a { color: var(--ink); }
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 12%; padding: 80px 0 100px; border-top: 1px solid var(--line); }
.about-copy > p:not(.eyebrow) { font-size: 15px; line-height: 1.9; color: var(--muted); margin: 25px 0; }
.about-copy .text-link { margin-top: 8px; }
.education { border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.education .eyebrow, .skills .eyebrow { margin-bottom: 20px; }
.education > p:not(.eyebrow) { font-size: 14px; line-height: 1.7; color: var(--muted); }
.education-meta { display: flex; justify-content: space-between; font-size: 12px; margin: 20px 0; }
.education-meta small { color: var(--muted); }
.small { font-size: 11px; }
.skills { padding-top: 28px; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; margin-top: 17px; font-size: 12px; line-height: 1.7; }
dt { color: var(--ink); } dd { margin: 0; color: var(--muted); }
.contact-section { background: #e9ede2; margin: 0 -40px; padding: 58px 40px 65px; border-radius: 8px; }
.contact-layout { display: grid; grid-template-columns: 1fr 240px; gap: 60px; align-items: end; }
.contact-layout p { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 24px 0; }
.contact-email { display: inline-flex; gap: 20px; font-size: clamp(14px, 1.6vw, 20px); border-bottom: 1px solid #aab69d; padding-bottom: 7px; }
.contact-links { display: grid; }
.contact-links a { display: flex; justify-content: space-between; border-bottom: 1px solid #cfd7c4; padding: 17px 0; font-size: 13px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 10px; padding-top: 35px; padding-bottom: 35px; }
footer p { margin: 0; }
@media (min-width: 1500px) { .site-header { padding-left: 80px; padding-right: 80px; } }
@media (max-width: 1000px) { .header-tools { gap: 12px; } .clock { display: none; } .hero { gap: 6%; padding-top: 70px; } .portrait img { height: 390px; } h1 { font-size: 58px; } .about-section { gap: 7%; } }
@media (max-width: 720px) {
  html { scroll-padding-top: 25px; }
  .site-header { padding: 22px 24px; flex-wrap: wrap; gap: 20px; min-height: auto; }
  .wordmark { margin-right: auto; }
  .header-tools { order: 2; } nav { order: 3; width: 100%; gap: 30px; font-size: 12px; }
  main, footer { padding-left: 24px; padding-right: 24px; }
  .hero { grid-template-columns: 1fr; padding: 50px 0; gap: 40px; }
  h1 { font-size: clamp(48px, 10vw, 68px); letter-spacing: -2.6px; }
  .availability { margin-bottom: 30px; font-size: 11px; }
  .hero-description { font-size: 16px; }
  .portrait { max-width: 440px; width: 92%; margin: auto; transform: rotate(1deg); }
  .portrait img { height: 360px; object-position: 50% 28%; }
  .expertise-strip { flex-direction: column; align-items: flex-start; gap: 16px; line-height: 1.8; }
  .expertise-strip b { margin: 0 8px; }
  .work-section { padding: 60px 0; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 22px; margin-bottom: 30px; }
  .project-grid { grid-template-columns: 1fr; gap: 36px; }
  .work-note { flex-direction: column; gap: 12px; line-height: 1.7; }
  .about-section { grid-template-columns: 1fr; padding: 55px 0 65px; gap: 42px; }
  .contact-section { margin: 0; padding: 32px 22px; }
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .contact-layout h2 { font-size: 31px; }
  .contact-email { font-size: 13px; gap: 8px; overflow-wrap: anywhere; }
  footer { flex-wrap: wrap; line-height: 1.8; padding-top: 28px; padding-bottom: 28px; }
  footer p { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* Quiet graphics notes live only in the unused desktop gutters. */
.geometry-rail { position: absolute; top: 120px; width: min(180px, calc((100vw - 1200px) / 2 - 32px)); display: grid; justify-items: center; gap: 30px; color: #7c8c71; opacity: .55; pointer-events: none; user-select: none; font-family: Consolas, 'Courier New', monospace; z-index: 0; }
.geometry-rail-left { left: calc(16px - (100vw - 1200px) / 2); }
.geometry-rail-right { right: calc(16px - (100vw - 1200px) / 2); }
.geometry-caption { font-size: 8px; letter-spacing: 1.1px; }
.geometry-rail canvas { display: block; width: 100%; height: 150px; }
.matrix-block { text-align: center; animation: matrix-drift 12s ease-in-out infinite; }
.geometry-rail-right .matrix-block { animation-delay: -5s; }
.matrix-block > span { display: block; font-size: 8px; letter-spacing: .6px; }
.matrix-block pre { position: relative; font: 9px/1.8 Consolas, 'Courier New', monospace; margin: 12px 0 8px; padding: 0 8px; border-left: 1px solid #9ba98a; border-right: 1px solid #9ba98a; }
.matrix-block small { font-size: 8px; }
.geometry-formula { font-size: 9px; letter-spacing: .4px; }
.rail-axis { display: grid; justify-items: center; gap: 16px; font-size: 8px; }
.rail-axis i { width: 1px; height: 70px; background: linear-gradient(transparent, #9ba98a, transparent); position: relative; }
.rail-axis i::after { content: ''; position: absolute; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: #7c8c71; animation: axis-travel 7s ease-in-out infinite; }
@keyframes matrix-drift { 50% { transform: translateY(-8px); opacity: .65; } }
@keyframes axis-travel { 0%, 100% { transform: translateY(0); opacity: .25; } 50% { transform: translateY(65px); opacity: 1; } }
@media (max-width: 1399px) { .geometry-rail { display: none; } }
@media (prefers-reduced-motion: reduce) { .matrix-block, .rail-axis i::after { animation: none; } }

.hero, .work-section, .about-section, .contact-section { position: relative; }
.hero .geometry-rail-left { top: 90px; }
.hero .geometry-rail-right { top: 210px; }
.work-section .geometry-rail-left { top: 160px; }
.work-section .geometry-rail-right { top: 330px; }
.work-section .geometry-lower.geometry-rail-left { top: 64%; }
.work-section .geometry-lower.geometry-rail-right { top: 75%; }
.about-section .geometry-rail-left { top: 80px; }
.about-section .geometry-rail-right { top: 175px; }
.contact-section .geometry-rail-left { top: 0; }
.contact-section .geometry-rail-right { top: 65px; }
.contact-section .geometry-rail-left { left: calc(56px - (100vw - 1200px) / 2); }
.contact-section .geometry-rail-right { right: calc(56px - (100vw - 1200px) / 2); }

.geometry-rail { transform: translateY(var(--rail-offset, 0px)); }

/* Keep the face fully inside the portrait; crop from the bottom when needed. */
.portrait img { height: auto; aspect-ratio: 4 / 5; object-position: center top; }
.secondary { min-height: 48px; border: 1px solid #a9b5a1; background: #edf0e7; color: var(--ink); font-size: 15px; font-weight: 600; gap: 22px; transition: background 180ms, border-color 180ms; }
.secondary:hover { background: #dfe7d6; border-color: var(--accent); }
.hero-actions { flex-wrap: wrap; gap: 16px; }
.hero-actions .primary { min-height: 48px; font-size: 15px; font-weight: 600; }
.work-note { align-items: center; font-size: 12px; }
.education > p:not(.eyebrow) { font-size: 15px; line-height: 1.85; }
.education-meta { font-size: 14px; flex-wrap: wrap; gap: 12px; }
.education-meta > :last-child { font-weight: 600; color: var(--accent); }
.education h4 { font-size: 16px; font-weight: 600; margin: 25px 0 14px; }
.study-list, .personal-details ul { padding-left: 19px; margin: 0 0 25px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.study-list li, .personal-details li { padding-left: 3px; margin-bottom: 12px; }
.study-list strong, .personal-details strong { color: var(--ink); font-weight: 600; }
.personal-details { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line); }
.personal-details h3 { font-size: 21px; margin-bottom: 18px; }
.personal-details h3:not(:first-child) { margin-top: 30px; }
.personal-details p { font-size: 15px; line-height: 1.85; color: var(--muted); margin: 14px 0; }
.skills dl div { grid-template-columns: 120px 1fr; font-size: 14px; margin-top: 20px; }
.contact-links a { min-height: 52px; font-size: 15px; font-weight: 500; }
summary { font-size: 14px; min-height: 48px; }
@media (max-width: 720px) {
  .portrait img { height: auto; aspect-ratio: 4 / 5; object-position: center top; }
  .work-note { align-items: flex-start; }
  .skills dl div { grid-template-columns: 100px 1fr; gap: 14px; }
}

/* Separate the longer profile into aligned, clearly bounded topics. */
.about-section { display: block; padding: 75px 0 85px; }
.about-heading { margin-bottom: 36px; }
.about-heading .eyebrow { margin-bottom: 16px; }
.about-heading > p:last-child { margin: 15px 0 0; font-size: 16px; color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.profile-card { min-width: 0; display: flex; flex-direction: column; padding: 32px; background: #fcfcf9; border: 1px solid #d9ded2; border-radius: 8px; }
.profile-card .eyebrow { margin-bottom: 12px; }
.profile-card h3 { font-size: 25px; margin: 0 0 20px; }
.profile-card > p:not(.eyebrow) { margin: 0 0 20px; font-size: 15px; line-height: 1.85; color: var(--muted); }
.profile-card.education { background: #eff2e9; padding-bottom: 32px; }
.profile-card .degree { color: var(--ink) !important; }
.profile-card .education-meta { border-top: 1px solid #d5dccd; border-bottom: 1px solid #d5dccd; padding: 14px 0; margin: 0 0 20px; font-size: 13px; }
.profile-card h4 { margin: 4px 0 14px; font-size: 15px; font-weight: 600; }
.profile-card .study-list { list-style: none; margin: 0 0 25px; padding: 0; }
.profile-card .study-list li { margin: 0 0 13px; padding: 0; font-size: 14px; line-height: 1.6; }
.profile-card .study-list strong, .profile-card .study-list span { display: block; }
.profile-card .study-list strong { margin-bottom: 3px; }
.profile-card-action { margin-top: auto; padding-top: 10px; }
.profile-card.skills { padding-top: 32px; }
.profile-card dl div { grid-template-columns: 135px 1fr; margin: 0; padding: 14px 0; border-bottom: 1px solid #e1e5db; font-size: 14px; line-height: 1.75; }
.profile-card dl div:first-child { padding-top: 0; }
.profile-card dl div:last-child { border: 0; padding-bottom: 0; }
.profile-card dt { font-weight: 600; }
.profile-card .strength-rows div { display: block; padding: 18px 0; }
.strength-rows dt { margin-bottom: 5px; }
.personal-strip { margin-top: 24px; padding: 30px 32px; border: 1px solid #d9ded2; border-radius: 8px; background: #f1f2ec; }
.personal-strip-heading .eyebrow { margin-bottom: 10px; }
.personal-strip-heading h3 { margin-bottom: 24px; font-size: 22px; }
.personal-strip-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
.personal-strip-grid > div + div { border-left: 1px solid #d5dccd; padding-left: 28px; }
.personal-strip h4 { font-size: 14px; margin: 0 0 9px; font-weight: 600; }
.personal-strip p:not(.eyebrow) { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0; }
.about-section .geometry-rail-left { top: 200px; }
.about-section .geometry-rail-right { top: 330px; }
@media (max-width: 720px) {
  .about-section { padding: 55px 0 60px; }
  .profile-grid { grid-template-columns: 1fr; gap: 18px; }
  .profile-card, .profile-card.skills { padding: 24px; }
  .profile-card.education { padding-bottom: 24px; }
  .profile-card h3 { font-size: 23px; }
  .profile-card dl div { grid-template-columns: 1fr; gap: 4px; }
  .personal-strip { margin-top: 18px; padding: 24px; }
  .personal-strip-grid { grid-template-columns: 1fr; gap: 20px; }
  .personal-strip-grid > div + div { border-left: 0; border-top: 1px solid #d5dccd; padding-left: 0; padding-top: 20px; }
}

.background-timeline { margin: 8px 0 24px; padding-top: 23px; border-top: 1px solid var(--line); }
.background-timeline h4 { margin: 0 0 20px; font-size: 16px; }
.background-timeline ol { list-style: none; margin: 0; padding: 0; }
.background-timeline li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 20px; padding: 0 0 21px 18px; }
.background-timeline li::before { content: ''; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.background-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 3px; top: 18px; bottom: 3px; width: 1px; background: #d5dccd; }
.background-timeline li:last-child { padding-bottom: 0; }
.background-timeline .journey-future::before { background: var(--paper); border: 1px solid var(--accent); }
.journey-year { font-size: 13px; font-weight: 600; color: var(--accent); padding-top: 2px; font-variant-numeric: tabular-nums; }
.background-timeline h5 { margin: 0 0 5px; font-size: 14px; font-weight: 600; }
.background-timeline p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
@media (max-width: 720px) { .background-timeline li { gap: 12px; grid-template-columns: 44px 1fr; } }

/* The entire project is one keyboard-accessible case-study trigger. */
.project { position: relative; padding-bottom: 44px; }
.project-open { position: absolute; inset: 0; width: 100%; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.project-open-label { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.project-open-label > span { font-size: 20px; }
.project-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
.project-image::after { content: ''; position: absolute; inset: 0; background: #18261c; opacity: 0; transition: opacity 300ms; pointer-events: none; }
.image-case-study { position: absolute; z-index: 2; bottom: 20px; left: 20px; padding: 12px 17px; border: 1px solid #ffffff80; border-radius: 4px; color: white; background: #202c24b8; font-size: 14px; font-weight: 500; opacity: 0; transform: translateY(6px); transition: opacity 300ms, transform 300ms; pointer-events: none; }
.project-state { z-index: 2; }
.project:hover .project-image img, .project:focus-within .project-image img { transform: scale(1.035); }
.project:hover .project-image::after, .project:focus-within .project-image::after { opacity: .22; }
.project:hover .image-case-study, .project:focus-within .image-case-study { opacity: 1; transform: translateY(0); }
body:has(.case-study-dialog[open]) { overflow: hidden; }
.case-study-dialog { width: min(850px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 100px #16211933; overscroll-behavior: contain; }
.case-study-dialog::backdrop { background: #18231d99; backdrop-filter: blur(5px); }
.case-study-toolbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 32px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.case-study-close { display: inline-flex; gap: 18px; align-items: center; min-height: 44px; padding: 8px 14px; font: inherit; font-size: 14px; border: 1px solid #bdc7b5; border-radius: 5px; background: #edf0e7; color: var(--ink); cursor: pointer; }
.case-study-close span { font-size: 23px; }
.case-study-close:hover { background: #dfe7d6; }
.case-study-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.case-study-body { padding: 28px 32px 36px; }
.case-study-body h2 { font-size: clamp(28px, 4vw, 40px); margin: 16px 0 20px; }
.case-study-body .project-topline { margin: 0; font-size: 12px; }
.case-study-introduction { font-size: 16px; line-height: 1.8; color: var(--muted); margin: 0 0 24px; }
.case-study-body > img { display: block; width: 100%; height: auto; border-radius: 5px; }
.case-study-image-note { font-size: 12px; color: var(--muted); margin: 12px 0 30px; }
.case-study-body h3 { font-size: 22px; }
.case-study-body .project-detail { font-size: 15px; line-height: 1.85; }
.case-study-body .detail-label { font-size: 13px; color: var(--accent); padding-top: 14px; border-top: 1px solid var(--line); }
@media (hover: none) { .image-case-study { opacity: 1; transform: none; } }
@media (max-width: 720px) { .case-study-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); } .case-study-toolbar { padding: 12px 20px; } .case-study-body { padding: 24px 20px; } }
