/* ========================================================================
   urvil.exe — Cozy Pixel Terminal
   Retro pixel-game aesthetic fused with terminal/editor chrome
   ======================================================================== */

/* ========================================
   THEME VARIABLES
   ======================================== */
:root {
    /* Dark theme (default) — muted indigo night */
    --bg:        #16162a;
    --bg-2:      #1b1b33;
    --panel:     #23223d;
    --tile:      #2b2a49;
    --text:      #f2f0ea;
    --text-dim:  #a7a6cf;
    --muted:     #6f6e9a;
    --outline:   #0c0c18;
    --drop:      rgba(0, 0, 0, 0.45);

    /* Retro accent palette (Sweetie-16 inspired) */
    --green:  #38b764;
    --amber:  #ffcd75;
    --rose:   #ef7d94;
    --sky:    #41a6f6;
    --primary: var(--green);

    /* Fonts */
    --font-pixel: 'Press Start 2P', monospace;
    --font-term:  'VT323', monospace;
    --font-body:  'JetBrains Mono', 'Fira Code', monospace;

    --sidebar-width: 250px;
    --px: 4px;              /* the pixel unit */
    --t-fast: 0.12s steps(3);
    --t-norm: 0.25s steps(4);
}

[data-theme="light"] {
    --bg:        #efe6cf;
    --bg-2:      #f4ecd8;
    --panel:     #fff8ea;
    --tile:      #f6edd5;
    --text:      #2c2a41;
    --text-dim:  #5b5678;
    --muted:     #918c73;
    --outline:   #2c2a41;
    --drop:      rgba(44, 42, 65, 0.28);

    --green:  #2a9d54;
    --amber:  #d99a2b;
    --rose:   #d8556f;
    --sky:    #2b7fd0;
    --primary: var(--green);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--bg-2) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-2) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--t-norm), color var(--t-norm);
    image-rendering: pixelated;
}

a { text-decoration: none; color: inherit; transition: color var(--t-fast); }
img { max-width: 100%; height: auto; display: block; image-rendering: auto; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

svg { image-rendering: pixelated; shape-rendering: crispEdges; }

.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.prompt { color: var(--primary); font-weight: 700; }
.comment { color: var(--muted); }

::selection { background: var(--primary); color: var(--outline); }

/* Scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--muted); border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    html { scroll-behavior: auto; }
    .hero-sky { display: none; }
}

/* ========================================
   PIXEL BOX (reusable chunky frame)
   4 offset solid shadows create notched corners; last one = hard drop
   ======================================== */
.pixel-box {
    background: var(--panel);
    position: relative;
    box-shadow:
        calc(var(--px) * -1) 0 0 0 var(--outline),
        var(--px) 0 0 0 var(--outline),
        0 calc(var(--px) * -1) 0 0 var(--outline),
        0 var(--px) 0 0 var(--outline),
        6px 10px 0 0 var(--drop);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

/* ========================================
   BOOT SCREEN
   ======================================== */
.boot {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.boot.hidden { opacity: 0; visibility: hidden; }

.boot-inner { text-align: center; }
.boot-logo {
    font-family: var(--font-pixel);
    font-size: clamp(1.5rem, 6vw, 2.75rem);
    color: var(--text);
    letter-spacing: 2px;
    margin-bottom: 1.75rem;
    text-shadow: 4px 4px 0 var(--outline);
}
.boot-logo .boot-dot { color: var(--primary); }

.boot-bar {
    width: min(320px, 70vw);
    height: 20px;
    background: var(--tile);
    box-shadow: 0 0 0 4px var(--outline);
    margin: 0 auto 1rem;
    overflow: hidden;
}
.boot-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--primary);
    background-image: linear-gradient(90deg, var(--green), var(--sky));
    transition: width 0.2s steps(6);
}
.boot-text {
    font-family: var(--font-term);
    font-size: 1.35rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}
.boot-hint {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: var(--muted);
    margin-top: 1.75rem;
    animation: blink 1.2s steps(2, start) infinite;
}

/* ========================================
   SCROLL PROGRESS
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 6px;
    width: 0%;
    background: var(--primary);
    z-index: 9999;
    box-shadow: 0 2px 0 var(--outline);
}

/* ========================================
   CRT SCANLINE OVERLAY (toggleable)
   ======================================== */
.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    opacity: 0;
    transition: opacity var(--t-norm);
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.18) 0px,
        rgba(0, 0, 0, 0.18) 1px,
        transparent 2px,
        transparent 4px
    );
}
.crt-overlay.on { opacity: 1; }

