:root {
    --bg-dark: #0f172a;
    --accent-primary: #10b981;
    --accent-secondary: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.2);
    --glass-border: rgba(16, 185, 129, 0.3);
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   CENTRAL DOGMA SPLASH OVERLAY
========================================= */
#splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #040c18;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

#dogma-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.dogma-ui {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center the whole layout vertically on the screen */
    gap: 0px; 
    width: 100%;
    min-height: 100%;
    padding: 10px 20px 20px;
}

/* Title block */
.dogma-title {
    text-align: center;
    animation: fadeInDown 1s ease forwards;
}

.dogma-greeting {
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-primary);
    letter-spacing: 2px;
    margin-bottom: 4px; /* Reduced from 12px */
    opacity: 0.8;
}

.dogma-name {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: 3px;
    line-height: 1.1; /* Tighter line height */
    background: linear-gradient(135deg, #10b981, #06b6d4, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px; /* Reduced from 8px */
}

.dogma-subtitle {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Dogma flow row */
.dogma-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeIn 1.2s ease 0.4s forwards;
    opacity: 0;
}

/* Molecule nodes */
.dogma-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: pointer;
    padding: 24px 20px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
    transition: all 0.35s ease;
    min-width: 140px;
}

.dogma-node:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

#node-dna:hover { border-color: rgba(16, 185, 129, 0.5); box-shadow: 0 0 30px rgba(16,185,129,0.15); }
#node-rna:hover { border-color: rgba(6, 182, 212, 0.5); box-shadow: 0 0 30px rgba(6,182,212,0.15); }
#node-protein:hover { border-color: rgba(139, 92, 246, 0.5); box-shadow: 0 0 30px rgba(139,92,246,0.15); }

.node-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 4s ease-in-out infinite;
}

.dna-icon { animation-delay: 0s; }
.rna-icon { animation-delay: 0.5s; }
.protein-icon { animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.node-label {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

#node-dna .node-label { color: #10b981; }
#node-rna .node-label { color: #06b6d4; }
#node-protein .node-label { color: #8b5cf6; }

.node-sublabel {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

/* Hover callout cards — open UPWARD above the node */
.node-callout {
    position: absolute;
    bottom: calc(100% + 12px);   /* above the node */
    top: auto;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 240px;
    background: rgba(4, 12, 24, 0.97);
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 10px;
    padding: 16px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9998;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.7), 0 0 0 1px rgba(16,185,129,0.1);
}

.node-callout strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 14px;
    border-bottom: 1px solid rgba(16,185,129,0.2);
    padding-bottom: 6px;
}

.dogma-node:hover .node-callout {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Animated arrows */
.dogma-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 90px;
}

.arrow-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.arrow-enzyme {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.arrow-track {
    position: relative;
    width: 90px;
    height: 14px;
    border-top: 2px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
}

.arrow-head {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 14px;
}

.arrow-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    animation: flow 2s linear infinite;
    box-shadow: 0 0 6px var(--accent-primary);
}

.p1 { animation-delay: 0s; }
.p2 { animation-delay: 0.66s; }
.p3 { animation-delay: 1.33s; }

@keyframes flow {
    0%   { left: 0%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { left: 85%; opacity: 0; }
}

/* ATG Start Codon */
.start-codon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: fadeIn 1.5s ease 0.8s forwards;
    opacity: 0;
}

.codon-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-primary);
    letter-spacing: 2px;
    opacity: 0.7;
}

#start-codon-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 36px;
    background: transparent;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-mono);
    color: var(--text-main);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: pulse-border 2.5s ease-in-out infinite;
    /* Android Chrome touch fixes */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(16,185,129,0.2);
    -webkit-appearance: none;
    user-select: none;
    z-index: 10;
}

#start-codon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(16,185,129,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

#start-codon-btn:hover::before {
    transform: translateX(100%);
}

#start-codon-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), 0 0 60px rgba(16, 185, 129, 0.15);
    transform: scale(1.04);
    animation: none;
    border-color: #10b981;
}

.codon-atg {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 4px;
    text-shadow: 0 0 12px var(--accent-primary);
}

.codon-text {
    font-size: 13px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.codon-hint {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.5;
    letter-spacing: 1px;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.5), 0 0 50px rgba(16, 185, 129, 0.15); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Orbital ring wrapper */
.orbit-wrapper {
    position: relative;
    width: 540px; /* Increased from 500px to fill more screen space */
    height: 540px;
    flex-shrink: 0;
    animation: fadeIn 1.2s ease 0.4s forwards;
    opacity: 0;
    overflow: visible; /* allow callouts to escape ring boundary */
}

/* Per-node callout edge pinning (all callouts open UPWARD) */

/* DNA (leftmost): pin to LEFT edge so it doesn't bleed off-screen left */
#node-dna .node-callout {
    left: 0;
    right: auto;
    bottom: calc(100% + 12px);
    transform: translateX(0) translateY(8px);
}
#node-dna:hover .node-callout {
    transform: translateX(0) translateY(0);
}

