@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap");

/* ===================================================================
 * tokens
 * ------------------------------------------------------------------- */
:root {
    --bg:          #05070d;
    --bg-2:        #0a0f1a;
    --panel:       rgba(13, 20, 35, 0.72);
    --panel-solid: #0d1423;
    --line:        rgba(34, 230, 255, 0.16);
    --line-strong: rgba(34, 230, 255, 0.45);

    --cyan:        #22e6ff;
    --cyan-dim:    #12a9bd;
    --magenta:     #ff3d9a;
    --amber:       #ffb020;

    --text:        #d6e2f2;
    --text-muted:  #8693aa;
    --text-faint:  #6b7891;

    --font-head: "Space Grotesk", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

    --wrap: 1120px;
    --header-h: 64px;
    --glow-cyan: 0 0 18px rgba(34, 230, 255, 0.35);
    --glow-magenta: 0 0 18px rgba(255, 61, 154, 0.35);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* faint scanlines over everything */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.018) 0,
        rgba(255, 255, 255, 0.018) 1px,
        transparent 1px,
        transparent 3px
    );
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color .2s, text-shadow .2s;
}

a:hover, a:focus-visible {
    color: #fff;
    text-shadow: var(--glow-cyan);
}

:focus-visible {
    outline: 1px solid var(--cyan);
    outline-offset: 3px;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    margin: 0;
}

p { margin: 0 0 1.2em; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.mono {
    font-family: var(--font-mono);
    letter-spacing: .02em;
}

/* ===================================================================
 * header
 * ------------------------------------------------------------------- */
.hdr {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(5, 7, 13, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.hdr__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hdr__logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    letter-spacing: .08em;
}

.hdr__logo span { color: var(--cyan); }

.hdr__logo::after {
    content: "_";
    color: var(--cyan);
    animation: blink 1.1s steps(1) infinite;
}

.nav {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    display: block;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.nav a b {
    font-weight: 400;
    color: var(--text-faint);
    margin-right: 6px;
}

.nav a:hover, .nav a:focus-visible {
    color: #fff;
    text-shadow: none;
    border-color: var(--line);
}

.nav a.is-current {
    color: var(--cyan);
    border-color: var(--line-strong);
    background: rgba(34, 230, 255, 0.06);
}

.nav a.is-current b { color: var(--cyan-dim); }

.hdr__status {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.hdr__status::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: #3dff9a;
    box-shadow: 0 0 8px #3dff9a;
    vertical-align: 1px;
}

.hdr__toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
}

/* ===================================================================
 * hero
 * ------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: calc(var(--header-h) + 48px) 0 140px;
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background: url("../images/milkyway.jpg") center / cover no-repeat;
    filter: saturate(1.2) brightness(.75);
}

/* cyan/magenta duotone wash */
.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(255, 61, 154, 0.28), transparent 55%),
        radial-gradient(ellipse at 10% 80%, rgba(34, 230, 255, 0.22), transparent 55%),
        linear-gradient(to bottom, rgba(5, 7, 13, 0.25), var(--bg) 96%);
}

/* receding perspective grid */
.hero__grid {
    position: absolute;
    left: -50%;
    right: -50%;
    bottom: -10%;
    height: 55%;
    z-index: -2;
    background-image:
        linear-gradient(var(--line-strong) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(420px) rotateX(62deg);
    transform-origin: center top;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent);
    animation: grid-move 6s linear infinite;
    opacity: .55;
}

.hero__content > div {
    max-width: 760px;
}

.hero__kicker {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--cyan);
    margin-bottom: 20px;
    min-height: 1.7em;
}

.hero__kicker .prompt { color: var(--magenta); }

.hero h1 {
    /* Space Grotesk has no Greek, so Greek letters fall back to Plex Sans */
    font-family: var(--font-head), "IBM Plex Sans", sans-serif;
    white-space: nowrap;
    font-size: clamp(40px, 8vw, 92px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1;
    margin-bottom: 20px;
}

/* characters still scrambling */
.decode__glyph {
    color: var(--cyan);
    text-shadow: var(--glow-cyan);
}

.hero__sub {
    font-size: 19px;
    color: var(--text);
    max-width: 34em;
    margin-bottom: 32px;
}

.hero__sub em {
    font-style: normal;
    color: var(--cyan);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--cyan);
    border: 1px solid var(--line-strong);
    background: rgba(34, 230, 255, 0.04);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: background .2s, color .2s, box-shadow .2s;
}