/* ========================================
   SIDEBAR (file-tree / pause menu)
   ======================================== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-2);
    border-right: 4px solid var(--outline);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.25rem;
    z-index: 1000;
    transition: transform var(--t-norm), background-color var(--t-norm);
    overflow-y: auto;
}

.sidebar-header { margin-bottom: 1.5rem; }
.logo {
    font-family: var(--font-pixel);
    font-size: 1.1rem;
    color: var(--text);
    text-shadow: 2px 2px 0 var(--outline);
}
.logo-dot, .logo-caret { color: var(--primary); }
.logo-caret { animation: blink 1s steps(2, start) infinite; }
.logo-sub {
    font-family: var(--font-term);
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

.nav { flex: 1; }
.nav-heading {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}
.nav-list { display: flex; flex-direction: column; gap: 0.15rem; }
.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-term);
    font-size: 1.25rem;
    line-height: 1;
    position: relative;
    transition: color var(--t-fast), background var(--t-fast), padding var(--t-fast);
}
.nav-link::before {
    content: '>';
    position: absolute;
    left: 0.1rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity var(--t-fast);
}
.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: var(--tile);
    padding-left: 1.25rem;
}
.nav-link:hover::before, .nav-link.active::before { opacity: 1; }
.nav-link.active { color: var(--primary); }

.cmdk-hint {
    margin-top: 1rem;
    font-family: var(--font-term);
    font-size: 1.05rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.25rem;
}
kbd {
    font-family: var(--font-body);
    font-size: 0.6rem;
    background: var(--tile);
    color: var(--text);
    padding: 2px 6px;
    box-shadow: 0 0 0 2px var(--outline);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.25rem;
    margin-top: 1rem;
    border-top: 3px solid var(--outline);
}
.social-links { display: flex; justify-content: center; gap: 0.75rem; }
.social-link {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--tile);
    color: var(--text-dim);
    box-shadow: 0 0 0 3px var(--outline);
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.social-link:hover {
    background: var(--primary);
    color: var(--outline);
    transform: translate(-2px, -2px);
}

.control-row { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.theme-toggle { padding: 0; }
.toggle-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 64px; height: 30px;
    padding: 0 6px;
    background: var(--tile);
    box-shadow: 0 0 0 3px var(--outline);
}
.toggle-ic { width: 14px; height: 14px; }
.toggle-ic.sun  { fill: var(--amber); }
.toggle-ic.moon { fill: var(--sky); }
.toggle-knob {
    position: absolute;
    top: 3px; left: 3px;
    width: 24px; height: 24px;
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--outline);
    transition: transform var(--t-norm);
}
[data-theme="light"] .toggle-knob { transform: translateX(34px); }

.crt-toggle {
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    color: var(--text-dim);
    background: var(--tile);
    padding: 8px 10px;
    box-shadow: 0 0 0 3px var(--outline);
    transition: color var(--t-fast), background var(--t-fast);
}
.crt-toggle.on { background: var(--primary); color: var(--outline); }

.btn-resume {
    display: block;
    text-align: center;
    font-family: var(--font-term);
    font-size: 1.2rem;
    padding: 0.5rem;
    background: var(--tile);
    color: var(--text);
    box-shadow: 0 0 0 3px var(--outline);
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.btn-resume:hover { background: var(--amber); color: var(--outline); transform: translate(-2px, -2px); }

/* ========================================
   HAMBURGER (mobile)
   ======================================== */
