/*
    Aaron Studer — Portfolio
    Hand-written stylesheet. No framework, no build step.

    Contents:
      1. Tokens
      2. Reset & base
      3. Layout primitives
      4. Header / nav
      5. Hero + neural canvas
      6. Section chrome
      7. About
      8. Experience timeline
      9. Education
     10. Skills
     11. Growth
     12. Contact
     13. Footer
     14. Reveal animations
     15. Responsive
*/

/*
    ------------------
    ----- 1. Tokens
    ------------------
*/

:root {
    /* Surface */
    --bg:            #06070a;
    --bg-soft:       #0a0c12;
    --panel:         rgba(255, 255, 255, 0.035);
    --panel-strong:  rgba(255, 255, 255, 0.06);
    --line:          rgba(255, 255, 255, 0.09);
    --line-strong:   rgba(255, 255, 255, 0.16);

    /* Ink */
    --txt:           #e9edf5;
    --muted:         #99a3b8;
    --dim:           #6d768a;

    /* Accents */
    --cy:            #56e3f0;
    --vi:            #9b8cfa;
    --cy-soft:       rgba(86, 227, 240, 0.14);
    --vi-soft:       rgba(155, 140, 250, 0.14);

    /* Type */
    --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --disp:  "Space Grotesk", var(--sans);
    --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Rhythm */
    --gutter:   clamp(1.25rem, 5vw, 3rem);
    --section:  clamp(5rem, 12vh, 8.5rem);
    --radius:   16px;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/*
    ------------------------
    ----- 2. Reset & base
    ------------------------
*/

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--txt);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
    font-family: var(--disp);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

ul { margin: 0; padding: 0; list-style: none; }

::selection {
    background: var(--cy);
    color: #04141a;
}

:focus-visible {
    outline: 2px solid var(--cy);
    outline-offset: 3px;
    border-radius: 4px;
}

/*
    Ambient network behind the whole page. It sits above the body colour and
    below every section, so translucent section backgrounds let it show through.
*/
#field {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s var(--ease);
}

#field.lit { opacity: 0.7; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 200;
    padding: 0.75rem 1.15rem;
    background: var(--cy);
    color: #04141a;
    font-weight: 600;
    border-radius: 10px;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/*
    -----------------------------
    ----- 3. Layout primitives
    -----------------------------
*/

.wrap {
    width: min(1140px, 100% - var(--gutter) * 2);
    margin-inline: auto;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cy);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cy));
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 0.925rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
                border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn-primary {
    background: linear-gradient(135deg, var(--cy), var(--vi));
    color: #06070a;
    box-shadow: 0 10px 40px -14px rgba(86, 227, 240, 0.7);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 50px -14px rgba(86, 227, 240, 0.85);
}

.btn-ghost {
    background: var(--panel);
    border-color: var(--line);
    color: var(--txt);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    background: var(--panel-strong);
}

/* Frosted card shared by several sections */
.card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    overflow: hidden;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
                background-color 0.35s var(--ease);
}

.card::after {
    /* hairline highlight along the top edge */
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 30%, transparent 70%);
}

/*
    ------------------------
    ----- 4. Header / nav
    ------------------------
*/

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 1.25rem 0;
    transition: padding 0.3s var(--ease), background-color 0.3s var(--ease),
                border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
    border-bottom: 1px solid transparent;
}

.site-header.stuck {
    padding: 0.7rem 0;
    background: rgba(6, 7, 10, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--disp);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--cy), var(--vi));
    color: #06070a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* The CTA is a button, so it opts out of the plain nav-link treatment */
.nav a:not(.nav-cta) {
    position: relative;
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    color: var(--muted);
    border-radius: 999px;
    transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.nav a:not(.nav-cta):hover { color: var(--txt); background: var(--panel); }

.nav a:not(.nav-cta).active {
    color: var(--txt);
    background: var(--panel-strong);
}

.nav a:not(.nav-cta).active::before {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.22rem;
    height: 1px;
    background: linear-gradient(90deg, var(--cy), var(--vi));
}

.nav-cta { margin-left: 0.5rem; padding: 0.6rem 1.15rem; font-size: 0.875rem; }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--txt);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 17px;
    height: 1.5px;
    margin: 3.5px auto;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/*
    --------------------------------
    ----- 5. Hero + neural canvas
    --------------------------------
*/

.hero {
    position: relative;
    z-index: 1;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    isolation: isolate;
    overflow: hidden;
}

