@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/fonts/ibm-plex-sans-700.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/fonts/ibm-plex-mono-600.woff2") format("woff2");
}

:root {
    --ink: #070b11;
    --ink-2: #0b1017;
    --panel: #0f1520;
    --white: #f6f8f2;
    --muted: #9ca6aa;
    --green: #b7ff62;
    --line: rgba(255, 255, 255, 0.11);
    --line-2: rgba(255, 255, 255, 0.2);
    --shell: min(1120px, calc(100vw - 56px));
    --measure: 66ch;
    --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --sans: "IBM Plex Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--white);
    font-family: var(--sans);
    font-size: 16.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    margin: 0 0 1rem;
    max-width: var(--measure);
}

p:last-child {
    margin-bottom: 0;
}

::selection {
    background: var(--green);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

.shell {
    width: 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;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 9px 13px;
    background: var(--green);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* Reveal */

.will-reveal {
    opacity: 0;
    transform: translateY(14px);
}

.will-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity .5s ease, transform .5s ease;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ink);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease;
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
}

.site-header .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand-mark {
    font-family: var(--mono);
    color: var(--green);
}

.site-nav {
    display: flex;
    gap: 26px;
    font-size: 0.875rem;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current] {
    color: var(--white);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-right: -8px;
}

.menu-toggle span:not(.sr-only) {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--white);
    transition: transform .25s ease, opacity .25s ease;
}

/* Hero */

.hero {
    position: relative;
    padding: 108px 0 96px;
    overflow: hidden;
}

.hero-scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Keeps hero text readable no matter where the globe drifts underneath it. */
.hero-scrim {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 65% 60% at 24% 46%, var(--ink) 0%, rgba(7, 11, 17, 0.82) 42%, transparent 74%);
    pointer-events: none;
}

.hero .shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 20px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.1rem, 5vw, 3rem);
}

.hero-intro {
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 26px;
    margin-top: 30px;
    font-family: var(--mono);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
}

.hero-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid rgba(183, 255, 98, 0.3);
    padding-bottom: 2px;
    transition: border-color .2s ease;
}

.hero-links a:hover {
    border-bottom-color: var(--green);
}

.hero-links .icon,
.hero-links .ph {
    font-size: 1em;
    color: inherit;
}

.hero-links .ph {
    line-height: 1;
}

.hero-cta {
    padding: 10px 18px 9px !important;
    background: var(--green);
    color: var(--ink) !important;
    font-weight: 600;
    border: 1px solid var(--green) !important;
}

.hero-cta:hover {
    background: transparent;
    color: var(--green) !important;
}

.portrait-frame {
    position: relative;
    border: 1px solid var(--line);
    background: var(--ink-2);
    /* Offset duplicate of the frame, sitting behind it like a dropped shadow. */
    box-shadow:
        18px 18px 0 0 var(--ink-2),
        18px 18px 0 1px var(--line);
}

.portrait-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: .5;
}

.portrait-frame picture {
    display: block;
}

.portrait-frame img {
    position: relative;
    width: 100%;
    height: auto;
}

/* Sections */

.section {
    padding: 76px 0;
    border-top: 1px solid var(--line);
}

.section .shell {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.section-title {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.tag-list li {
    padding: 4px 11px;
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.note {
    margin-top: 18px;
    color: rgba(156, 166, 170, 0.75);
    font-size: 0.8125rem;
}

/* Item grid (expertise, facts) */

.items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 34px 44px;
}

.item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

/* Expertise cards only: quieter than Work - a lift and a colour cue, no
   spotlight, no new border box. Background's certifications/education list
   reuses .item too and deliberately stays untouched. */
#expertise .item {
    transition: transform .25s ease;
}

#expertise .item:hover {
    transform: translateY(-2px);
    transition-delay: 0s;
}

#expertise .item h3 {
    transition: color .25s ease;
}

#expertise .item:hover h3 {
    color: var(--green);
}

#expertise .items .item:nth-child(1) { transition-delay: 0s; }
#expertise .items .item:nth-child(2) { transition-delay: .07s; }
#expertise .items .item:nth-child(3) { transition-delay: .14s; }

.item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.item-number {
    display: block;
    margin-bottom: 10px;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--green);
}

.item ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.9375rem;
}

.item ul a {
    text-decoration: none;
    border-bottom: 1px solid var(--line-2);
    transition: color .2s ease, border-color .2s ease;
}

