/* =============================================================================
   MYTHWORX // CITADEL · MK I
   Aesthetic: Stark Industries / JARVIS HUD with MythWorx blue brand colors
   ========================================================================== */

:root {
    /* MythWorx brand */
    --mw-blue: #348DF7;
    --mw-blue-deep: #2344F1;
    --mw-blue-glow: #5BA9FF;
    --mw-dark: #181720;
    --mw-darker: #0a0e27;
    --mw-darkest: #050714;

    /* Accent (Stark cyan) */
    --hud-cyan: #00f0ff;
    --hud-amber: #ffb13b;

    /* Neutrals */
    --text-primary: #e8eef9;
    --text-secondary: #8896b3;
    --text-dim: #4a5573;

    /* Lines & frames */
    --line-faint: rgba(91, 169, 255, 0.15);
    --line-mid: rgba(91, 169, 255, 0.35);
    --line-bright: rgba(91, 169, 255, 0.7);

    /* Typography */
    --font-display: 'Orbitron', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html, body {
    height: 100%;
    background: var(--mw-darkest);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-image:
        radial-gradient(ellipse at top, rgba(52, 141, 247, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(35, 68, 241, 0.06) 0%, transparent 60%),
        linear-gradient(to right, rgba(91, 169, 255, 0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(91, 169, 255, 0.025) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px;
}

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

a {
    color: var(--mw-blue-glow);
    text-decoration: none;
    transition: color 200ms ease, text-shadow 200ms ease;
}

a:hover {
    color: var(--hud-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.hidden { display: none !important; }

/* =============================================================================
   INTRO STAGE
   ========================================================================== */

#intro-stage {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--mw-darkest);
    overflow: hidden;
    transition: opacity 1500ms ease;
}

#intro-stage.fading {
    opacity: 0;
    pointer-events: none;
}

/* Matrix canvas */
#matrix-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#matrix-canvas.shearing {
    animation: matrixShear 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes matrixShear {
    0%   { opacity: 1; transform: scaleX(1) skewX(0deg); filter: hue-rotate(0deg) brightness(1); }
    30%  { opacity: 1; transform: scaleX(1.05) skewX(2deg); filter: hue-rotate(20deg) brightness(1.5); }
    60%  { opacity: 0.5; transform: scaleX(1.2) skewX(-5deg); filter: hue-rotate(180deg) brightness(2); }
    100% { opacity: 0; transform: scaleX(2) skewX(0deg); filter: hue-rotate(220deg) brightness(0); }
}

/* Hacking terminal */
#hack-terminal {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 8vh 8vw;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #00ff66;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
}

#hack-terminal.active { opacity: 1; }
#hack-terminal.fading { opacity: 0; }

.terminal-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 255, 102, 0.3);
    padding-bottom: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.terminal-prompt { color: #00ff66; font-weight: 700; }
.terminal-status { color: rgba(0, 255, 102, 0.6); animation: pulse 2s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.5; } }

#terminal-output {
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 13px;
    max-height: 70vh;
    overflow: hidden;
}

#terminal-output .ok   { color: #00ff66; }
#terminal-output .warn { color: #ffd84a; }
#terminal-output .err  { color: #ff4a6b; text-shadow: 0 0 6px rgba(255, 74, 107, 0.5); }
#terminal-output .info { color: #5BA9FF; }
#terminal-output .dim  { color: rgba(0, 255, 102, 0.5); }

.terminal-cursor {
    display: inline-block;
    color: #00ff66;
    animation: blink 1s steps(2) infinite;
    font-weight: 700;
    margin-top: 4px;
}

@keyframes blink { 50% { opacity: 0; } }

/* Blood reveal */
#blood-reveal {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
}

#blood-reveal.active { opacity: 1; }
#blood-reveal.fading { opacity: 0; }

.blood-text {
    font-family: var(--font-display);
    font-size: clamp(48px, 14vw, 220px);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: transparent;
    background-image:
        url('images/blood3.png'),
        url('images/blood1.png');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center top;
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    filter: drop-shadow(0 8px 30px rgba(140, 0, 0, 0.6))
            drop-shadow(0 0 60px rgba(255, 0, 0, 0.2));
    clip-path: inset(0 0 100% 0);
    animation: bloodDrip 1.8s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}