.hero-veil {
    /* ambient wash behind everything, and a fade into the next section */
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(70% 60% at 78% 42%, rgba(155, 140, 250, 0.10), transparent 62%),
        /* only a light touch at the top, so the ambient network stays visible up there */
        linear-gradient(180deg, rgba(6, 7, 10, 0.22) 0%, transparent 11%, transparent 68%, var(--bg) 100%);
}

.hero-inner {
    width: min(1140px, 100% - var(--gutter) * 2);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
}

/* The brain sits in its own column as the subject of the hero */
.hero-visual {
    position: relative;
    aspect-ratio: 1;
    isolation: isolate;
    /* stays square without ever outgrowing a short viewport */
    width: min(100%, 64vh);
    justify-self: center;
}

.hero-visual::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 92%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 46% 42%, rgba(86, 227, 240, 0.16), transparent 58%),
        radial-gradient(circle at 62% 66%, rgba(155, 140, 250, 0.20), transparent 62%);
    filter: blur(26px);
    z-index: -1;
}

#neural {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.hero-visual-hint {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.63rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
    opacity: 0.75;
    pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; }

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.95rem 0.4rem 0.7rem;
    margin-bottom: 1.75rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.pulse {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cy);
    flex-shrink: 0;
}

.pulse::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--cy);
    animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
    0%   { transform: scale(0.6); opacity: 0.9; }
    70%  { transform: scale(1.7); opacity: 0; }
    100% { transform: scale(1.7); opacity: 0; }
}

.hero h1 {
    font-size: clamp(3.1rem, 11vw, 7.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.92;
    margin-bottom: 1.4rem;
}

.hero h1 .line { display: block; }

.hero h1 .accent {
    background: linear-gradient(105deg, var(--cy) 10%, var(--vi) 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-role {
    font-family: var(--mono);
    font-size: clamp(0.8rem, 1.6vw, 0.95rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--txt);
    margin-bottom: 1.5rem;
}

.hero-role span { color: var(--dim); margin: 0 0.55rem; }

.hero-lede {
    max-width: 46ch;
    font-size: clamp(1.02rem, 1.9vw, 1.22rem);
    color: var(--muted);
    margin-bottom: 2.4rem;
}

.hero-lede strong { color: var(--txt); font-weight: 600; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 3.5rem;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    max-width: 640px;
}

.hero-facts div { min-width: 8rem; }

.hero-facts dt {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 0.3rem;
}

.hero-facts dd {
    margin: 0;
    font-family: var(--disp);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--txt);
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.63rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 0.25s var(--ease);
}

.scroll-cue:hover { color: var(--txt); }

.scroll-cue svg {
    width: 15px;
    height: 15px;
    animation: bob 2.2s var(--ease) infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

/*
    -------------------------
    ----- 6. Section chrome
    -------------------------
*/

.section { padding: var(--section) 0; position: relative; z-index: 1; }

.section-alt {
    /* translucent so the ambient network stays faintly visible underneath */
    background: rgba(10, 12, 18, 0.78);
    border-block: 1px solid var(--line);
}

.section-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); max-width: 60ch; }

.section-head h2 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    letter-spacing: -0.035em;
}

.section-head p:not(.eyebrow) {
    margin-top: 1rem;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

/*
    ----------------
    ----- 7. About
    ----------------
*/

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

/* The portrait is a cut-out, so it floats on the page instead of sitting in a box */
.portrait {
    position: relative;
    margin: 0;
    padding-top: 1rem;
    isolation: isolate; /* keeps the negative-z glow inside this figure */
}

.portrait::before {
    /* glow behind the figure */
    content: "";
    position: absolute;
    left: 50%;
    top: 8%;
    width: 108%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 35%, rgba(86, 227, 240, 0.20), transparent 62%),
        radial-gradient(circle at 70% 70%, rgba(155, 140, 250, 0.18), transparent 60%);
    filter: blur(14px);
    z-index: -1;
}

.portrait::after {
    /* soft shadow the figure appears to stand on */
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2.6rem;
    width: 62%;
    height: 26px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
    z-index: -1;
}

.portrait img {
    width: 100%;
    height: auto;
    /* fade the bottom edge so the crop never reads as a hard cut */
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
    mask-image: linear-gradient(180deg, #000 78%, transparent 99%);
    filter: saturate(1.03) contrast(1.04);
}

.portrait figcaption {
    text-align: center;
    margin-top: -0.75rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--dim);
}