.item ul a:hover {
    color: var(--green);
    border-bottom-color: var(--green);
}

/* Expertise groups */

.expertise-group-label {
    margin: 0 0 18px;
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Work */

.section--work .shell {
    display: block;
}

.work-head {
    max-width: 640px;
    margin-bottom: 36px;
}

.work-head .section-title {
    margin-bottom: 16px;
}

.work-lede {
    margin: 0;
    font-size: 1.0625rem;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 28px;
    margin-bottom: 44px;
}

.work-card {
    position: relative;
    overflow: hidden;
    padding: 22px 24px;
    border: 1px solid var(--line);
    background: var(--ink-2);
    transition: border-color .3s ease;
}

.work-card:hover {
    border-color: var(--line-2);
    transition-delay: 0s;
}

/* Cursor-tracking spotlight. Position is driven by `transform` only (JS
   sets translate3d per pointermove, no transition on it - 1:1 tracking),
   visibility by `opacity` - stays off the layout/paint-cost properties. */
.work-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(183, 255, 98, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity .3s ease;
    transform: translate3d(-9999px, -9999px, 0);
    pointer-events: none;
    will-change: transform;
}

.work-card:hover .work-card-glow {
    opacity: 1;
}

.work-grid .work-card:nth-child(1) { transition-delay: 0s; }
.work-grid .work-card:nth-child(2) { transition-delay: .07s; }
.work-grid .work-card:nth-child(3) { transition-delay: .14s; }
.work-grid .work-card:nth-child(4) { transition-delay: .21s; }

.work-card-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 3px 9px;
    border: 1px solid var(--line-2);
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
}

.work-card h3 {
    margin: 0 0 8px;
    font-size: 1.0625rem;
}

.work-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

/* Contact */

.section--contact .shell {
    display: block;
}

.section--contact .section-title {
    margin-bottom: 22px;
}

.email-link {
    display: inline-block;
    margin-bottom: 8px;
    font-size: clamp(1.1rem, 2.6vw, 1.4rem);
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid rgba(183, 255, 98, 0.32);
    padding-bottom: 3px;
    transition: border-color .2s ease;
}

.email-link:hover {
    border-bottom-color: var(--green);
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 28px;
    font-family: var(--mono);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
}

.link-row a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    text-decoration: none;
    transition: color .2s ease;
}

.link-row a:hover {
    color: var(--green);
}

/* Terminal */

.terminal-section {
    padding: 76px 0;
    border-top: 1px solid var(--line);
}

.terminal-section .shell {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.terminal-hint {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.9375rem;
}

.terminal-hint code {
    font-family: var(--mono);
    font-size: 0.875em;
    color: var(--green);
}

.terminal-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.terminal-shortcuts button {
    padding: 5px 12px;
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    transition: color .2s ease, border-color .2s ease;
}

.terminal-shortcuts button:hover {
    color: var(--green);
    border-color: var(--line-2);
}

.terminal-shortcuts button:active {
    transform: translateY(1px) scale(0.97);
}

.terminal {
    position: relative;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow:
        0 26px 50px -26px rgba(0, 0, 0, 0.65),
        0 8px 20px -14px rgba(183, 255, 98, 0.12);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0);
    will-change: transform;
}