.blood-text::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: #6b0000;
    z-index: -1;
    filter: blur(2px);
}

@keyframes bloodDrip {
    0%   { clip-path: inset(0 0 100% 0); }
    100% { clip-path: inset(0 0 0 0); }
}

/* Skull stage */
#skull-stage {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 800ms ease;
}

#skull-stage.active { opacity: 1; }

#skull-image {
    width: clamp(320px, 60vw, 800px);
    height: auto;
    transform: scale(0.3);
    opacity: 0;
    animation: skullEmerge 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 0 60px rgba(0, 255, 100, 0.4))
            drop-shadow(0 0 100px rgba(91, 169, 255, 0.3));
    mix-blend-mode: screen;
}

@keyframes skullEmerge {
    0%   { transform: scale(0.3); opacity: 0; filter: blur(20px) drop-shadow(0 0 60px rgba(0, 255, 100, 0.4)); }
    50%  { transform: scale(1.1); opacity: 1; filter: blur(0) drop-shadow(0 0 80px rgba(0, 255, 100, 0.6)); }
    100% { transform: scale(1);   opacity: 1; filter: blur(0) drop-shadow(0 0 60px rgba(0, 255, 100, 0.4)); }
}

#skull-glitch {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0, 255, 100, 0.04) 3px, rgba(0, 255, 100, 0.04) 4px
    );
    mix-blend-mode: screen;
    pointer-events: none;
}

/* Skip button */
#skip-intro {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    background: transparent;
    border: 1px solid var(--line-mid);
    color: var(--text-secondary);
    padding: 10px 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 200ms ease;
}

#skip-intro:hover {
    border-color: var(--hud-cyan);
    color: var(--hud-cyan);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* =============================================================================
   MAIN SITE
   ========================================================================== */

#main-site {
    opacity: 0;
    transition: opacity 1200ms ease 200ms;
    min-height: 100vh;
    position: relative;
}

#main-site.revealed { opacity: 1; }

/* HUD frame */
.hud-frame {
    position: fixed;
    inset: 16px;
    pointer-events: none;
    z-index: 1000;
}

.hud-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border-color: var(--hud-cyan);
    opacity: 0.6;
}

.hud-corner.tl { top: 0;    left: 0;  border-top: 2px solid;    border-left: 2px solid; }
.hud-corner.tr { top: 0;    right: 0; border-top: 2px solid;    border-right: 2px solid; }
.hud-corner.bl { bottom: 0; left: 0;  border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner.br { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; }

/* Replay-intro floating button */
#replay-intro {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: rgba(5, 7, 20, 0.85);
    border: 1px solid var(--line-mid);
    color: var(--mw-blue-glow);
    padding: 10px 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 200ms ease;
    backdrop-filter: blur(8px);
}

#replay-intro:hover {
    border-color: var(--hud-cyan);
    color: var(--hud-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* Top nav */
#top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 48px;
    border-bottom: 1px solid var(--line-faint);
    backdrop-filter: blur(10px);
    background: rgba(5, 7, 20, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
}

.brand-icon {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 12px rgba(91, 169, 255, 0.5));
}

.brand-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, var(--mw-blue-glow), var(--hud-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.2em;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--hud-cyan);
    transition: width 200ms ease;
    box-shadow: 0 0 8px var(--hud-cyan);
}

.nav-links a:hover::after { width: 100%; }

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff66;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff66;
    animation: pulse 2s ease-in-out infinite;
}

/* Hero */
#hero {
    padding: 80px 48px 60px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-tag {
    font-size: 11px;
    color: var(--hud-cyan);
    letter-spacing: 0.3em;
    margin-bottom: 24px;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.02em;
    margin-bottom: 32px;
}

.hero-title .line { display: block; }

.hero-title .accent {
    background: linear-gradient(135deg, var(--mw-blue), var(--hud-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.3));
}

.hero-sub {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 480px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid var(--line-mid);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 250ms ease;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--mw-blue), var(--mw-blue-deep));
    border-color: var(--mw-blue);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(52, 141, 247, 0.6);
    transform: translateY(-2px);
}

