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

:root {
    --bg-deep: #060610;
    --bg-card: rgba(12, 14, 30, 0.85);
    --bg-card-hover: rgba(18, 20, 44, 0.92);
    --border-dim: rgba(100, 140, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.2);

    --cyan: #00f0ff;
    --cyan-dim: rgba(0, 240, 255, 0.15);
    --magenta: #ff00aa;
    --magenta-dim: rgba(255, 0, 170, 0.12);
    --amber: #ffb000;
    --amber-dim: rgba(255, 176, 0, 0.12);
    --green: #00e0a0;
    --red: #ff4060;
    --purple: #a855f7;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-dim: #64748b;
    --text-bright: #f8fafc;

    --font-serif: 'EB Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --content-width: 1040px;
    --nav-width: 160px;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan-dim) var(--bg-deep);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 3px; }

::selection {
    background: var(--cyan-dim);
    color: var(--cyan);
}

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

/* ── LOADER ──────────────────────────────────────────────── */
#loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-cell {
    margin-bottom: 28px;
    position: relative;
}

#loaderCanvas {
    width: 140px;
    height: 140px;
}

.loader-equation {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.loader-matrix {
    opacity: 0;
    font-size: 3rem;
    font-weight: 600;
    font-family: 'Times New Roman';
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.loader-matrix.visible {
    opacity: 1;
    transform: translateY(0);
}

.loader-op {
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
    font-size: 3rem;
    font-weight: 600;
    font-family: 'Times New Roman';

}

.loader-op.visible { opacity: 1; }

#loaderL { color: var(--text-bright); }
#loaderD { color: var(--cyan); }
#loaderB { color: var(--magenta); }
#loaderA { color: var(--magenta); }

.loader-bar-container {
    width: 220px;
    height: 2px;
    background: var(--border-dim);
    border-radius: 1px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    border-radius: 1px;
    transition: width 0.1s linear;
}

.loader-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    display: flex;
    gap: 2px;
}

.loader-dots {
    animation: blink-dots 1s step-end infinite;
}

@keyframes blink-dots {
    0%, 33% { opacity: 1; }
    34%, 66% { opacity: 0.5; }
    67%, 100% { opacity: 0.2; }
}

/* ── BACKGROUND CANVAS ───────────────────────────────────── */
#networkCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── CHROMOSOME SCROLL ───────────────────────────────────── */
.chromo-scroll {
    position: fixed;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.chromo-scroll.visible { opacity: 1; }

#chromoCanvas {
    width: 24px;
    height: 100vh;
    max-height: 500px;
}

.chromo-marker {
    position: absolute;
    right: 0;
    width: 24px;
    height: 4px;
    background: var(--cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--cyan-dim);
    transition: top 0.1s ease;
}

/* ── NAVIGATION ──────────────────────────────────────────── */
.spec-nav {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.spec-nav.visible { opacity: 1; }

.nav-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 3px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 2px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(0, 240, 255, 0.04);
    border-left-color: var(--cyan-dim);
}

.nav-item.active {
    border-left-color: var(--cyan);
    background: rgba(0, 240, 255, 0.06);
}

.nav-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-item.active .nav-dot {
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
}

.nav-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-item.active .nav-text {
    color: var(--text-secondary);
}

/* ── MOBILE NAV TOGGLE ───────────────────────────────────── */
.nav-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 600;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--cyan);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── MAIN CONTENT ────────────────────────────────────────── */
main {
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 40px 0 calc(var(--nav-width) + 60px);
}

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 48px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 1px;
}

.section-dash {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-bright);
    letter-spacing: -0.5px;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero-section {
    min-height: 100vh;
    padding-top: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    align-items: center;
}

.hero-overline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.overline-helix {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

#overlineHelix {
    width: 24px;
    height: 24px;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 20px;
    color: var(--text-bright);
}

.name-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.name-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

.name-line:last-child {
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 420px;
    margin-bottom: 32px;
}