.hamburger {
    display: none;
    position: fixed;
    top: 1rem; right: 1rem;
    width: 44px; height: 40px;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: var(--bg-2);
    padding: 10px;
    box-shadow: 0 0 0 4px var(--outline);
}
.hamburger span { display: block; width: 100%; height: 4px; background: var(--text); transition: all var(--t-norm); }
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0; visibility: hidden;
    transition: all var(--t-norm);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* ========================================
   MAIN + SECTIONS
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--t-norm);
}
.section {
    padding: 5rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.container { max-width: 1040px; margin: 0 auto; width: 100%; }

.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(0.95rem, 2.4vw, 1.4rem);
    line-height: 1.4;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    text-shadow: 3px 3px 0 var(--outline);
}
.title-number {
    font-size: 0.7em;
    color: var(--outline);
    background: var(--primary);
    padding: 0.4em 0.5em;
    box-shadow: 0 0 0 3px var(--outline);
    text-shadow: none;
}
.title-tag {
    font-family: var(--font-term);
    font-size: 1.4rem;
    color: var(--muted);
    text-shadow: none;
    align-self: flex-end;
}

/* ========================================
   HERO
   ======================================== */
.hero { position: relative; overflow: hidden; }
.hero-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.px-star {
    position: absolute;
    width: 3px; height: 3px;
    background: var(--text-dim);
    opacity: 0.5;
    animation: twinkle 3s steps(2, start) infinite, drift linear infinite;
}
.px-cloud {
    position: absolute;
    width: 48px; height: 12px;
    background: var(--panel);
    box-shadow:
        12px -6px 0 0 var(--panel),
        28px 0 0 0 var(--panel),
        0 0 0 3px var(--outline);
    opacity: 0.35;
    animation: drift linear infinite;
}
@keyframes twinkle { 50% { opacity: 0.1; } }
@keyframes drift {
    from { transform: translateX(-60px); }
    to   { transform: translateX(105vw); }
}

.terminal { position: relative; z-index: 1; }
.term-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--tile);
    border-bottom: 4px solid var(--outline);
    padding: 0.6rem 0.9rem;
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 12px; height: 12px; background: var(--muted); box-shadow: 0 0 0 2px var(--outline); }
.term-dots i:nth-child(1) { background: var(--rose); }
.term-dots i:nth-child(2) { background: var(--amber); }
.term-dots i:nth-child(3) { background: var(--green); }
.term-title {
    font-family: var(--font-term);
    font-size: 1.15rem;
    color: var(--text-dim);
}
.term-body { padding: 1.75rem; }
.term-line { font-family: var(--font-term); font-size: 1.25rem; color: var(--text-dim); margin-bottom: 0.5rem; }

.hero-title {
    font-family: var(--font-pixel);
    font-size: clamp(1.6rem, 5.5vw, 3.25rem);
    line-height: 1.25;
    color: var(--text);
    margin: 0.75rem 0 1rem;
    text-shadow: 4px 4px 0 var(--outline);
}
.hero-subtitle {
    font-family: var(--font-term);
    font-size: 1.75rem;
    color: var(--primary);
    min-height: 2rem;
    margin: 0.5rem 0 1rem;
}
.typing-cursor { color: var(--primary); animation: blink 1s steps(2, start) infinite; }
.hero-tagline { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.75rem; }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ========================================
   BUTTONS (pixel, pressable)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-term);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.7rem 1.4rem;
    background: var(--tile);
    color: var(--text);
    box-shadow: 0 0 0 4px var(--outline), 5px 6px 0 0 var(--drop);
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 0 0 0 4px var(--outline), 7px 9px 0 0 var(--drop); }
.btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 4px var(--outline), 1px 1px 0 0 var(--drop); }

.btn-primary { background: var(--primary); color: var(--outline); }
.btn-secondary { background: transparent; color: var(--primary); }
.btn-large { font-size: 1.5rem; padding: 0.85rem 2rem; }

.btn .ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: blip 0.4s steps(4) forwards;
    pointer-events: none;
}
@keyframes blip { to { transform: scale(4); opacity: 0; } }

/* ========================================
   ABOUT — character card
   ======================================== */
.about-content { display: grid; grid-template-columns: 300px 1fr; gap: 3.5rem; align-items: start; }