.btn-ghost {
    color: var(--mw-blue-glow);
    border-color: var(--line-mid);
}

.btn-ghost:hover {
    border-color: var(--hud-cyan);
    color: var(--hud-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.05);
}

/* Hero visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    position: relative;
}

.hex-stack {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-ring {
    position: absolute;
    border: 1px solid var(--line-mid);
    border-radius: 50%;
}

.hex-ring.outer {
    width: 400px;
    height: 400px;
    border-color: var(--line-faint);
    animation: rotateRing 40s linear infinite;
    border-style: dashed;
}

.hex-ring.middle {
    width: 300px;
    height: 300px;
    border-color: var(--line-mid);
    animation: rotateRing 25s linear infinite reverse;
}

.hex-ring.inner {
    width: 200px;
    height: 200px;
    border-color: var(--line-bright);
    box-shadow:
        inset 0 0 30px rgba(91, 169, 255, 0.2),
        0 0 30px rgba(91, 169, 255, 0.2);
    animation: rotateRing 15s linear infinite;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hex-core {
    width: 130px;
    height: 130px;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(52, 141, 247, 0.8));
    animation: corePulse 4s ease-in-out infinite;
}

@keyframes corePulse {
    50% { filter: drop-shadow(0 0 60px rgba(0, 240, 255, 1)); transform: scale(1.05); }
}

.hex-orbit {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    pointer-events: none;
}

.hex-orbit::before,
.hex-orbit::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--hud-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--hud-cyan);
    top: 50%;
    left: 50%;
    margin: -3px 0 0 -3px;
    transform-origin: 0 0;
}

.hex-orbit::before { animation: orbit1 8s linear infinite; }

.hex-orbit::after {
    animation: orbit2 12s linear infinite;
    background: var(--mw-blue-glow);
    box-shadow: 0 0 12px var(--mw-blue-glow);
}

@keyframes orbit1 {
    from { transform: rotate(0deg)   translateX(180px); }
    to   { transform: rotate(360deg) translateX(180px); }
}

@keyframes orbit2 {
    from { transform: rotate(180deg) translateX(150px); }
    to   { transform: rotate(540deg) translateX(150px); }
}

/* Hero readout */
.hero-readout {
    max-width: 1400px;
    margin: 60px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    border-top: 1px solid var(--line-faint);
    border-bottom: 1px solid var(--line-faint);
}

.readout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-right: 1px solid var(--line-faint);
    font-size: 11px;
    letter-spacing: 0.15em;
}

.readout-row:last-child { border-right: none; }

.rk { color: var(--text-dim); }
.rv { color: var(--text-primary); font-weight: 600; }
.rv.ok { color: #00ff66; text-shadow: 0 0 8px rgba(0, 255, 102, 0.5); }

/* Sections */
.section {
    padding: 100px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--hud-cyan);
    letter-spacing: 0.2em;
}

.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