/* mRNA: centered above — uses default .node-callout (left:50%, translateX(-50%)) */

/* Proteomics (rightmost): pin to RIGHT edge so it doesn't bleed off-screen right */
#node-protein .node-callout {
    left: auto;
    right: 0;
    bottom: calc(100% + 12px);
    transform: translateX(0) translateY(8px);
}
#node-protein:hover .node-callout {
    transform: translateX(0) translateY(0);
}


.orbit-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Satellite nodes on the ring */
.satellite {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    animation: orbit-pulse 3s ease-in-out infinite;
}

.satellite span {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
}

.sat-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    animation: satellite-glow 2s ease-in-out infinite alternate;
}

@keyframes orbit-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes satellite-glow {
    from { opacity: 0.6; }
    to { opacity: 1; box-shadow: 0 0 16px; }
}

/* Center dogma area — push content into LOWER half of ring */
.dogma-central {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* 16% padding-top pushes nodes back down so they don't overlap MULTI-OMICS text, while still fitting in the ring */
    padding: 16% 12px 16px;
    gap: 8px; /* Tighter gap between rows */
    overflow: visible;
}

.orbit-center-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--accent-primary);
    text-transform: uppercase;
    opacity: 0.7;
}

/* Dogma flow row (compact for inside ring) */
.dogma-flow {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: center;
}

/* Bidirectional arrow block (DNA ↔ RNA) */
.bidir-arrow-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    min-width: 80px;
    flex-shrink: 0;
}

.bidir-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.arrow-label-sm {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rev-label {
    color: #f59e0b !important;
}

.arrow-enzyme-sm {
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.arrow-track-sm {
    position: relative;
    width: 90px;
    height: 10px;
    border-top: 1.5px solid rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
}

.arrow-track-rev {
    border-top: 1.5px solid rgba(245, 158, 11, 0.4);
}

.arrow-head-fwd {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 10px;
}

.arrow-head-rev {
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    color: #f59e0b;
    font-size: 10px;
}

/* Reverse transcription particles (right to left) */
.arrow-particle-rev {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #f59e0b;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    animation: flow-rev 2s linear infinite;
    box-shadow: 0 0 5px #f59e0b;
}

.p1r { animation-delay: 0s; }
.p2r { animation-delay: 0.66s; }
.p3r { animation-delay: 1.33s; }

@keyframes flow-rev {
    0%   { right: 0%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { right: 85%; opacity: 0; }
}

/* .node-callout-left has been removed; handled by #node-protein .node-callout instead */

/* Make nodes compact inside ring */
.dogma-central .dogma-node {
    min-width: 100px;
    padding: 14px 12px 12px;
}

.dogma-central .node-label {
    font-size: 14px;
}

.dogma-central .node-sublabel {
    font-size: 10px;
}

/* ATG button inside the ring */
.dogma-central .start-codon-container {
    animation: none;
    opacity: 1;
    gap: 10px;
}

.dogma-central .codon-label {
    font-size: 10px;
}

.dogma-central #start-codon-btn {
    padding: 8px 20px; /* Reduced from 12px 24px */
    gap: 10px;
}

.dogma-central .codon-atg {
    font-size: 22px;
}

.dogma-central .codon-text {
    font-size: 11px;
}

/* =============================================
   BIO RIDDLE WIDGET
============================================= */
.riddle-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 90%;
    max-width: 320px;
    background: rgba(4, 12, 24, 0.6);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 10px;
    padding: 8px 12px; /* Tightened from 10px 14px */
    backdrop-filter: blur(8px);
}

.riddle-header {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.riddle-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--accent-primary);
    text-transform: uppercase;
    opacity: 0.8;
}

.riddle-counter {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    margin-left: auto;
}

.riddle-question {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-main);
    text-align: center;
    line-height: 1.5;
    min-height: 32px;
}

.riddle-actions {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.riddle-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(16,185,129,0.4);
    background: transparent;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.riddle-btn:hover, .riddle-btn:active {
    background: rgba(16,185,129,0.15);
    border-color: var(--accent-primary);
}

.riddle-answer {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-secondary);
    text-align: center;
    padding: 4px 8px;
    background: rgba(6,182,212,0.1);
    border-radius: 4px;
    border: 1px solid rgba(6,182,212,0.2);
    width: 100%;
    display: none;
}

.riddle-answer.visible { display: block; }

