:root {
  --ink: #17201d;
  --muted: #5f6d68;
  --forest: #123c31;
  --forest-dark: #0c2a22;
  --teal: #0f766e;
  --blue: #3659a5;
  --coral: #d9634e;
  --gold: #d9a52e;
  --paper: #f6f8f7;
  --white: #ffffff;
  --line: #d9dfdc;
  --soft-green: #e7f1ed;
  --soft-blue: #eaf0fb;
  --radius: 8px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", Arial, sans-serif; font-size: 16px; line-height: 1.65; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.4); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .brand { font-family: "Manrope", Arial, sans-serif; letter-spacing: 0; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 10px 14px; color: var(--white); background: var(--forest); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(23, 32, 29, 0.1); background: rgba(246, 248, 247, 0.94); backdrop-filter: blur(16px); }
.header-inner { display: flex; min-height: 72px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--forest-dark); font-size: 15px; font-weight: 800; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--white); border-radius: 6px; background: var(--forest); }
.site-nav { display: flex; align-items: center; gap: 28px; color: #40504a; font-size: 14px; font-weight: 600; }
.site-nav a { transition: color 160ms ease; }
.site-nav a:hover, .site-nav a.active { color: var(--teal); }
.site-nav .nav-contact { padding: 8px 14px; color: var(--white); border-radius: 6px; background: var(--forest); }
.site-nav .nav-contact:hover { color: var(--white); background: var(--teal); }
.menu-button { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; color: var(--forest); background: var(--white); }
.menu-button svg, .button svg, .text-link svg, .icon-link svg, .site-footer svg { width: 18px; height: 18px; flex: 0 0 auto; }

.intro { position: relative; overflow: hidden; padding: 96px 0 0; background-color: var(--paper); background-image: linear-gradient(rgba(18, 60, 49, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 60, 49, 0.04) 1px, transparent 1px); background-size: 32px 32px; }
.intro::after { position: absolute; top: 0; right: 0; width: 14px; height: 100%; content: ""; background: var(--coral); }
.intro-inner { padding-bottom: 84px; }
.eyebrow, .section-kicker, .project-meta, .education-status, .timeline-org { font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: var(--teal); }
.eyebrow span { width: 26px; height: 2px; background: var(--coral); }
.intro h1 { max-width: 920px; margin-bottom: 8px; color: var(--forest-dark); font-size: 74px; font-weight: 800; line-height: 1.05; }
.intro-role { margin-bottom: 24px; color: var(--blue); font-family: "Manrope", Arial, sans-serif; font-size: 25px; font-weight: 700; }
.intro-copy { max-width: 760px; margin-bottom: 32px; color: #43514c; font-size: 19px; line-height: 1.7; }
.intro-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 700; transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--forest); }
.button-primary:hover { background: var(--teal); }
.button-secondary { border-color: #b9c5c0; color: var(--forest); background: rgba(255, 255, 255, 0.72); }
.button-secondary:hover { border-color: var(--teal); background: var(--white); }
.proof-rail { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); color: var(--white); background: var(--forest); }
.proof-rail > div { display: flex; min-height: 126px; flex-direction: column; justify-content: center; padding: 22px 28px; border-right: 1px solid rgba(255, 255, 255, 0.14); }
.proof-rail > div:last-child { border-right: 0; }
.proof-rail strong { color: #72d8bd; font-family: "Manrope", Arial, sans-serif; font-size: 34px; line-height: 1.1; }
.proof-rail span { margin-top: 8px; color: #d6e3de; font-size: 13px; line-height: 1.45; }

.section { padding: 104px 0; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr); gap: 56px; align-items: end; margin-bottom: 46px; }
.section-kicker { margin-bottom: 10px; color: var(--teal); }
.section-heading h2, .experience-intro h2, .contact-inner h2 { max-width: 760px; margin-bottom: 0; color: var(--forest-dark); font-size: 40px; line-height: 1.2; }
.section-heading > p, .experience-intro > p, .contact-inner > div > p:last-child { margin-bottom: 0; color: var(--muted); }
.work-section { background: var(--white); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.project-card:hover { transform: translateY(-4px); border-color: #aebdb7; box-shadow: 0 18px 38px rgba(18, 60, 49, 0.09); }
.project-visual { display: block; overflow: hidden; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); background: #edf1ef; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.project-card:hover .project-visual img { transform: scale(1.02); }
.project-body { padding: 30px; }
.project-meta { display: flex; justify-content: space-between; margin-bottom: 14px; color: var(--teal); }
.project-meta span:last-child { color: var(--muted); }
.project-body h3, .repository-strip h3 { margin-bottom: 12px; color: var(--forest-dark); font-size: 25px; line-height: 1.25; }
.project-lede { margin-bottom: 20px; color: #4e5c57; }
.project-points { display: grid; gap: 9px; margin: 0 0 24px; padding: 0; list-style: none; color: #34423d; font-size: 14px; }
.project-points li { position: relative; padding-left: 18px; }
.project-points li::before { position: absolute; top: 0.7em; left: 0; width: 6px; height: 6px; content: ""; border-radius: 50%; background: var(--coral); }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 23px 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mini-metrics div { padding: 16px 10px; border-right: 1px solid var(--line); }
.mini-metrics div:last-child { border-right: 0; }
.mini-metrics strong, .mini-metrics span { display: block; }
.mini-metrics strong { color: var(--blue); font-family: "Manrope", Arial, sans-serif; font-size: 25px; }
.mini-metrics span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.project-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.tags, .repo-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span, .repo-tools span { padding: 5px 8px; border-radius: 4px; color: var(--forest); background: var(--soft-green); font-size: 11px; font-weight: 700; }
.tags span:nth-child(2n), .repo-tools span:nth-child(2n) { color: #294a8a; background: var(--soft-blue); }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-size: 14px; font-weight: 700; }
.text-link:hover { color: var(--coral); }
.repository-strip { display: grid; grid-template-columns: auto minmax(260px, 1fr) minmax(280px, auto) auto; gap: 24px; align-items: center; margin-top: 24px; padding: 28px 30px; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); background: #fbfcfc; }
.repo-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 6px; color: var(--blue); background: var(--soft-blue); }
.repo-icon svg { width: 23px; height: 23px; }
.repository-strip h3, .repository-strip p { margin-bottom: 0; }
.repo-copy > p:last-child { margin-top: 6px; color: var(--muted); font-size: 14px; }
.icon-link { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--forest); background: var(--white); }
.icon-link:hover { color: var(--white); border-color: var(--forest); background: var(--forest); }

.expertise-section { background: #eef3f1; }
.expertise-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #cbd5d1; border-left: 1px solid #cbd5d1; }
.expertise-item { position: relative; min-height: 275px; padding: 34px; border-right: 1px solid #cbd5d1; border-bottom: 1px solid #cbd5d1; }
.expertise-item > svg { width: 27px; height: 27px; margin-bottom: 28px; color: var(--teal); }
.expertise-number { position: absolute; top: 28px; right: 30px; color: #8b9b95; font-family: "Manrope", Arial, sans-serif; font-size: 13px; font-weight: 700; }
.expertise-item:nth-child(2) > svg { color: var(--blue); }
.expertise-item:nth-child(3) > svg { color: var(--coral); }
.expertise-item:nth-child(4) > svg { color: var(--gold); }
.expertise-item h3 { margin-bottom: 10px; color: var(--forest-dark); font-size: 21px; }
.expertise-item p { max-width: 440px; margin-bottom: 0; color: var(--muted); }

.experience-section { background: var(--white); }
.experience-layout { display: grid; grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr); gap: 88px; }
.experience-intro { position: sticky; top: 112px; align-self: start; }
.experience-intro h2 { margin-bottom: 20px; }
.experience-intro .text-link { margin-top: 12px; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--blue); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.timeline-org { margin-bottom: 5px; color: var(--teal); }
.timeline-item h3 { margin-bottom: 10px; color: var(--forest-dark); font-size: 20px; line-height: 1.4; }
.timeline-item p:last-child { margin-bottom: 0; color: var(--muted); }

.education-section { background: var(--paper); }
.education-list { border-top: 2px solid var(--forest); }
.education-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 34px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.education-year { color: var(--blue); font-size: 13px; font-weight: 700; }
.education-status { margin-bottom: 4px; color: var(--teal); }
.education-row h3 { margin-bottom: 4px; color: var(--forest-dark); font-size: 20px; }
.education-row p:last-child { margin-bottom: 0; color: var(--muted); }
.education-row > svg { width: 28px; height: 28px; color: var(--coral); }

.contact-section { padding: 82px 0; color: var(--white); background: var(--forest); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.contact-inner .section-kicker { color: #72d8bd; }
.contact-inner h2 { max-width: 720px; margin-bottom: 14px; color: var(--white); }
.contact-inner > div > p:last-child { color: #c8d8d2; }
.button-light { color: var(--forest-dark); background: var(--white); }
.button-light:hover { background: #72d8bd; }
.button-outline-light { color: var(--white); border-color: rgba(255, 255, 255, 0.35); background: transparent; }
.button-outline-light:hover { border-color: var(--white); }
.site-footer { padding: 24px 0; color: #9fb4ac; background: var(--forest-dark); font-size: 13px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.footer-inner p { margin-bottom: 0; }
.footer-inner a { justify-self: end; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 520ms ease, transform 520ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .site-nav { position: fixed; top: 72px; right: 0; left: 0; display: none; height: calc(100vh - 72px); flex-direction: column; align-items: stretch; gap: 0; padding: 22px 20px; background: var(--paper); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 18px; }
  .site-nav .nav-contact { margin-top: 18px; padding: 13px 16px; text-align: center; }
  .menu-button { display: inline-flex; }
  .intro { padding-top: 72px; }
  .intro h1 { font-size: 58px; }
  .proof-rail { grid-template-columns: repeat(2, 1fr); }
  .proof-rail > div:nth-child(2) { border-right: 0; }
  .proof-rail > div:nth-child(-n + 2) { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .section-heading, .experience-layout { grid-template-columns: 1fr; gap: 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .repository-strip { grid-template-columns: auto minmax(260px, 1fr) auto; }
  .repo-tools { grid-column: 2 / 4; }
  .experience-intro { position: static; margin-bottom: 28px; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .intro { padding-top: 54px; }
  .intro::after { width: 6px; }
  .intro-inner { padding-bottom: 56px; }
  .intro h1 { font-size: 44px; }
  .intro-role { font-size: 20px; }
  .intro-copy { font-size: 17px; }
  .intro-actions, .contact-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .proof-rail { width: 100%; }
  .proof-rail > div { min-height: 118px; padding: 18px 16px; }
  .proof-rail strong { font-size: 29px; }
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 32px; }
  .section-heading h2, .experience-intro h2, .contact-inner h2 { font-size: 30px; }
  .project-body { padding: 22px; }
  .project-footer { align-items: flex-start; flex-direction: column; }
  .repository-strip { grid-template-columns: auto minmax(0, 1fr); padding: 22px; }
  .repo-tools { grid-column: 1 / 3; }
  .repository-strip .icon-link { grid-column: 1 / 3; width: 100%; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-item { min-height: 0; padding: 28px 24px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .education-row { grid-template-columns: 1fr auto; gap: 14px; }
  .education-year { grid-column: 1 / 3; }
  .footer-inner { grid-template-columns: 1fr auto; gap: 8px; }
  .footer-inner p:nth-child(2) { grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