.section-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--line-bright), transparent);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.about-text .lead {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 500;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

.about-stats { display: grid; gap: 16px; }

.stat {
    padding: 24px;
    border: 1px solid var(--line-faint);
    background: rgba(91, 169, 255, 0.02);
    text-align: center;
    transition: border-color 250ms ease, background 250ms ease;
}

.stat:hover {
    border-color: var(--line-mid);
    background: rgba(91, 169, 255, 0.05);
}

.stat-num {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--mw-blue), var(--hud-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    padding: 32px 28px;
    border: 1px solid var(--line-faint);
    background: linear-gradient(135deg, rgba(91, 169, 255, 0.03), rgba(35, 68, 241, 0.01));
    position: relative;
    transition: all 300ms ease;
    cursor: default;
}

.service-card:hover {
    border-color: var(--line-bright);
    background: linear-gradient(135deg, rgba(91, 169, 255, 0.08), rgba(35, 68, 241, 0.03));
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(91, 169, 255, 0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 24px; height: 1px;
    background: var(--hud-cyan);
    transition: width 300ms ease;
}

.service-card:hover::before {
    width: 60px;
    box-shadow: 0 0 8px var(--hud-cyan);
}

.card-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.3em;
    margin-bottom: 16px;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
    min-height: 80px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.tag-list li {
    padding: 4px 10px;
    border: 1px solid var(--line-faint);
    color: var(--mw-blue-glow);
    font-size: 10px;
    letter-spacing: 0.15em;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    padding: 32px 28px;
    border: 1px solid var(--line-faint);
    background: rgba(5, 7, 20, 0.6);
    position: relative;
    overflow: hidden;
    transition: all 300ms ease;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 4px,
        rgba(91, 169, 255, 0.02) 5px, rgba(91, 169, 255, 0.02) 6px
    );
    pointer-events: none;
    opacity: 0.5;
}

.project-card:hover {
    border-color: var(--line-bright);
    background: rgba(5, 7, 20, 0.9);
    transform: translateY(-4px);
}

.project-status {
    font-size: 10px;
    color: var(--hud-cyan);
    letter-spacing: 0.3em;
    margin-bottom: 16px;
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--mw-blue-glow), var(--hud-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.project-meta {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-faint);
    padding-bottom: 12px;
}

.project-card p:not(.project-meta) {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Contact */
.contact-card {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding: 48px;
    border: 1px solid var(--line-mid);
    background: linear-gradient(135deg, rgba(52, 141, 247, 0.05), rgba(35, 68, 241, 0.02));
    position: relative;
}

.contact-card::before,
.contact-card::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--hud-cyan);
}

.contact-card::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.contact-card::after  { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

.contact-text h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

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

.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
}

.contact-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--text-dim);
}

.meta-val { color: var(--mw-blue-glow); }

/* Footer */
#site-footer {
    padding: 60px 48px 40px;
    border-top: 1px solid var(--line-faint);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1400px;
    margin: 0 auto;
    gap: 40px;
    align-items: center;
}

.footer-logo {
    width: 200px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(91, 169, 255, 0.3));
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 13px;
    letter-spacing: 0.05em;
}

.footer-meta {
    text-align: right;
}

.meta-line {
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.meta-line.tiny {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.25em;
}

.footer-decor {
    max-width: 1400px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--line-faint);
    text-align: center;
}

.decor-text {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.4em;
    opacity: 0.6;
}

/* =============================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    #top-nav {
        flex-direction: column;
        gap: 16px;
        padding: 16px 24px;
    }

    .nav-links { gap: 16px; flex-wrap: wrap; justify-content: center; }
    .nav-links a { font-size: 11px; }

    #hero { padding: 40px 24px; }

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

    .hero-visual { height: 320px; }
    .hex-stack { width: 280px; height: 280px; }
    .hex-ring.outer { width: 280px; height: 280px; }
    .hex-ring.middle { width: 220px; height: 220px; }
    .hex-ring.inner { width: 150px; height: 150px; }
    .hex-core { width: 90px; height: 90px; }
    .hex-orbit { width: 250px; height: 250px; }
    .hex-orbit::before { animation: orbit1m 8s linear infinite; }
    .hex-orbit::after { animation: orbit2m 12s linear infinite; }

    @keyframes orbit1m {
        from { transform: rotate(0deg)   translateX(125px); }
        to   { transform: rotate(360deg) translateX(125px); }
    }

    @keyframes orbit2m {
        from { transform: rotate(180deg) translateX(105px); }
        to   { transform: rotate(540deg) translateX(105px); }
    }

    .section { padding: 60px 24px; }
    .section-title { font-size: 22px; }

    .about-grid,
    .contact-card {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-card { padding: 32px 24px; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-meta { text-align: center; }
    .footer-logo { margin: 0 auto 12px; }

    .hud-frame { inset: 8px; }
    .hud-corner { width: 20px; height: 20px; }
}

@media (max-width: 500px) {
    #hack-terminal { padding: 4vh 4vw; font-size: 11px; }
    #terminal-output { font-size: 11px; }
    .hero-title { font-size: clamp(28px, 9vw, 44px); }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
}

/* Scrollbar (subtle, on-brand) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--mw-darkest); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--mw-blue-deep), var(--mw-blue));
    border: 2px solid var(--mw-darkest);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--mw-blue), var(--hud-cyan));
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