.char-card { padding: 1rem; text-align: center; }
.image-wrapper {
    box-shadow: 0 0 0 4px var(--outline);
    margin-bottom: 1rem;
    overflow: hidden;
}
.image-wrapper img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.char-name {
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: var(--text);
    margin-bottom: 0.35rem;
}
.char-class { font-family: var(--font-term); font-size: 1.1rem; color: var(--muted); margin-bottom: 1rem; }
.char-stats { display: flex; flex-direction: column; gap: 0.5rem; text-align: left; }
.stat { display: flex; align-items: center; gap: 0.5rem; }
.stat span { font-family: var(--font-term); font-size: 1rem; color: var(--text-dim); width: 42px; }
.stat .bar {
    flex: 1; height: 12px;
    background: var(--tile);
    box-shadow: 0 0 0 2px var(--outline);
    position: relative;
}
.stat .bar::after {
    content: '';
    position: absolute; inset: 0;
    width: var(--v);
    background: var(--primary);
    background-image: linear-gradient(90deg, var(--green), var(--amber));
}

.about-text p { color: var(--text-dim); margin-bottom: 1.25rem; line-height: 1.8; }
.about-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1.75rem; }
.info-item {
    display: flex; flex-direction: column; gap: 0.15rem;
    background: var(--panel);
    padding: 0.75rem;
    box-shadow: 0 0 0 3px var(--outline);
}
.info-label {
    font-family: var(--font-term);
    font-size: 0.95rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.info-value { color: var(--text); font-size: 0.85rem; }

/* ========================================
   SKILLS — inventory
   ======================================== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem 2rem; }
.skill-category {
    background: var(--panel);
    padding: 1.25rem;
    box-shadow: 0 0 0 4px var(--outline), 6px 8px 0 0 var(--drop);
}
.skill-category-title {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--outline);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cat-ic { width: 16px; height: 16px; flex-shrink: 0; }
.cat-green .cat-ic, .cat-green .chip-ic { fill: var(--green); }
.cat-sky   .cat-ic, .cat-sky   .chip-ic { fill: var(--sky); }
.cat-amber .cat-ic, .cat-amber .chip-ic { fill: var(--amber); }
.cat-rose  .cat-ic, .cat-rose  .chip-ic { fill: var(--rose); }

.tech-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.chip {
    --tile: var(--panel);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--tile);
    padding: 0.5rem 0.7rem;
    font-family: var(--font-term);
    font-size: 1.05rem;
    color: var(--text);
    box-shadow: 0 0 0 3px var(--outline);
    transition: transform var(--t-fast), background var(--t-fast);
}
.chip:hover { transform: translate(-2px, -2px); background: var(--tile); }
.chip-ic { width: 16px; height: 16px; flex-shrink: 0; }

/* ========================================
   EXPERIENCE — quest log
   ======================================== */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 6px; bottom: 6px;
    width: 4px;
    background: repeating-linear-gradient(180deg, var(--primary) 0 8px, transparent 8px 14px);
}
.timeline-item { position: relative; margin-bottom: 2.25rem; padding-left: 34px; }
.timeline-marker {
    position: absolute;
    left: -34px; top: 4px;
    width: 16px; height: 16px;
    background: var(--amber);
    box-shadow: 0 0 0 4px var(--outline);
    transition: transform var(--t-fast), background var(--t-fast);
}
.timeline-item:hover .timeline-marker { background: var(--primary); transform: scale(1.2); }
.timeline-content { padding: 1.25rem; }
.timeline-item:hover .timeline-content { transform: translate(-2px, -2px); }
.timeline-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; margin-bottom: 0.4rem; }
.timeline-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.timeline-company { font-family: var(--font-term); font-size: 1.25rem; color: var(--primary); }
.timeline-date { display: block; font-family: var(--font-term); font-size: 1.1rem; color: var(--muted); margin-bottom: 0.5rem; }
.timeline-type, .timeline-location {
    display: inline-block;
    font-family: var(--font-term);
    font-size: 0.95rem;
    color: var(--text-dim);
    background: var(--tile);
    padding: 0.1rem 0.6rem;
    box-shadow: 0 0 0 2px var(--outline);
    margin: 0 0.4rem 0.4rem 0;
}
.timeline-project { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.5rem; }
.timeline-project strong { color: var(--amber); }