/* Responsive: shrink ring on small screens */
@media (max-width: 640px) {
    .orbit-wrapper {
        width: 340px;
        height: 340px;
        transform: scale(0.85);
        transform-origin: top center;
    }
    .satellite span { font-size: 8px; }
}

/* Background Canvas */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), transparent);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 24px;
    color: var(--accent-primary);
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 20px;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.contact-btn {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 14px;
}

/* Main Content */
main {
    max-width: 1000px;
    margin: 120px auto 0;
    padding: 0 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
#hero {
    text-align: left;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 40px 0;
}

.greeting {
    font-size: 20px;
    color: var(--accent-primary);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.name {
    font-size: 60px;
    line-height: 1.1;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.name span {
    font-weight: 300;
}

.role-primary {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.role-secondary {
    font-size: 32px;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Section Titles */
.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: var(--glass-border);
    margin-left: 20px;
}

/* About Section */
#about p {
    margin-bottom: 20px;
    font-weight: 300;
    font-size: 16px;
    color: var(--text-muted);
}

/* Skills Section */
.skills-category {
    margin-bottom: 30px;
}

.skills-category h3 {
    font-size: 16px;
    color: var(--accent-secondary);
    margin-bottom: 15px;
    font-weight: 400;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Career Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary), 0 0 20px var(--accent-primary);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.timeline-role {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-secondary);
}

.timeline-org {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 400;
}

.timeline-content p {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 300;
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.publication-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.publication-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pub-year {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 60px;
}

.publication-item p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.publication-item strong {
    color: var(--text-main);
}

.publication-item em {
    color: var(--accent-secondary);
    font-style: normal;
}

.scholar-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
    margin: 0 auto;
    display: block;
}

.scholar-button:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

footer {
    text-align: center;
    padding: 40px 0;
    font-size: 14px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* =========================================
   RESPONSIVE DESIGN — Full Multi-Breakpoint
   Supports: Mobile 320px → 4K desktop
========================================= */

/* --- Hamburger button (hidden on desktop) --- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile nav overlay */
.nav-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 12, 24, 0.97);
    z-index: 150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.nav-mobile.open {
    display: flex;
}

.nav-mobile a {
    font-family: var(--font-mono);
    font-size: 22px;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 3px;
    transition: color 0.3s;
}

.nav-mobile a:hover { color: var(--accent-primary); }

.nav-mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 28px;
    cursor: pointer;
}

/* --- Tablet (≤ 1024px) --- */
@media (max-width: 1024px) {
    .name { font-size: 50px; }

    .dogma-flow { gap: 4px; }

    .orbit-wrapper {
        width: 500px;
        height: 500px;
        transform: none;
    }
}

/* --- Small Tablet / Large Mobile (≤ 768px) --- */
@media (max-width: 768px) {
    /* Nav */
    .nav-links, .contact-btn { display: none; }
    .hamburger-btn { display: flex; }

    /* Orbital ring — shrink to fit phone screen */
    .orbit-wrapper {
        width: min(580px, 96vw);
        height: min(580px, 96vw);
        transform: none;
    }

    /* Hero */
    .name { font-size: 38px; }
    .role-secondary { font-size: 22px; }

    /* Social links wrap */
    .social-links { flex-wrap: wrap; gap: 10px; }

    /* Sections */
    .glass-panel { padding: 24px 16px; }
    main { margin-top: 80px; padding: 0 12px; }

    /* Timeline */
    .timeline-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .timeline-date { margin-top: 0; }
    .timeline-role { font-size: 16px; }

    /* Publications */
    .publication-item { flex-direction: column; gap: 4px; }
    .pub-year { min-width: unset; }

    /* Chat widget */
    .chat-widget { width: 90vw; right: 5vw; bottom: 10px; }

    /* Dogma title */
    .dogma-name { font-size: 28px; letter-spacing: 1px; }
    .dogma-subtitle { font-size: 13px; }
}

/* --- Mobile (≤ 480px) --- */
@media (max-width: 480px) {
    .orbit-wrapper {
        width: min(480px, 95vw);
        height: min(480px, 95vw);
        transform: none;
    }

    .name { font-size: 30px; }
    .role-secondary { font-size: 18px; }
    .greeting { font-size: 16px; }

    .section-title { font-size: 18px; }

    .skill-tag { font-size: 11px; padding: 5px 10px; }

    .timeline-role { font-size: 14px; }
    .timeline-org { font-size: 13px; }

    .dogma-name { font-size: 22px; }

    .codon-atg { font-size: 18px; }
    .codon-text { font-size: 10px; }

    .social-btn { font-size: 12px; padding: 6px 10px; }
    .social-btn svg { width: 16px; height: 16px; }
}