.btn:hover, .btn:focus-visible {
    color: var(--bg);
    background: var(--cyan);
    text-shadow: none;
    box-shadow: var(--glow-cyan);
}

.btn--alt {
    color: var(--magenta);
    border-color: rgba(255, 61, 154, 0.5);
    background: rgba(255, 61, 154, 0.04);
}

.btn--alt:hover, .btn--alt:focus-visible {
    background: var(--magenta);
    box-shadow: var(--glow-magenta);
}

.social {
    display: flex;
    gap: 18px;
    font-size: 26px;
}

.social a { color: var(--text-muted); }
.social a:hover, .social a:focus-visible { color: var(--cyan); }

/* HUD corner brackets around the photo */
.hud { position: relative; }

.hud::before, .hud::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--cyan);
    pointer-events: none;
}

.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero__scroll::after {
    content: "";
    display: block;
    width: 1px;
    height: 36px;
    margin: 10px auto 0;
    background: linear-gradient(var(--cyan), transparent);
    animation: drip 2s ease-in-out infinite;
}

/* ===================================================================
 * sections
 * ------------------------------------------------------------------- */
.section {
    position: relative;
    padding: 112px 0;
    border-top: 1px solid var(--line);
}

.section--alt {
    background:
        linear-gradient(rgba(34, 230, 255, 0.025) 1px, transparent 1px) 0 0 / 100% 48px,
        var(--bg-2);
}

.section--page {
    min-height: calc(100vh - 120px);
    padding-top: calc(var(--header-h) + 96px);
    border-top: none;
}

.label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--cyan);
    margin-bottom: 18px;
}

.label::after {
    content: "";
    flex: 1;
    height: 1px;
    max-width: 160px;
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.section h2 {
    font-size: clamp(32px, 4.5vw, 48px);
    letter-spacing: -.01em;
    margin-bottom: 20px;
}

.section__intro {
    max-width: 44em;
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 40px;
}

.subhead {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #fff;
    margin: 64px 0 24px;
}

.subhead span { color: var(--magenta); }

/* ===================================================================
 * about
 * ------------------------------------------------------------------- */
.about {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.about__photo {
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    overflow: hidden;
}

.about__photo img {
    display: block;
    width: 100%;
    height: auto;
}

/* scanning line over the photo */
.about__scan {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    opacity: .7;
    animation: scan 4.5s ease-in-out infinite;
}

.about__caption {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.about__text p { color: var(--text); }

.spec {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 36px;
    background: var(--line);
    border: 1px solid var(--line);
}

.spec > div {
    padding: 16px 18px;
    background: var(--bg);
}

.spec dt {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.spec dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* ===================================================================
 * research
 * ------------------------------------------------------------------- */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tags li {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 5px 12px;
    color: var(--cyan);
    border: 1px solid var(--line);
    background: rgba(34, 230, 255, 0.04);
}

.tags li::before {
    content: "#";
    color: var(--magenta);
    margin-right: 2px;
}

.pubs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.pub {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 28px 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    transition: border-color .25s, box-shadow .25s, transform .25s;
}

.pub::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 48px;
    height: 2px;
    background: var(--cyan);
    box-shadow: var(--glow-cyan);
    transition: width .35s ease;
}

.pub:hover {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 1px rgba(34, 230, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(-3px);
}

.pub:hover::before { width: calc(100% + 2px); }

.pub__meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-faint);
    margin-bottom: 14px;
}

.pub__meta .yr { color: var(--amber); }

.pub h3 {
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 12px;
}

.pub__authors {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pub__authors strong {
    color: #fff;
    font-weight: 600;
}

.pub__venue {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-faint);
}

.pub__links {
    display: flex;
    gap: 18px;
    margin-top: auto;
    padding-top: 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.pub__links a::after { content: " \2197"; }

/* terminal-style live feed */
.terminal {
    border: 1px solid var(--line);
    background: rgba(3, 5, 10, 0.85);
    font-family: var(--font-mono);
    font-size: 14px;
}

.terminal__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text-faint);
    font-size: 12px;
}

.terminal__bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-faint);
    opacity: .5;
}