/* ========================================
   EDUCATION
   ======================================== */
.education-card { display: flex; align-items: flex-start; gap: 1.5rem; max-width: 640px; padding: 1.75rem; }
.education-icon svg { width: 40px; height: 40px; fill: var(--amber); }
.education-degree { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.education-field { font-family: var(--font-term); font-size: 1.3rem; color: var(--primary); margin-bottom: 0.5rem; }
.education-institution { color: var(--text-dim); margin-bottom: 0.25rem; }
.education-duration, .education-grade { font-family: var(--font-term); font-size: 1.1rem; color: var(--muted); }

/* ========================================
   CERTIFICATIONS
   ======================================== */
.certifications-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.cert-card { display: flex; gap: 1rem; padding: 1.5rem; }
.cert-icon svg { width: 32px; height: 32px; fill: var(--sky); flex-shrink: 0; }
.cert-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; line-height: 1.4; }
.cert-issuer { font-family: var(--font-term); font-size: 1.2rem; color: var(--primary); margin-bottom: 0.25rem; }
.cert-date { font-family: var(--font-term); font-size: 1.05rem; color: var(--muted); margin-bottom: 0.5rem; }
.cert-id { font-size: 0.65rem; color: var(--muted); word-break: break-all; margin-bottom: 0.5rem; }
.cert-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.skill-tag {
    font-family: var(--font-term);
    font-size: 0.95rem;
    background: var(--tile);
    color: var(--primary);
    padding: 0.1rem 0.6rem;
    box-shadow: 0 0 0 2px var(--outline);
}
.cert-link { font-family: var(--font-term); font-size: 1.15rem; color: var(--primary); transition: transform var(--t-fast); display: inline-block; }
.cert-link:hover { transform: translateX(4px); color: var(--amber); }

/* ========================================
   PROJECTS — game cards
   ======================================== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 2.5rem; }
.project-card { overflow: hidden; }
.project-image { position: relative; overflow: hidden; aspect-ratio: 16/9; border-bottom: 4px solid var(--outline); }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-norm); }
.project-card:hover .project-image img { transform: scale(1.08); }
.project-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 25, 0.85), transparent);
    opacity: 0;
    display: flex; align-items: flex-end; justify-content: flex-start;
    padding: 1.25rem;
    transition: opacity var(--t-norm);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-link {
    font-family: var(--font-term);
    font-size: 1.2rem;
    color: var(--outline);
    background: var(--primary);
    padding: 0.35rem 0.9rem;
    box-shadow: 0 0 0 3px var(--outline);
}
.project-content { padding: 1.5rem; }
.project-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.project-company { font-family: var(--font-term); font-size: 1.2rem; color: var(--primary); margin-bottom: 0.15rem; }
.project-duration { font-family: var(--font-term); font-size: 1.05rem; color: var(--muted); margin-bottom: 0.85rem; }
.project-description { color: var(--text-dim); font-size: 0.85rem; line-height: 1.7; }

/* ========================================
   PUBLICATIONS — terminal log
   ======================================== */
.publications-list { display: flex; flex-direction: column; gap: 0.9rem; }
.publication-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.1rem 1.25rem;
    background: var(--panel);
    box-shadow: 0 0 0 3px var(--outline);
    transition: transform var(--t-fast), background var(--t-fast);
}
.publication-item:hover { transform: translate(-3px, -3px); background: var(--tile); }
.publication-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 58px;
    background: var(--tile);
    box-shadow: 0 0 0 3px var(--outline);
    padding: 0.5rem;
}
.pub-month { font-family: var(--font-term); font-size: 1.05rem; color: var(--primary); text-transform: uppercase; }
.pub-year { font-family: var(--font-pixel); font-size: 0.6rem; color: var(--text); margin-top: 0.25rem; }
.publication-title { font-size: 0.95rem; font-weight: 500; line-height: 1.5; margin-bottom: 0.35rem; }
.publication-title a { color: var(--text); }
.publication-title a:hover { color: var(--primary); }
.publication-platform { font-family: var(--font-term); font-size: 1.05rem; color: var(--muted); }

