@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --ink: #171717;
  --muted: #646464;
  --paper: #f8f8f6;
  --white: #fff;
  --line: rgba(23, 23, 23, .13);
  --blue: #0866ff;
  --green: #20c475;
  --shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
  --shell: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--ink); color: var(--white); }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(248,248,246,.9); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav-wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -.3px; }
.mark { width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 13px; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 500; }
.site-nav > a:not(.nav-cta) { color: #494949; transition: color .2s; }
.site-nav > a:hover { color: var(--ink); }
.nav-cta { padding: 10px 14px; background: var(--ink); color: white; border-radius: 5px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
.menu-toggle span:not(.sr-only) { width: 22px; height: 1px; background: var(--ink); transition: transform .2s; }

.hero { min-height: calc(100vh - 72px); display: flex; flex-direction: column; justify-content: space-between; }
.hero-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr); gap: clamp(48px, 7vw, 104px); align-items: center; padding-block: clamp(54px, 8vh, 96px); }
.hero-content { padding-top: 10px; }
.eyebrow, .section-index, .kicker, .project-label { font-family: "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 500; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: clamp(54px, 8vh, 86px); color: #454545; }
.status-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(32,196,117,.12); }
.kicker { margin: 0 0 25px; color: var(--blue); }
h1, h2, h3, p { text-wrap: pretty; }
h1 { max-width: 760px; margin: 0; font-size: clamp(54px, 6.8vw, 91px); line-height: .94; letter-spacing: clamp(-5px, -.055em, -2px); font-weight: 600; }
h1 span { color: var(--blue); }
.hero-statement { max-width: 640px; margin: 34px 0 0; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.55; letter-spacing: -.35px; color: #4b4b4b; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; padding: 0 18px; font-size: 14px; font-weight: 500; border-radius: 5px; transition: transform .18s, background .18s, color .18s; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.button.primary { background: var(--ink); color: white; }
.button.primary:hover { background: var(--blue); }
.button.secondary { background: var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

.portrait-stage { position: relative; width: min(100%, 360px); justify-self: end; padding: 24px 24px 88px 0; }
.portrait-grid { position: absolute; inset: 0 0 62px 54px; background-color: var(--blue); background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px); background-size: 38px 38px; }
.portrait-frame { position: relative; z-index: 2; width: calc(100% - 54px); aspect-ratio: 1 / 1; overflow: hidden; background: #f2f2f0; box-shadow: 0 0 0 1px rgba(0,0,0,.10), 0 18px 45px rgba(0,0,0,.13); }
.portrait-frame img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 43%; filter: saturate(.84) contrast(1.03); transform: scale(1.012); transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .4s; }
.portrait-stage:hover .portrait-frame img { transform: scale(1.045); filter: saturate(1) contrast(1.02); }
.portrait-caption { position: absolute; z-index: 3; right: 0; bottom: 0; width: 63%; min-height: 92px; display: grid; grid-template-columns: auto 1fr; gap: 19px; align-items: center; padding: 17px 20px; background: var(--ink); color: white; font-size: 13px; line-height: 1.35; box-shadow: 0 0 0 1px rgba(255,255,255,.07); }
.caption-index { align-self: start; padding-top: 2px; font-family: "Geist Mono", monospace; font-size: 9px; color: #8e8e8e; }
.portrait-stamp { position: absolute; z-index: 4; top: 7px; right: 4px; width: 58px; height: 58px; display: grid; place-content: center; background: white; color: var(--blue); text-align: center; font-family: "Geist Mono", monospace; font-size: 12px; font-weight: 500; line-height: 1.05; box-shadow: var(--shadow); }
.portrait-stamp span { font-size: 8px; letter-spacing: .12em; color: #707070; }
.hero-meta { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); font-family: "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; color: #6a6a6a; }
.focus-ribbon { background: var(--blue); color: white; }
.focus-ribbon-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 22px; font-family: "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.focus-ribbon-inner i { font-style: normal; font-size: 18px; opacity: .55; }

@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes portrait-enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.hero-content { animation: hero-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.portrait-stage { animation: portrait-enter .8s .08s cubic-bezier(.2,.7,.2,1) both; }

.section { padding-block: clamp(90px, 12vw, 160px); scroll-margin-top: 72px; }
.section-heading { display: grid; grid-template-columns: 1.5fr .7fr; gap: 70px; align-items: end; margin-bottom: 72px; }
.section-heading.compact { align-items: end; }
.section-index { margin: 0 0 28px; color: #777; }
.section-index.light { color: #8c8c8c; }
h2 { margin: 0; font-size: clamp(44px, 6vw, 74px); line-height: .98; letter-spacing: -.055em; font-weight: 600; }
.section-intro { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }

.project-list { box-shadow: 0 0 0 1px var(--line); }
.project { min-height: 470px; display: grid; grid-template-columns: 64px minmax(300px, .8fr) minmax(340px, 1.2fr); background: var(--white); }
.project + .project { border-top: 1px solid var(--line); }
.project-number { padding: 30px 24px; border-right: 1px solid var(--line); font-family: "Geist Mono", monospace; font-size: 11px; color: #777; }
.project-body { padding: clamp(34px, 5vw, 64px); display: flex; flex-direction: column; align-items: flex-start; }
.project-label { color: var(--blue); margin-bottom: auto; }
.project h3 { max-width: 470px; margin: 40px 0 16px; font-size: clamp(31px, 4vw, 47px); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.project p { max-width: 520px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 28px 0 0; padding: 0; }
.tag-list li { padding: 6px 9px; border-radius: 999px; background: #f2f2f0; font-family: "Geist Mono", monospace; font-size: 10px; color: #555; }
.project-visual { position: relative; overflow: hidden; min-height: 360px; margin: 28px 28px 28px 0; background: #f2f2f0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.project:nth-child(even) { grid-template-columns: 64px minmax(340px, 1.2fr) minmax(300px, .8fr); }
.project:nth-child(even) .project-visual { grid-column: 2; grid-row: 1; margin: 28px 0 28px 28px; }
.project:nth-child(even) .project-body { grid-column: 3; grid-row: 1; }
.project:hover .project-label { color: var(--ink); }
.terminal-visual { display: grid; align-content: start; background: #171717; color: white; }
.terminal-bar { height: 45px; display: flex; align-items: center; gap: 6px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.11); }
.terminal-bar span { width: 7px; height: 7px; border-radius: 50%; background: #555; }
.terminal-visual pre { margin: 0; padding: clamp(28px, 5vw, 56px); font-family: "Geist Mono", monospace; font-size: clamp(12px, 1.4vw, 15px); line-height: 2.1; }
.muted { color: #858585; }.success { color: #5fe2a0; }
.topology-visual { background: #ededeb; }
.node { position: absolute; width: 64px; height: 64px; display: grid; place-items: center; background: white; box-shadow: var(--shadow); font-family: "Geist Mono", monospace; font-size: 10px; z-index: 2; }
.node.core { left: calc(50% - 42px); top: calc(50% - 42px); width: 84px; height: 84px; background: var(--ink); color: white; }
.node-a { left: 10%; top: 17%; }.node-b { right: 9%; top: 14%; }.node-c { right: 12%; bottom: 12%; }
.line { position: absolute; height: 1px; background: #a7a7a7; transform-origin: left; left: 50%; top: 50%; }
.line-a { width: 42%; transform: rotate(210deg); }.line-b { width: 40%; transform: rotate(-35deg); }.line-c { width: 37%; transform: rotate(35deg); }
.checklist-visual { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 4vw, 48px); gap: 9px; background: #ededeb; }
.checklist-visual div { display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; min-height: 58px; padding: 0 16px; background: white; box-shadow: 0 0 0 1px rgba(0,0,0,.08); font-size: 14px; }
.checklist-visual span { font-family: "Geist Mono", monospace; font-size: 10px; color: #888; }.checklist-visual b { font-weight: 500; }.checklist-visual i { color: var(--green); font-style: normal; }

.orders-visual { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px, 4vw, 48px); background: var(--blue); color: white; }
.orders-head { display: flex; align-items: center; justify-content: space-between; font-family: "Geist Mono", monospace; font-size: 10px; letter-spacing: .08em; }
.orders-head i { padding: 5px 7px; background: rgba(255,255,255,.13); font-style: normal; }
.orders-metric { display: flex; flex-direction: column; margin-block: auto; }
.orders-metric strong { font-size: clamp(68px, 8vw, 112px); line-height: .85; letter-spacing: -.075em; font-weight: 600; }
.orders-metric span { margin-top: 17px; font-family: "Geist Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; opacity: .76; }
.orders-flow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.25); font-family: "Geist Mono", monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.orders-flow b { font-weight: 400; opacity: .55; }

.dark-section { background: var(--ink); color: white; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(70px, 12vw, 170px); align-items: start; }
.dark-section h2 { font-size: clamp(48px, 6vw, 76px); }
.about-copy { padding-top: 42px; }
.about-copy p { color: #b5b5b5; font-size: 17px; line-height: 1.75; }
.about-copy .lead { margin-top: 0; color: white; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; letter-spacing: -.5px; }
.text-link { display: inline-flex; align-items: center; gap: 22px; margin-top: 28px; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-size: 14px; font-weight: 500; }

.experience-section { background: #efefed; }
.experience-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: clamp(44px, 7vw, 90px); align-items: start; }
.experience-list { border-top: 1px solid var(--line); }
.role { position: relative; display: grid; grid-template-columns: 158px 1fr; gap: 38px; padding-block: 38px; border-bottom: 1px solid var(--line); }
.role.current-role::before { content: ""; position: absolute; top: 45px; left: -1px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(8,102,255,.12); }
.role-date, .role-company, .card-kicker { font-family: "Geist Mono", monospace; text-transform: uppercase; letter-spacing: .07em; font-size: 10px; }
.role-date { padding-left: 22px; color: #777; }
.role-company { margin: 0 0 12px; color: var(--blue); }
.role-content h3 { margin: 0 0 15px; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.08; letter-spacing: -.035em; }
.role-content > p:not(.role-company) { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.65; }
.role-highlights { display: grid; gap: 9px; margin: 21px 0 0; padding: 0; list-style: none; }
.role-highlights li { position: relative; padding-left: 19px; color: #3f3f3f; font-size: 14px; line-height: 1.55; }
.role-highlights li::before { content: "↳"; position: absolute; left: 0; color: var(--blue); }
.education-card { position: sticky; top: 104px; padding: 32px; background: var(--ink); color: white; box-shadow: 18px 18px 0 var(--blue); }
.education-card .card-kicker { margin: 0 0 74px; color: #8e8e8e; }
.education-card h3 { margin: 0 0 17px; font-size: 29px; line-height: 1.02; letter-spacing: -.04em; }
.education-card p { margin: 0; color: #b8b8b8; font-size: 14px; line-height: 1.65; }
.education-card p + p { margin-top: 22px; }
.education-card strong { color: white; font-weight: 500; }
.education-rule { height: 1px; margin-block: 28px; background: rgba(255,255,255,.17); }

.capability-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.capability-grid article { min-height: 270px; padding: 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.capability-grid span { font-family: "Geist Mono", monospace; font-size: 10px; color: #888; }
.capability-grid h3 { margin: 62px 0 13px; font-size: 25px; letter-spacing: -.8px; }
.capability-grid p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.6; }

.github-section { background: #ececea; }
.github-section .text-link { align-self: end; justify-self: end; }
.repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(0,0,0,.12); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.repo-card, .repo-placeholder { min-height: 230px; padding: 28px; background: var(--paper); }
.repo-card { display: flex; flex-direction: column; transition: background .2s; }
.repo-card:hover { background: white; }
.repo-card-top { display: flex; justify-content: space-between; gap: 20px; font-family: "Geist Mono", monospace; font-size: 10px; color: #777; text-transform: uppercase; }
.repo-card h3 { margin: 45px 0 12px; font-size: 22px; letter-spacing: -.6px; }
.repo-card p { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.repo-card-footer { margin-top: auto; display: flex; gap: 16px; font-family: "Geist Mono", monospace; font-size: 10px; color: #666; }
.repo-placeholder { grid-column: 1 / -1; min-height: 230px; display: grid; place-content: center; text-align: center; }
.repo-placeholder p { margin: 0 0 7px; font-size: 22px; font-weight: 600; letter-spacing: -.7px; }.repo-placeholder span { color: var(--muted); font-size: 14px; }

.contact-section { padding-block: clamp(100px, 14vw, 190px); background: white; }
.contact-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 90px; align-items: start; }
.contact-copy p { margin: 0 0 30px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.contact-copy .contact-note { margin-top: 18px; font-size: 12px; }
.contact-form { display: grid; gap: 20px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 8px; color: #555; font-family: "Geist Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.contact-form input, .contact-form textarea { width: 100%; border: 0; border-radius: 0; padding: 13px 0; background: transparent; color: var(--ink); box-shadow: inset 0 -1px 0 rgba(0,0,0,.2); font: 16px "Geist", system-ui, sans-serif; text-transform: none; letter-spacing: normal; transition: box-shadow .2s; }
.contact-form textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.contact-form input:focus, .contact-form textarea:focus { outline: 0; box-shadow: inset 0 -2px 0 var(--blue); }
.contact-trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 5px; }
.contact-actions .text-link { margin-top: 0; }
.contact-form button:disabled { cursor: wait; opacity: .62; transform: none; }
.contact-status { min-height: 24px; margin: 0 !important; font-family: "Geist Mono", monospace; font-size: 11px !important; }
.contact-status.success { color: #087745; }
.contact-status.error { color: #b42318; }
.site-footer { background: white; border-top: 1px solid var(--line); }
.footer-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 30px; font-family: "Geist Mono", monospace; font-size: 10px; color: #6d6d6d; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 900px) {
  .hero-layout, .section-heading, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { min-height: auto; }
  .hero-layout { padding-block: 64px 54px; }
  .eyebrow { margin-bottom: 56px; }
  .portrait-stage { width: min(62%, 360px); justify-self: end; }
  .project, .project:nth-child(even) { grid-template-columns: 50px 1fr; }
  .project:nth-child(even) .project-body { grid-column: 2; grid-row: 1; }
  .project-visual, .project:nth-child(even) .project-visual { grid-column: 2; grid-row: 2; margin: 0 24px 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .experience-layout { grid-template-columns: 1fr; }
  .education-card { position: relative; top: auto; width: min(100%, 480px); justify-self: end; }
  .repo-grid { grid-template-columns: repeat(2, 1fr); }
  .github-section .text-link { justify-self: start; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .menu-toggle { display: flex; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; padding: 22px 16px 28px; background: var(--paper); box-shadow: 0 1px 0 var(--line); flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav.open { display: flex; }
  .site-nav a { min-height: 48px; display: flex; align-items: center; padding: 0 12px; }
  .nav-cta { margin-top: 8px; justify-content: center; }
  .menu-toggle[aria-expanded="true"] span:nth-last-child(2) { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .hero-layout { padding-block: 48px 36px; }
  .eyebrow { margin-bottom: 45px; }
  .hero-statement { margin-top: 26px; }
  .portrait-stage { width: 74%; justify-self: center; padding: 18px 16px 72px 0; margin-top: 18px; }
  .portrait-grid { inset: 0 0 51px 38px; background-size: 30px 30px; }
  .portrait-frame { width: calc(100% - 38px); }
  .portrait-caption { width: 82%; min-height: 78px; padding: 14px; }
  .portrait-stamp { width: 50px; height: 50px; }
  .hero-meta { align-items: flex-start; flex-direction: column; padding-block: 22px; }
  .focus-ribbon-inner { min-height: 116px; display: grid; grid-template-columns: 1fr auto; padding-block: 18px; }
  .focus-ribbon-inner span:last-child { grid-column: 1; }
  .focus-ribbon-inner i:last-of-type { display: none; }
  .section-heading { margin-bottom: 48px; }
  .project, .project:nth-child(even) { grid-template-columns: 38px 1fr; min-height: auto; }
  .project-number { padding: 24px 13px; writing-mode: vertical-rl; }
  .project-body { padding: 34px 24px; }
  .project-label { margin-bottom: 20px; }
  .project h3 { margin-top: 22px; }
  .project-visual, .project:nth-child(even) .project-visual { min-height: 300px; margin: 0 16px 16px; }
  .orders-metric strong { font-size: 72px; }
  .role { grid-template-columns: 1fr; gap: 16px; padding-block: 31px; }
  .role.current-role::before { top: 38px; }
  .role-date { padding-left: 20px; }
  .education-card { width: calc(100% - 18px); justify-self: start; padding: 27px; box-shadow: 14px 14px 0 var(--blue); }
  .education-card .card-kicker { margin-bottom: 52px; }
  .capability-grid, .repo-grid { grid-template-columns: 1fr; }
  .footer-inner { padding-block: 26px; flex-direction: column; align-items: flex-start; }
  .contact-form .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