.terminal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    background: radial-gradient(circle at var(--sheen-x, 50%) var(--sheen-y, 20%), rgba(183, 255, 98, 0.14), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.terminal.is-tilting {
    box-shadow:
        0 42px 74px -26px rgba(0, 0, 0, 0.72),
        0 16px 32px -14px rgba(183, 255, 98, 0.2);
}

.terminal.is-tilting::before {
    opacity: 1;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.terminal-lights {
    display: flex;
    gap: 6px;
}

.terminal-lights span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.terminal-bar p {
    margin: 0;
    flex: 1;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
}

.terminal-bar button {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.terminal-bar button:hover {
    color: var(--green);
}

.terminal-bar button:active {
    transform: scale(0.94);
}

@keyframes terminal-unlock-pulse {
    0% { box-shadow: 0 0 0 0 rgba(183, 255, 98, 0.55); }
    100% { box-shadow: 0 0 0 10px rgba(183, 255, 98, 0); }
}

.terminal.is-unlocked .terminal-lights span:first-child {
    background: var(--green);
    animation: terminal-unlock-pulse 0.8s ease-out;
}

.terminal-screen {
    height: 380px;
    overflow-y: auto;
    padding: 18px;
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.75;
}

.terminal-screen:focus-visible {
    outline-offset: -2px;
}

.terminal-message {
    color: var(--muted);
}

.terminal-system {
    display: block;
    margin-bottom: 6px;
    color: var(--green);
    letter-spacing: 0.08em;
}

.terminal-message p {
    margin: 0;
    max-width: none;
}

.terminal-message b {
    color: var(--white);
    font-weight: 400;
}

.terminal-entry {
    margin-top: 18px;
}

.terminal-command-line {
    margin: 0 0 6px;
    max-width: none;
    color: var(--white);
}

.terminal-command-line span {
    margin-right: 8px;
    color: var(--green);
}

.terminal-response {
    margin: 0;
    max-width: none;
    color: var(--muted);
    white-space: pre-wrap;
}

.terminal-response a {
    color: var(--green);
}

.terminal-label {
    margin-bottom: 4px;
    color: var(--white);
    letter-spacing: 0.08em;
}

.terminal-error {
    color: #ff9d5c;
}

.terminal-unlocked {
    color: var(--green);
}

.terminal-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 0.8125rem;
}

.terminal-prompt {
    color: var(--green);
    white-space: nowrap;
}

.terminal-form input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    outline: none;
    caret-color: var(--green);
}

.terminal-caret {
    display: none;
}

/* Snake easter egg */

.snake-game {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--line);
}

.snake-header,
.snake-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.snake-header strong {
    flex: 1;
    color: var(--green);
    font-weight: 500;
}

.snake-canvas {
    width: 100%;
    height: auto;
    margin: 12px 0;
    border: 1px solid var(--line);
    touch-action: none;
}

.snake-status {
    margin: 0 0 12px;
    max-width: none;
    color: var(--muted);
    font-size: 0.75rem;
}

.snake-controls {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-areas: ". up ." "left down right";
    gap: 6px;
    margin-bottom: 12px;
}

.snake-controls button {
    padding: 8px 0;
    border: 1px solid var(--line);
    color: var(--muted);
}

.snake-controls button:hover {
    color: var(--green);
}

.snake-controls button[data-snake-direction="up"] { grid-area: up; }
.snake-controls button[data-snake-direction="left"] { grid-area: left; }
.snake-controls button[data-snake-direction="down"] { grid-area: down; }
.snake-controls button[data-snake-direction="right"] { grid-area: right; }

.snake-footer button {
    padding: 4px 12px;
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.snake-footer button:hover {
    color: var(--green);
}

/* Videos */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}

.video-card {
    text-decoration: none;
}

.video-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--line);
    transition: border-color .2s ease;
}

.video-card span {
    display: block;
    margin-top: 10px;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    transition: color .2s ease;
}

.video-card:hover img {
    border-color: var(--line-2);
}

.video-card:hover span {
    color: var(--green);
}

/* Footer */

.site-footer {
    padding: 34px 0 56px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.site-footer .shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--green);
}

/* 404 */

.error-page main {
    padding: 140px 0;
}

.error-page h1 {
    margin: 0 0 10px;
    font-size: 1.6rem;
}

.error-page p {
    color: var(--muted);
}

@media (max-width: 880px) {
    .hero .shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
    }

    .portrait-frame {
        max-width: 260px;
        box-shadow:
            12px 12px 0 0 var(--ink-2),
            12px 12px 0 1px var(--line);
    }
}

@media (max-width: 720px) {
    :root {
        --shell: calc(100vw - 40px);
    }

    body {
        font-size: 16px;
    }

    .menu-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        inset: 64px 0 0;
        flex-direction: column;
        gap: 0;
        padding: 12px 20px;
        background: var(--ink);
        font-size: 1rem;
        transform: translateY(-100%);
        visibility: hidden;
        transition: transform .3s ease, visibility .3s;
    }

    .site-nav.is-open {
        transform: none;
        visibility: visible;
    }

    .site-nav a {
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
    }

    .hero {
        padding: 72px 0 64px;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6.6vw, 1.95rem);
    }

    .section,
    .terminal-section {
        padding: 52px 0;
    }

    .section .shell,
    .terminal-section .shell {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .terminal-screen {
        height: 320px;
        font-size: 0.75rem;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .will-reveal {
        opacity: 1;
        transform: none;
    }

    * {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

    .terminal {
        transform: none !important;
    }
}