.pub-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.pub-tag {
    font-family: var(--font-term);
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-dim);
    background: var(--tile);
    box-shadow: 0 0 0 2px var(--outline);
    padding: 0.1rem 0.5rem;
}

/* Shared feed footer (writing + videos) */
.feed-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.75rem;
}
.feed-more { font-family: var(--font-term); font-size: 1.25rem; color: var(--primary); }
.feed-more:hover { color: var(--amber); }
.feed-stamp { font-family: var(--font-term); font-size: 1.05rem; color: var(--muted); }
.feed-empty { font-family: var(--font-term); font-size: 1.25rem; color: var(--text-dim); }
.feed-empty a { color: var(--primary); }
.inline-link { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.inline-link:hover { color: var(--amber); box-shadow: inset 0 -2px 0 var(--amber); }

/* ========================================
   SIDE QUESTS — repo cartridges
   ======================================== */
.subsection-title {
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: var(--text);
    margin: 3rem 0 1.5rem;
    line-height: 1.8;
}
.cartridge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.cartridge { display: flex; flex-direction: column; padding: 1.25rem; }
.cartridge:hover { transform: translate(-3px, -3px); background: var(--tile); }
.cartridge-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.cartridge-ic { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.cartridge-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.cartridge-lang {
    font-family: var(--font-term);
    font-size: 1rem;
    color: var(--muted);
    margin-left: auto;
}
.cartridge-desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.7; flex: 1; }
.cartridge-cta { font-family: var(--font-term); font-size: 1.15rem; color: var(--primary); margin-top: 1rem; }
.cartridge:hover .cartridge-cta { color: var(--amber); }

/* ========================================
   VIDEOS — FluxStack broadcasts
   ======================================== */
.section-lede {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 640px;
    margin: -1rem 0 2.25rem;
}
.section-lede strong { color: var(--primary); font-weight: 700; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; }
.video-card { display: flex; flex-direction: column; overflow: hidden; }
.video-card:hover { transform: translate(-3px, -3px); }
.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-bottom: 4px solid var(--outline);
    background: var(--tile);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-norm); }
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: var(--text);
    background: rgba(12, 12, 24, 0.45);
    opacity: 0;
    transition: opacity var(--t-fast);
}
.video-card:hover .video-play { opacity: 1; }
.video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: var(--font-term);
    font-size: 1rem;
    line-height: 1.2;
    color: var(--outline);
    background: var(--amber);
    box-shadow: 0 0 0 3px var(--outline);
    padding: 0 0.4rem;
}
.video-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.video-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card:hover .video-title { color: var(--primary); }
.video-meta {
    display: flex;
    gap: 0.75rem;
    font-family: var(--font-term);
    font-size: 1.05rem;
    color: var(--muted);
}

/* ========================================
   AWARDS — achievements
   ======================================== */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.award-card { text-align: center; padding: 1rem; }
.award-image-link { display: block; }
.award-image { aspect-ratio: 4/3; overflow: hidden; box-shadow: 0 0 0 4px var(--outline); margin-bottom: 1rem; }
.award-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-norm); }
.award-card:hover .award-image img { transform: scale(1.05); }
.award-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.award-issuer { font-family: var(--font-term); font-size: 1.2rem; color: var(--primary); margin-bottom: 0.5rem; }
.award-description { font-size: 0.75rem; color: var(--muted); line-height: 1.6; }

/* ========================================
   CONTACT
   ======================================== */