.about-copy p { font-size: 1.06rem; color: var(--muted); }
.about-copy p strong { color: var(--txt); font-weight: 600; }

.about-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-top: 2.25rem;
}

.tile {
    padding: 1.1rem 1.25rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 13px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.tile:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.tile h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tile h3 svg { width: 16px; height: 16px; color: var(--cy); }

.tile p { font-size: 0.87rem; color: var(--dim); line-height: 1.55; }

/*
    ----------------------------
    ----- 8. Experience timeline
    ----------------------------
*/

/* Current role — the headline card of the whole page */
.current-role {
    position: relative;
    margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border-radius: 22px;
    background:
        radial-gradient(120% 130% at 0% 0%, rgba(86, 227, 240, 0.10), transparent 55%),
        radial-gradient(120% 130% at 100% 100%, rgba(155, 140, 250, 0.12), transparent 55%),
        var(--panel);
    border: 1px solid var(--line-strong);
    overflow: hidden;
}

.current-role-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.25rem;
}

.current-role h3 { font-size: clamp(1.45rem, 3.5vw, 2rem); }

.current-role h4 {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--cy);
    margin-top: 0.35rem;
}

.date-badge {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(6, 7, 10, 0.5);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.current-role > p { color: var(--muted); max-width: 68ch; }

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.work-item {
    padding: 1.15rem 1.3rem;
    background: rgba(6, 7, 10, 0.45);
    border: 1px solid var(--line);
    border-radius: 13px;
    transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.work-item:hover { border-color: var(--line-strong); background: rgba(6, 7, 10, 0.7); }

.work-item h5 {
    font-family: var(--disp);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.work-item h5 svg { width: 17px; height: 17px; color: var(--vi); flex-shrink: 0; }

.work-item p { font-size: 0.86rem; color: var(--dim); line-height: 1.55; margin: 0; }

/* Vertical timeline for previous roles */
.timeline {
    position: relative;
    padding-left: 2.25rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0.65rem;
    bottom: 0.65rem;
    width: 1px;
    background: linear-gradient(180deg, var(--line-strong), var(--line) 55%, transparent);
}

.tl-item { position: relative; padding-bottom: 2.75rem; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
    content: "";
    position: absolute;
    left: -2.25rem;
    top: 0.6rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.tl-item::after {
    content: "";
    position: absolute;
    left: calc(-2.25rem + 5px);
    top: calc(0.6rem + 5px);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--dim);
    transition: background-color 0.3s var(--ease);
}

.tl-item:hover::before { border-color: var(--cy); box-shadow: 0 0 0 4px var(--cy-soft); }
.tl-item:hover::after { background: var(--cy); }

.tl-date {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--dim);
    display: block;
    margin-bottom: 0.45rem;
}

.tl-item h3 { font-size: 1.2rem; }

.tl-item h4 {
    font-family: var(--sans);
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--vi);
    margin: 0.3rem 0 0.75rem;
}

.tl-item p { color: var(--muted); font-size: 0.95rem; max-width: 72ch; }

/*
    -------------------
    ----- 9. Projects
    -------------------
*/

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.15rem;
}

.project {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.65rem 1.6rem 1.5rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
                background-color 0.35s var(--ease);
}

.project::before {
    /* accent wash that comes up on hover */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 100% 0%, rgba(155, 140, 250, 0.14), transparent 58%);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    pointer-events: none;
}

.project:hover {
    border-color: var(--line-strong);
    background: var(--panel-strong);
    transform: translateY(-4px);
}

.project:hover::before { opacity: 1; }

.project-top {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-kind {
    font-family: var(--mono);
    font-size: 0.67rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cy);
    padding-top: 0.35rem;
}

.project-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: var(--vi);
    opacity: 0.8;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.project:hover .project-icon { opacity: 1; transform: translateY(-2px); }

.project h3 {
    position: relative;
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
}

.project > p {
    position: relative;
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 1.35rem;
}

.project-tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.project-tags li {
    padding: 0.28rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--dim);
}

/*
    ---------------------
    ----- 10. Education
    ---------------------
*/

.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.15rem;
}

.edu-grid .card:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.edu-grid h3 { font-size: 1.18rem; margin: 1rem 0 0.4rem; }

.edu-grid h4 {
    font-family: var(--sans);
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--cy);
    margin: 0.55rem 0 0.9rem;
}

.edu-grid p { color: var(--muted); font-size: 0.93rem; }

/*
    -----------------
    ----- 10. Skills
    -----------------
*/

.skill-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.15rem;
}