.terminal__bar i:nth-child(1) { background: var(--magenta); opacity: .8; }
.terminal__bar i:nth-child(2) { background: var(--amber); opacity: .8; }
.terminal__bar i:nth-child(3) { background: #3dff9a; opacity: .8; }

.terminal__bar span { margin-left: 8px; }

.terminal__body { padding: 18px 20px 22px; }

.terminal__cmd { color: var(--text-muted); margin-bottom: 14px; }
.terminal__cmd .prompt { color: var(--magenta); }

.feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feed li {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(34, 230, 255, 0.1);
    line-height: 1.55;
}

.feed li:last-child { border-bottom: none; }

.feed__date { color: var(--amber); }

.feed__title {
    display: block;
    font-family: var(--font-body);
    font-size: 15px;
    color: #fff;
}

.feed__authors {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-faint);
}

.feed__authors strong { color: var(--text-muted); }

.terminal__status { color: var(--text-faint); }

.terminal__status::after {
    content: "\2588";
    margin-left: 4px;
    color: var(--cyan);
    animation: blink 1.1s steps(1) infinite;
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

/* ===================================================================
 * timeline lists (teaching, events)
 * ------------------------------------------------------------------- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 28px;
    border-left: 1px solid var(--line);
    max-width: 860px;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(34, 230, 255, 0.08);
}

.timeline li:last-child { border-bottom: none; }

.timeline li::before {
    content: "";
    position: absolute;
    left: -33px;
    top: 27px;
    width: 9px;
    height: 9px;
    background: var(--bg);
    border: 1px solid var(--cyan);
    transform: rotate(45deg);
    transition: background .2s, box-shadow .2s;
}

.timeline li:hover::before {
    background: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.timeline__date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--amber);
    padding-top: 3px;
}

.timeline__title {
    display: block;
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.timeline__detail {
    color: var(--text-muted);
    font-size: 15px;
}

.timeline__role {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--magenta);
    border: 1px solid rgba(255, 61, 154, 0.4);
    vertical-align: 2px;
}

/* ===================================================================
 * footer
 * ------------------------------------------------------------------- */
.ftr {
    padding: 36px 0;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
}

.ftr .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

/* ===================================================================
 * reveal on scroll
 * ------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ===================================================================
 * keyframes
 * ------------------------------------------------------------------- */
@keyframes blink { 50% { opacity: 0; } }

@keyframes grid-move {
    from { background-position: 0 0; }
    to   { background-position: 0 64px; }
}

@keyframes scan {
    0%, 100% { top: 10px; }
    50%      { top: calc(100% - 12px); }
}

@keyframes drip {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

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

/* ===================================================================
 * responsive
 * ------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .hdr__status { display: none; }
    .about { grid-template-columns: 1fr; gap: 40px; }
    .about__photo { max-width: 260px; }
}

@media (max-width: 800px) {
    .hdr__toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 12px 16px 20px;
        background: rgba(5, 7, 13, 0.97);
        border-bottom: 1px solid var(--line);
    }
    .hdr.is-open .nav { display: flex; }
    .nav a { padding: 14px 12px; font-size: 14px; border-bottom: 1px solid rgba(34, 230, 255, 0.08); }
    .pubs { grid-template-columns: 1fr; }
    .section { padding: 80px 0; }
    .section--page { padding-top: calc(var(--header-h) + 56px); }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .hero { padding-bottom: 110px; }
    .hero__sub { font-size: 17px; }
    .spec { grid-template-columns: 1fr; }
    .pub { padding: 22px 20px; }
    .feed li, .timeline li { grid-template-columns: 1fr; gap: 4px; }
    .timeline { padding-left: 22px; }
    .timeline li::before { left: -27px; top: 24px; }
}