.contact-content { max-width: 640px; margin: 0 auto; }
.contact-term .term-body { text-align: left; }
.contact-text { color: var(--text-dim); font-size: 0.95rem; line-height: 1.8; margin: 1rem 0 1.75rem; }
.contact-info { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.75rem; }
.contact-item {
    display: flex; align-items: center; gap: 0.75rem;
    font-family: var(--font-term);
    font-size: 1.25rem;
    padding: 0.6rem 1rem;
    background: var(--panel);
    color: var(--text-dim);
    box-shadow: 0 0 0 3px var(--outline);
    transition: transform var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.contact-item:hover { transform: translate(-2px, -2px); color: var(--text); background: var(--tile); }
.contact-item .prompt { min-width: 24px; }

/* ========================================
   FOOTER
   ======================================== */
.footer { padding: 2.5rem 2rem; text-align: center; border-top: 4px solid var(--outline); }
.footer-text { font-family: var(--font-term); font-size: 1.2rem; color: var(--text-dim); margin-bottom: 0.35rem; }
.footer-text .highlight { color: var(--primary); }
.footer-copyright { font-family: var(--font-term); font-size: 1.05rem; color: var(--muted); }

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 1.75rem; right: 1.75rem;
    width: 48px; height: 48px;
    font-family: var(--font-pixel);
    font-size: 1rem;
    background: var(--primary);
    color: var(--outline);
    box-shadow: 0 0 0 4px var(--outline);
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: all var(--t-fast);
    z-index: 100;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translate(-2px, -4px); background: var(--amber); }

/* ========================================
   COMMAND PALETTE
   ======================================== */
.cmdk {
    position: fixed; inset: 0;
    z-index: 5000;
    background: rgba(10, 10, 25, 0.7);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}
.cmdk.open { display: flex; }
.cmdk-panel { width: min(520px, 92vw); padding: 0; background: var(--panel); }
.cmdk-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1rem; border-bottom: 4px solid var(--outline); }
.cmdk-input {
    flex: 1;
    background: none; border: none; outline: none;
    font-family: var(--font-term);
    font-size: 1.4rem;
    color: var(--text);
}
.cmdk-input::placeholder { color: var(--muted); }
.cmdk-esc { font-size: 0.55rem; }
.cmdk-list { max-height: 45vh; overflow-y: auto; padding: 0.5rem; }
.cmdk-item {
    display: flex; align-items: center; gap: 0.6rem;
    font-family: var(--font-term);
    font-size: 1.25rem;
    color: var(--text-dim);
    padding: 0.55rem 0.75rem;
    cursor: pointer;
}
.cmdk-item .n { color: var(--muted); font-size: 0.9rem; }
.cmdk-item.active, .cmdk-item:hover { background: var(--tile); color: var(--primary); }
.cmdk-item.active::before { content: '>'; color: var(--primary); margin-right: 0.25rem; }

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 0.4s steps(4), transform 0.4s steps(4); }
.animate-on-scroll.animate-in { opacity: 1; transform: translateY(0); }
.slide-left { transform: translateX(-24px); }
.slide-left.animate-in { transform: translateX(0); }
.slide-right { transform: translateX(24px); }
.slide-right.animate-in { transform: translateX(0); }

.stagger-children > * { opacity: 0; transform: translateY(16px); transition: opacity 0.3s steps(3), transform 0.3s steps(3); }
.stagger-children.animate-in > * { opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.animate-in > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.animate-in > *:nth-child(6) { transition-delay: 0.40s; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .about-content { grid-template-columns: 1fr; gap: 2rem; }
    .char-card { max-width: 300px; margin: 0 auto; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 270px; }
    .hamburger { display: flex; }
    .mobile-overlay { display: block; }
    .sidebar { transform: translateX(-100%); box-shadow: 8px 0 0 0 var(--drop); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .section { padding: 4rem 1.25rem; }
    .term-body { padding: 1.25rem; }
    .about-info { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .certifications-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .awards-grid { grid-template-columns: 1fr; }
    .publication-item { flex-direction: column; gap: 0.75rem; }
    .publication-date { flex-direction: row; gap: 0.5rem; align-self: flex-start; }
    .pub-year { margin-top: 0; }
    .video-grid { grid-template-columns: 1fr; }
    .cartridge-grid { grid-template-columns: 1fr; }
    .section-lede { margin-top: -0.5rem; }
}

@media (max-width: 480px) {
    .section { padding: 3.5rem 1rem; }
    .hero-title { text-shadow: 3px 3px 0 var(--outline); }
    .section-title { margin-bottom: 2rem; }
    .term-body { padding: 1rem; }
    .btn { font-size: 1.1rem; }
    .projects-grid { grid-template-columns: 1fr; }
}