.skill-group h3 {
    font-size: 0.78rem;
    font-family: var(--mono);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chips li {
    padding: 0.42rem 0.85rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--muted);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
                background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.chips li:hover {
    color: var(--txt);
    border-color: var(--line-strong);
    background: var(--panel-strong);
    transform: translateY(-2px);
}

/*
    -----------------
    ----- 11. Growth
    -----------------
*/

.growth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.15rem;
    counter-reset: growth;
}

.growth-item {
    position: relative;
    padding: 1.6rem 1.5rem 1.5rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.growth-item:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.growth-item::before {
    counter-increment: growth;
    content: counter(growth, decimal-leading-zero);
    display: block;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--vi);
    margin-bottom: 0.75rem;
}

.growth-item h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.growth-item p { font-size: 0.89rem; color: var(--dim); line-height: 1.6; }

.growth-note {
    margin-top: 1.75rem;
    padding-left: 1.15rem;
    border-left: 2px solid var(--cy);
    color: var(--muted);
    font-size: 0.97rem;
    max-width: 68ch;
}

/*
    ------------------
    ----- 12. Contact
    ------------------
*/

.contact { position: relative; overflow: hidden; }

.contact::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -30%;
    width: min(900px, 120vw);
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(86, 227, 240, 0.09), transparent 62%);
    pointer-events: none;
}

.contact-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.contact-grid h2 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
}

.contact-grid > div > p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; max-width: 42ch; }

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 2rem;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.1rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
    color: var(--muted);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
                transform 0.25s var(--ease);
}

.contact-links a:hover { color: var(--txt); border-color: var(--line-strong); transform: translateY(-2px); }
.contact-links svg { width: 16px; height: 16px; }

.contact-form { display: grid; gap: 0.85rem; }

.contact-form label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: -0.35rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.95rem 1.15rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--txt);
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.contact-form textarea { resize: vertical; min-height: 160px; }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--dim); }

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--cy);
    background: rgba(255, 255, 255, 0.045);
}

.contact-form button { justify-content: center; margin-top: 0.35rem; }

/*
    -----------------
    ----- 13. Footer
    -----------------
*/

.site-footer {
    position: relative;
    z-index: 1;
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
    background: rgba(10, 12, 18, 0.78);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.footer-inner p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dim);
}

.socials { display: flex; gap: 0.5rem; }

.socials a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
                transform 0.25s var(--ease), background-color 0.25s var(--ease);
}

.socials a:hover {
    color: var(--txt);
    border-color: var(--line-strong);
    background: var(--panel);
    transform: translateY(-2px);
}

.socials svg { width: 17px; height: 17px; }

.to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color 0.25s var(--ease);
}

.to-top:hover { color: var(--txt); }
.to-top svg { width: 14px; height: 14px; }

/*
    ------------------------------
    ----- 14. Reveal animations
    ------------------------------
*/

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

/* Staggering is driven by --i set in the markup */
.reveal[style*="--i"] { transition-delay: calc(var(--i) * 70ms); }

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

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

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

/*
    ---------------------
    ----- 15. Responsive
    ---------------------
*/

@media (max-width: 980px) {
    /* Not enough room for two columns, so the brain moves behind the text */
    .hero-inner { grid-template-columns: 1fr; }

    .hero-visual {
        position: absolute;
        inset: 0;
        width: auto;
        aspect-ratio: auto;
        z-index: -2;
        opacity: 0.3;
    }

    .hero-visual::before { width: 62%; }
    .hero-visual-hint { display: none; }
    #neural { cursor: default; }
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .portrait { max-width: 300px; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
    .nav-toggle { display: block; }

    .nav {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: grid;
        place-items: center;
        background: rgba(6, 7, 10, 0.96);
        backdrop-filter: blur(18px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
    }

    body.nav-open .nav { opacity: 1; visibility: visible; }

    .nav ul {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }

    .nav a { font-size: 1.4rem; font-family: var(--disp); padding: 0.7rem 1.5rem; }
    .nav a.active::before { display: none; }
    .nav-cta { margin: 0.75rem 0 0; font-size: 1rem; }

    .hero { padding-top: 7rem; }
    .hero-facts { gap: 1.25rem 2rem; }
    .timeline { padding-left: 1.75rem; }
    .tl-item::before { left: -1.75rem; }
    .tl-item::after { left: calc(-1.75rem + 5px); }
    .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
    .hero-actions .btn { width: 100%; justify-content: center; }
    .scroll-cue { display: none; }
}