/* ── HERO PROFILE ROW ────────────────────────────────────── */
.hero-profile {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hero-avatar {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    overflow: hidden;
}

#avatarRingCanvas {
    width: 84px;
    height: 84px;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--bg-deep);
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.hero-avatar img:hover {
    transform: scale(1.08);
}

.hero-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 5px 0;
    transition: color 0.3s ease, transform 0.2s ease;
}

.hero-link:hover {
    color: var(--cyan);
    transform: translateX(4px);
}

.link-icon {
    font-size: 0.8rem;
    width: 20px;
    text-align: center;
    color: var(--cyan);
    opacity: 0.6;
    font-style: normal;
}

/* ── HERO VISUALIZATION ──────────────────────────────────── */
.hero-viz {
    position: relative;
}

#eigenCanvas {
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-dim);
    background: rgba(6, 6, 16, 0.5);
}

.viz-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.viz-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--cyan-dim); }
    50% { opacity: 0.4; box-shadow: 0 0 0 4px transparent; }
}

/* ── GENE STREAM ─────────────────────────────────────────── */
.gene-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.gene-bit {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--cyan);
    opacity: 0;
    animation: gene-float 12s linear forwards;
    white-space: nowrap;
}

@keyframes gene-float {
    0% { opacity: 0; transform: translateY(100vh) rotate(0deg); }
    5% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { opacity: 0; transform: translateY(-50px) rotate(15deg); }
}

/* ── ABOUT ───────────────────────────────────────────────── */
.about-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    margin-bottom: 48px;
}

.about-lead {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-primary);
    margin-bottom: 36px;
    max-width: 580px;
}

.interests-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.interest-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
}

.interest-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.interest-list li strong {
    color: var(--text-primary);
    font-weight: 500;
}

.interest-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 2px;
    font-style: italic;
}

.interest-marker {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    opacity: 0.5;
    flex-shrink: 0;
    margin-top: 8px;
}

.about-closing {
    padding: 20px 24px;
    border-left: 2px solid var(--cyan-dim);
}

.about-closing p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--text-dim);
}

/* ── CELL CANVAS ─────────────────────────────────────────── */
.about-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell-canvas-container {
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(6, 6, 16, 0.4);
}

#cellCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.cell-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    text-align: center;
    padding: 8px;
    letter-spacing: 0.5px;
}

/* ── EDUCATION ───────────────────────────────────────────── */
.education-block {
    margin-top: 12px;
}

.subsection-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.edu-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.edu-item {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    background: var(--bg-card);
    transition: border-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 12px;
}

.edu-item:hover {
    border-color: var(--border-glow);
    transform: translateX(4px);
}

.edu-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.edu-marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    border: 2px solid var(--bg-deep);
    box-shadow: 0 0 0 2px var(--cyan-dim);
}

.edu-marker-line {
    width: 1px;
    flex: 1;
    min-height: 20px;
    background: var(--cyan-dim);
    margin-top: 4px;
}

.edu-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    min-width: 80px;
    padding-top: 2px;
}

.edu-degree {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.edu-school {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.edu-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
}

/* ── RESEARCH ────────────────────────────────────────────── */
.direction-card {
    display: flex;
    gap: 28px;
    padding: 32px;
    border: 1px solid var(--border-dim);
    border-radius: 16px;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.direction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--amber));
}

.direction-helix {
    flex-shrink: 0;
    opacity: 0.6;
}

#helixCanvas { display: block; }

.direction-body h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--text-bright);
    margin-bottom: 16px;
}

.direction-body > p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.direction-body ul {
    list-style: none;
    margin-bottom: 24px;
}

.direction-body ul li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    gap: 12px;
}

.direction-body ul li:last-child { border-bottom: none; }

.dir-icon {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--cyan);
    opacity: 0.7;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.direction-equation {
    margin-bottom: 20px;
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(6, 6, 16, 0.4);
}

