/* ==========================================================================
   Home — Matrix green on black, restrained.

   The brief was "tasteful, elegant, professional, not childish", so this
   deliberately avoids the loud terminal tropes: no glitch text, no hex dumps,
   no blinking cursors, no marquee headings, no glow on body copy.

   How the green is used:
     · Body text is warm off-white, NOT green — green on black at body size
       is tiring to read and reads as costume rather than design.
     · Green is an ACCENT: hairlines, marks, small labels, hover states.
     · Exactly one accent hue. No secondary colour.
   ========================================================================== */

:root {
    --bg:        #080808;
    --bg-raise:  #0d0f0d;
    --line:      rgba(255, 255, 255, 0.08);
    --line-soft: rgba(255, 255, 255, 0.05);
    --green:     #00ff41;
    --green-soft: rgba(0, 255, 65, 0.5);
    --green-dim: rgba(0, 255, 65, 0.28);

    /* Off-white body text — the readability decision that keeps this adult. */
    --ink:    #f0f0ec;
    --ink-2:  #a9ada7;
    --ink-3:  #6f746e;

    --font: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --maxw: 1080px;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Texture only — barely present, so it reads as atmosphere not decoration. */
#rain {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.07;
    pointer-events: none;
}
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0px, rgba(0,0,0,0) 3px,
        rgba(0,0,0,.30) 4px, rgba(0,0,0,.30) 5px
    );
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 1px solid var(--green); outline-offset: 4px; }

.wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ── Header ────────────────────────────────────────────────────── */
.top {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(8, 8, 8, 0.86);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--line-soft);
}
.top .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border: 1px solid var(--green-dim);
    border-radius: 3px;
    color: var(--green);
    font-size: 11px;
    letter-spacing: .06em;
}
.brand-name { font-size: 14px; letter-spacing: .04em; color: var(--ink); }

.top-nav { display: flex; gap: 1.75rem; margin-inline-start: auto; }
.top-nav a {
    position: relative;
    font-size: 13px;
    letter-spacing: .08em;
    color: var(--ink-3);
    text-decoration: none;
    transition: color .18s var(--ease);
}
.top-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--green);
    transform: scaleX(0);
    transition: transform .22s var(--ease);
}
/* The operator entrance has no visible link from the public page — see
   features/home/router.py. /login is reachable by direct URL only. */

.top-nav a:hover { color: var(--ink); }
.top-nav a:hover::after { transform: scaleX(1); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
    padding: clamp(4.5rem, 11vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem);
    border-bottom: 1px solid var(--line-soft);
}
.eyebrow {
    margin-bottom: 1.75rem;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--green);
}
.hero-name {
    font-size: clamp(2.1rem, 6.5vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.hero-title {
    margin-top: 1.1rem;
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    letter-spacing: .02em;
    color: var(--green-soft);
}
.hero-cred {
    margin-top: .35rem;
    font-size: 14px;
    color: var(--ink-3);
}
.hero-summary {
    margin-top: 2rem;
    max-width: 56ch;
    font-size: 16px;
    color: var(--ink-2);
}

.focus {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem .9rem;
    margin-top: 2.25rem;
}
.focus-item {
    padding: 5px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--ink-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    border: 1px solid var(--green);
    border-radius: 3px;
    background: var(--green);
    color: #04120a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1em;
    text-decoration: none;
    transition: opacity .18s, transform .18s, background .18s;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--green-dim); color: var(--green); opacity: 1; }

/* ── Sections ──────────────────────────────────────────────────── */
.section {
    padding: clamp(4rem, 9vw, 7rem) 0;
    border-bottom: 1px solid var(--line-soft);
}

.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); max-width: 58ch; }
.section-rule {
    display: block;
    width: 42px; height: 1px;
    margin-bottom: 1.5rem;
    background: var(--green);
}
.section-head h2 {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    letter-spacing: .01em;
    color: var(--ink);
}
.section-head p {
    margin-top: .9rem;
    font-size: 15px;
    color: var(--ink-2);
}

/* ── Practice blocks ───────────────────────────────────────────── */
.blocks {
    display: grid;
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.block {
    padding: clamp(1.5rem, 3vw, 2.1rem);
    background: var(--bg);
    transition: background .2s;
}
.block:hover { background: var(--bg-raise); }
.mark {
    display: block;
    margin-bottom: 1rem;
    font-size: 11px;
    letter-spacing: .2em;
    color: var(--green);
}
.block h3 {
    font-size: 1.05rem;
    letter-spacing: .01em;
    margin-bottom: .6rem;
    color: var(--ink);
}
.block p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }

/* ── Experience ────────────────────────────────────────────────── */
.roles { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }
.role {
    display: grid;
    grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem);
}
.role-when {
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--ink-3);
}
.role-period { display: block; }
.role-place { display: block; margin-top: .3rem; color: var(--ink-3); opacity: .75; }

.role-body h3 { font-size: 1.15rem; letter-spacing: .01em; color: var(--ink); }
.role-org {
    margin-top: .3rem;
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--green-soft);
}
.role-points { margin-top: 1.25rem; display: grid; gap: .7rem; }
.role-points li {
    position: relative;
    padding-inline-start: 1.35rem;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.7;
}
.role-points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0; top: .78em;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--green-dim);
}

@media (max-width: 700px) { .role { grid-template-columns: 1fr; gap: .75rem; } }

/* ── Credentials ───────────────────────────────────────────────── */
.creds {
    display: grid;
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.cred {
    display: grid;
    gap: .35rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    background: var(--bg);
}
.cred-label {
    font-size: 10.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--green);
}
.cred-value { font-size: 15px; color: var(--ink); }
.cred-detail { font-size: 13px; color: var(--ink-3); }

.skills {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.skill-label {
    font-size: 10.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: .9rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 12px;
    color: var(--ink-2);
    transition: border-color .18s, color .18s;
}
.chip:hover { border-color: var(--green-dim); color: var(--ink); }

/* ── Contact ───────────────────────────────────────────────────── */
.contact-links {
    display: grid;
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.contact-item {
    display: grid;
    gap: .4rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    background: var(--bg);
    text-decoration: none;
    transition: background .2s;
}
a.contact-item:hover { background: var(--bg-raise); }
.contact-label {
    font-size: 10.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--green);
}
.contact-value { font-size: 14px; color: var(--ink); word-break: break-word; }
a.contact-item:hover .contact-value { color: var(--green); }

/* ── Footer ────────────────────────────────────────────────────── */
.foot {
    position: relative;
    z-index: 2;
    padding: 2.5rem 0;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--ink-3);
}
.foot .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}
.foot-sep { color: var(--green-dim); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .top-nav { display: none; }
}

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