/* --- Very small mobile (≤ 360px) --- */
@media (max-width: 360px) {
    .orbit-wrapper {
        width: min(360px, 94vw);
        height: min(360px, 94vw);
        transform: none;
    }

    .name { font-size: 26px; }
    .dogma-name { font-size: 18px; }
}

/* =========================================
   ANDROID CHROME — Vertical Dogma Flow
   When ring is too small to fit horizontal flow,
   stack the dogma elements top-to-bottom.
========================================= */
@media (max-width: 600px) {
    /* Switch horizontal row → vertical column */
    .dogma-flow {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 100%;
    }

    /* Rotate the bidirectional arrow block 90° for vertical flow */
    .bidir-arrow-block {
        flex-direction: row;
        gap: 8px;
    }

    .bidir-row {
        align-items: center;
        flex-direction: row;
        gap: 4px;
    }

    /* Arrow tracks become vertical bars */
    .arrow-track-sm {
        width: 6px;
        height: 36px;
        border-top: none;
        border-left: 1.5px solid rgba(16, 185, 129, 0.4);
    }

    .arrow-track-rev {
        border-top: none;
        border-left: 1.5px solid rgba(245, 158, 11, 0.4);
    }

    .arrow-head-fwd {
        right: auto;
        top: auto;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
    }

    .arrow-head-rev {
        left: auto;
        top: -6px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) rotate(-90deg);
    }

    /* Horizontal particles → vertical */
    .arrow-particle {
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        animation: flow-vertical 2s linear infinite;
    }

    .arrow-particle-rev {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        animation: flow-vertical-rev 2s linear infinite;
    }

    @keyframes flow-vertical {
        0%   { top: 0%;   opacity: 0; }
        10%  { opacity: 1; }
        90%  { opacity: 1; }
        100% { top: 85%;  opacity: 0; }
    }
    @keyframes flow-vertical-rev {
        0%   { top: 85%;  opacity: 0; }
        10%  { opacity: 1; }
        90%  { opacity: 1; }
        100% { top: 0%;   opacity: 0; }
    }

    /* Translation arrow also vertical */
    .dogma-arrow {
        flex-direction: row;
        gap: 8px;
        min-width: auto;
    }

    .arrow-track {
        width: 6px;
        height: 36px;
        border-top: none;
        border-left: 2px solid rgba(16, 185, 129, 0.3);
    }

    .arrow-head {
        right: auto;
        top: auto;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
    }

    /* Nodes full-width */
    .dogma-node { min-width: 80%; }

    /* Callout flips to show above on vertical layout */
    .node-callout, .node-callout-left {
        bottom: auto;
        top: calc(100% + 10px);
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-6px);
    }

    .dogma-node:hover .node-callout,
    .dogma-node:hover .node-callout-left {
        transform: translateX(-50%) translateY(0);
    }

    /* ATG button — ensure it's always fully visible */
    .dogma-central .start-codon-container {
        padding-bottom: 20px;
    }

    #start-codon-btn {
        flex-direction: column;
        gap: 4px;
        padding: 12px 20px;
        text-align: center;
    }
}

/* =========================================
   SURREAL ENHANCEMENTS
========================================= */

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    transition: all 0.3s;
}

.social-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

/* 3D Holographic Tilt */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glitch Hacker Text Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
}

.glitch:hover::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-primary);
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
    opacity: 1;
}

.glitch:hover::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-secondary);
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    animation: glitch-anim 0.3s infinite linear alternate-reverse;
    opacity: 1;
}

@keyframes glitch-anim {
    0% { clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%); }
    20% { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); }
    40% { clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%); }
    60% { clip-path: polygon(0 80%, 100% 80%, 100% 90%, 0 90%); }
    80% { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); }
    100% { clip-path: polygon(0 30%, 100% 30%, 100% 40%, 0 40%); }
}

/* AI Chatbox Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(16, 185, 129, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-mono);
    transition: transform 0.3s ease;
}

.chat-widget.minimized {
    transform: translateY(calc(100% - 40px));
}

.chat-header {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
    cursor: pointer;
}

.chat-header button {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 16px;
    cursor: pointer;
}

.chat-body {
    height: 250px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-body::-webkit-scrollbar {
    width: 5px;
}
.chat-body::-webkit-scrollbar-thumb {
    background: var(--glass-border);
}

.chat-message {
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 4px;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.05);
    border-left: 2px solid var(--accent-primary);
}

.user-message {
    align-self: flex-end;
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.05);
    border-right: 2px solid var(--accent-secondary);
}

.chat-input-container {
    display: flex;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
}

#chat-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
}

#chat-input::placeholder {
    color: var(--text-muted);
}

#chat-send-btn {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
    border: none;
    padding: 0 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#chat-send-btn:hover {
    background: rgba(16, 185, 129, 0.3);
}