#equationCanvas {
    width: 100%;
    max-width: 400px;
    height: 60px;
    display: block;
}

.direction-note {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-dim) !important;
    margin-bottom: 0 !important;
}

/* ── PROJECTS ────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.project-card {
    padding: 28px 32px;
    border: 1px solid var(--border-dim);
    border-radius: 16px;
    background: var(--bg-card);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    transition: all 0.4s ease;
}

.project-card[data-accent="cyan"]::before { background: var(--cyan); opacity: 0.3; }
.project-card[data-accent="magenta"]::before { background: var(--magenta); opacity: 0.3; }
.project-card[data-accent="amber"]::before { background: var(--amber); opacity: 0.3; }

.project-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px) translateX(4px);
    box-shadow: 0 16px 48px rgba(0, 240, 255, 0.06);
}

.project-card:hover::before { opacity: 1; width: 4px; }

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-icon-bio {
    width: 48px;
    height: 48px;
}

.project-mini-viz {
    width: 48px;
    height: 48px;
    display: block;
}

.project-github {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 6px 14px;
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-github:hover {
    color: var(--cyan);
    border-color: var(--cyan-dim);
    transform: translateX(2px);
}

.gh-arrow {
    transition: transform 0.3s ease;
}

.project-github:hover .gh-arrow {
    transform: translateX(3px);
}

.project-card h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--cyan);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.project-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.project-focus span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.06);
    color: var(--text-dim);
    border: 1px solid var(--border-dim);
    transition: all 0.2s ease;
}

.project-focus span:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--text-secondary);
}

.project-bar {
    width: 100%;
    height: 2px;
    background: var(--border-dim);
    border-radius: 1px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.project-bar-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0%;
}

.project-card[data-accent="cyan"] .project-bar-fill {
    background: linear-gradient(90deg, var(--cyan), transparent);
}

.project-card[data-accent="magenta"] .project-bar-fill {
    background: linear-gradient(90deg, var(--magenta), transparent);
}

.project-card[data-accent="amber"] .project-bar-fill {
    background: linear-gradient(90deg, var(--amber), transparent);
}

.section.in-view .project-bar-fill {
    width: var(--bar-width, 0%) !important;
}

/* ── SKILLS ──────────────────────────────────────────────── */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.skill-cat-header h4 {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-bright);
    white-space: nowrap;
}

.skill-cat-line {
    flex: 1;
    height: 1px;
    background: var(--border-dim);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: var(--font-mono);
    transition: all 0.2s ease;
    border: 1px solid;
    cursor: default;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skill-tag.lang {
    background: rgba(0, 240, 255, 0.08);
    color: var(--cyan);
    border-color: rgba(0, 240, 255, 0.15);
}

.skill-tag.lang-sec {
    background: rgba(0, 240, 255, 0.04);
    color: var(--text-dim);
    border-color: var(--border-dim);
}

.skill-tag.bio {
    background: rgba(0, 224, 160, 0.08);
    color: var(--green);
    border-color: rgba(0, 224, 160, 0.15);
}

.skill-tag.ml {
    background: rgba(255, 176, 0, 0.08);
    color: var(--amber);
    border-color: rgba(255, 176, 0, 0.15);
}

.skill-tag.tools {
    background: rgba(168, 85, 247, 0.08);
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.15);
}

/* ── APPROACH ────────────────────────────────────────────── */
.approach-steps {
    display: flex;
    flex-direction: column;
}

.step {
    display: flex;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border-dim);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.step:last-child { border-bottom: none; }
.step:hover { padding-left: 8px; }

.step-visual {
    flex-shrink: 0;
}

.step-canvas {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid var(--border-dim);
    background: rgba(6, 6, 16, 0.4);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    min-width: 28px;
    padding-top: 4px;
    opacity: 0.6;
}

.step-content h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-bright);
    margin-bottom: 8px;
    font-weight: 500;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ── SPECTRAL SECTION ────────────────────────────────────── */
.spectral-intro {
    margin-bottom: 32px;
}

.spectral-quote {
    padding: 24px 32px;
    border-left: 3px solid var(--cyan);
    margin-bottom: 24px;
}

.spectral-quote p {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.7;
}

.spectral-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 620px;
}

.spectral-interactive {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto auto;
    gap: 16px;
    margin-bottom: 20px;
}

.spectral-panel {
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(6, 6, 16, 0.5);
}

.spectral-3d {
    grid-row: 1 / 3;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-dim);
}

.panel-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.panel-hint {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-dim);
    opacity: 0.5;
    font-style: italic;
}

#spectralCanvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: grab;
}

#spectralCanvas:active { cursor: grabbing; }

#networkGraphCanvas {
    width: 100%;
    height: auto;
    display: block;
}

#spectrumCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.spectral-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-group {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    flex-wrap: wrap;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.spectral-equation {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    opacity: 0.5;
    letter-spacing: 0.5px;
}

.philosophy-body {
    margin-top: 12px;
}

.philosophy-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 16px;
    max-width: 620px;
}

.philosophy-body p:last-child { margin-bottom: 0; }

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-lead {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    background: var(--bg-card);
    transition: all 0.3s ease;
    text-align: center;
}

.contact-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 240, 255, 0.04);
}

.contact-symbol {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--cyan);
    opacity: 0.7;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 0.78rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.contact-areas {
    padding: 24px;
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    background: var(--bg-card);
}

.contact-areas h3 {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 16px;
}

.contact-areas ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.contact-areas ul li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-areas ul li::before {
    content: '·';
    color: var(--cyan);
    font-weight: bold;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 40px 0 calc(var(--nav-width) + 60px);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid var(--border-dim);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    flex-wrap: wrap;
    gap: 12px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    :root { --nav-width: 0px; }

    .spec-nav { display: none; }

    .spec-nav.mobile-open {
        display: flex;
        left: 0;
        top: 0;
        bottom: 0;
        width: 220px;
        transform: none;
        background: rgba(6, 6, 16, 0.98);
        border-right: 1px solid var(--border-dim);
        padding: 80px 20px;
        justify-content: flex-start;
        opacity: 1;
    }

    .nav-toggle { display: flex; }

    main, footer {
        padding-left: 40px;
        padding-right: 40px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-name { font-size: 3rem; }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-side { order: -1; }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .spectral-interactive {
        grid-template-columns: 1fr;
    }

    .spectral-3d { grid-row: auto; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-areas ul { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    main, footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-name { font-size: 2.4rem; }
    .section { padding: 60px 0; }
    .section-header h2 { font-size: 1.4rem; }
    .about-lead { font-size: 1.1rem; }

    .hero-profile {
        flex-direction: column;
        align-items: flex-start;
    }

    .edu-item {
        flex-direction: column;
        gap: 8px;
    }

    .edu-marker { display: none; }

    .step {
        flex-direction: column;
        gap: 8px;
    }

    .step-visual { display: none; }

    .direction-card {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .chromo-scroll { display: none; }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
    #loader, #networkCanvas, .chromo-scroll, .spec-nav,
    .nav-toggle, #eigenCanvas, .hero-viz, .spectral-interactive,
    .spectral-legend, .direction-helix, .project-icon-bio,
    .gene-stream, .cell-canvas-container, .step-visual,
    .direction-equation, .about-side { display: none !important; }

    body { background: white; color: black; }

    .section {
        opacity: 1;
        transform: none;
        min-height: auto;
        padding: 20px 0;
        break-inside: avoid;
    }

    main, footer {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    .project-card, .direction-card, .edu-item,
    .contact-card, .contact-areas {
        background: white;
        border-color: #ddd;
    }

    .hero-name, .name-line:last-child {
        -webkit-text-fill-color: initial;
        background: none;
        color: black;
    }

    a { color: #333; }
}
