/* =========================================
   PAC-MAN CV — Dark Theme
   Palette
   --bg          : pure dark
   --bg-2        : blackish grey panels
   --maze        : signature pac-man blue
   --yellow      : pac-man
   --dot         : peach dots
   --red/pink/cyan/orange : ghost colors
========================================= */
:root {
    --bg: #0a0a0a;
    --bg-2: #141416;
    --bg-3: #1c1c1f;
    --panel: rgba(28, 28, 31, 0.85);
    --border: #2a2a2e;
    --maze: #2121de;
    --maze-glow: rgba(33, 33, 222, 0.6);
    --yellow: #ffcc00;
    --yellow-bright: #ffe600;
    --dot: #ffb897;
    --white: #ffffff;
    --muted: #8a8a92;
    --red: #ff2b2b;
    --pink: #ffb8ff;
    --cyan: #00ffff;
    --orange: #ffb852;
    --font-arcade: "Press Start 2P", system-ui, monospace;
    --font-mono: "VT323", "Courier New", monospace;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;

    /* ---- SVG Pac-Man sprites ---- */
    /* Path is: center -> top mouth corner -> LARGE arc (sweep=0 = CCW long
       way through the left side) -> bottom mouth corner -> back to center.
       The arc must use sweep-flag 0 here, otherwise the SMALL wedge gets
       filled instead of the body, producing a triangle. */

    /* Wide-open mouth: ~90° wedge (most open frame) */
    --pac-wide:    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M 16 16 L 27.31 4.69 A 16 16 0 1 0 27.31 27.31 Z' fill='%23ffcc00'/%3E%3C/svg%3E");
    /* Half-open mouth: ~60° wedge (mid frame) */
    --pac-open:    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M 16 16 L 29.86 8.00 A 16 16 0 1 0 29.86 24.00 Z' fill='%23ffcc00'/%3E%3C/svg%3E");
    /* Closed mouth: full yellow disc */
    --pac-closed:  url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='16' fill='%23ffcc00'/%3E%3C/svg%3E");

    --ghost-red:    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 34'%3E%3Cpath d='M 0 18 A 16 16 0 0 1 32 18 L 32 32 L 28 28 L 24 32 L 20 28 L 16 32 L 12 28 L 8 32 L 4 28 L 0 32 Z' fill='%23ff2b2b'/%3E%3Ccircle cx='11' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='22' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='12.5' cy='15' r='2.3' fill='%232121de'/%3E%3Ccircle cx='23.5' cy='15' r='2.3' fill='%232121de'/%3E%3C/svg%3E");
    --ghost-pink:   url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 34'%3E%3Cpath d='M 0 18 A 16 16 0 0 1 32 18 L 32 32 L 28 28 L 24 32 L 20 28 L 16 32 L 12 28 L 8 32 L 4 28 L 0 32 Z' fill='%23ffb8ff'/%3E%3Ccircle cx='11' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='22' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='12.5' cy='15' r='2.3' fill='%232121de'/%3E%3Ccircle cx='23.5' cy='15' r='2.3' fill='%232121de'/%3E%3C/svg%3E");
    --ghost-cyan:   url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 34'%3E%3Cpath d='M 0 18 A 16 16 0 0 1 32 18 L 32 32 L 28 28 L 24 32 L 20 28 L 16 32 L 12 28 L 8 32 L 4 28 L 0 32 Z' fill='%2300ffff'/%3E%3Ccircle cx='11' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='22' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='12.5' cy='15' r='2.3' fill='%232121de'/%3E%3Ccircle cx='23.5' cy='15' r='2.3' fill='%232121de'/%3E%3C/svg%3E");
    --ghost-orange: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 34'%3E%3Cpath d='M 0 18 A 16 16 0 0 1 32 18 L 32 32 L 28 28 L 24 32 L 20 28 L 16 32 L 12 28 L 8 32 L 4 28 L 0 32 Z' fill='%23ffb852'/%3E%3Ccircle cx='11' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='22' cy='14' r='4.6' fill='white'/%3E%3Ccircle cx='12.5' cy='15' r='2.3' fill='%232121de'/%3E%3Ccircle cx='23.5' cy='15' r='2.3' fill='%232121de'/%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(33, 33, 222, 0.08), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 204, 0, 0.04), transparent 40%),
        linear-gradient(180deg, #0a0a0a 0%, #111113 100%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--yellow);
}

::selection {
    background: var(--yellow);
    color: #000;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--maze), #4040ff);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

/* =========================================
   LOADING SCREEN
========================================= */
.loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-family: var(--font-arcade);
    color: var(--yellow);
    font-size: 32px;
    letter-spacing: 4px;
    animation: blink 0.6s steps(1) infinite;
    text-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}

@keyframes blink {
    50% { opacity: 0; }
}

.loader-track {
    position: relative;
    width: 320px;
    height: 40px;
    display: flex;
    align-items: center;
}

.loader-dots {
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 1;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    background: var(--dot);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 184, 151, 0.6);
}

.loader-pac {
    position: absolute;
    left: 0;
    width: 28px;
    height: 28px;
    z-index: 2;
    background: var(--pac-open) center / contain no-repeat;
    filter: drop-shadow(0 0 12px rgba(255, 204, 0, 0.55));
    animation: loaderPac 2.5s linear infinite, pacChomp 0.4s linear infinite;
}

@keyframes loaderPac {
    0%   { left: 0;                    transform: scaleX(1);  }
    49%  { left: calc(100% - 28px);    transform: scaleX(1);  }
    50%  { left: calc(100% - 28px);    transform: scaleX(-1); }
    99%  { left: 0;                    transform: scaleX(-1); }
    100% { left: 0;                    transform: scaleX(1);  }
}

/* 4-frame chomp cycle: wide -> open -> closed -> open -> back to wide.
   background-image is a non-interpolable property, so plain linear
   timing makes it snap cleanly at each keyframe boundary. */
@keyframes pacChomp {
    0%, 24%    { background-image: var(--pac-wide); }
    25%, 49%   { background-image: var(--pac-open); }
    50%, 74%   { background-image: var(--pac-closed); }
    75%, 99%   { background-image: var(--pac-open); }
    100%       { background-image: var(--pac-wide); }
}

/* =========================================
   HUD (top arcade header)
========================================= */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 14px 28px;
    background: linear-gradient(180deg, rgba(0,0,0,0.95), rgba(0,0,0,0.6));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.hud-label {
    font-family: var(--font-arcade);
    color: var(--white);
    font-size: 9px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.hud-score {
    font-family: var(--font-arcade);
    color: var(--yellow);
    font-size: 14px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.hud-center {
    text-align: center;
}

.hud-right {
    text-align: right;
}

.lives {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.life {
    width: 18px;
    height: 18px;
    background: var(--pac-open) center / contain no-repeat;
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.4));
}

/* =========================================
   NAV
========================================= */
.nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 16px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--maze);
    box-shadow: 0 4px 20px rgba(33, 33, 222, 0.15);
}

.nav-link {
    font-family: var(--font-arcade);
    font-size: 9px;
    letter-spacing: 1.5px;
    padding: 8px 14px;
    color: var(--white);
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--yellow);
    border-color: var(--maze);
    background: rgba(33, 33, 222, 0.15);
    padding-left: 16px;
}

.nav-link:hover::before {
    background: var(--yellow);
    box-shadow: 0 0 8px var(--yellow);
}

/* =========================================
   HERO
========================================= */
.hero {
    min-height: 100vh;
    padding: 180px 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(33, 33, 222, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 33, 222, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1100px;
    width: 100%;
}

.title {
    font-family: var(--font-arcade);
    font-size: clamp(28px, 7vw, 80px);
    line-height: 1.1;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(33, 33, 222, 0.5);
}

.title-line {
    display: block;
    color: var(--white);
}

.title-line.yellow {
    color: var(--yellow);
    text-shadow: 0 0 25px rgba(255, 204, 0, 0.6), 0 4px 0 rgba(0,0,0,0.5);
    animation: yellowPulse 2.5s ease-in-out infinite;
}

@keyframes yellowPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.subtitle {
    margin-top: 32px;
    font-family: var(--font-arcade);
    font-size: clamp(8px, 1.2vw, 12px);
    color: var(--dot);
    letter-spacing: 3px;
    line-height: 1.8;
}

/* Chase line in hero */
.hero-chase {
    position: relative;
    height: 56px;
    margin: 60px auto 30px;
    max-width: 900px;
    border-top: 2px solid var(--maze);
    border-bottom: 2px solid var(--maze);
    box-shadow: 0 0 20px rgba(33, 33, 222, 0.3) inset;
    background: rgba(10,10,10,0.5);
}

.chase-pac {
    position: absolute;
    top: 50%;
    left: 0;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    background: var(--pac-open) center / contain no-repeat;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.55));
    animation: heroChase 9s linear infinite, pacChomp 0.4s linear infinite;
    z-index: 3;
}

@keyframes heroChase {
    0% { left: -40px; }
    100% { left: 100%; }
}

.chase-dots {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
}

.chase-dots span {
    width: 6px;
    height: 6px;
    background: var(--dot);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 184, 151, 0.5);
    animation: dotsEaten 9s linear infinite;
    opacity: 1;
}

.chase-dots span:nth-child(1)  { animation-delay: 0.0s; }
.chase-dots span:nth-child(2)  { animation-delay: 0.4s; }
.chase-dots span:nth-child(3)  { animation-delay: 0.8s; }
.chase-dots span:nth-child(4)  { animation-delay: 1.2s; }
.chase-dots span:nth-child(5)  { animation-delay: 1.6s; }
.chase-dots span:nth-child(6)  { animation-delay: 2.0s; }
.chase-dots span:nth-child(7)  { animation-delay: 2.4s; }
.chase-dots span:nth-child(8)  { animation-delay: 2.8s; }
.chase-dots span:nth-child(9)  { animation-delay: 3.2s; }
.chase-dots span:nth-child(10) { animation-delay: 3.6s; }
.chase-dots span:nth-child(11) { animation-delay: 4.0s; }
.chase-dots span:nth-child(12) { animation-delay: 4.4s; }
.chase-dots span:nth-child(13) { animation-delay: 4.8s; }
.chase-dots span:nth-child(14) { animation-delay: 5.2s; }
.chase-dots span:nth-child(15) { animation-delay: 5.6s; }

@keyframes dotsEaten {
    0%, 90% { opacity: 1; }
    91%, 100% { opacity: 0; }
}

/* Ghosts chasing pac */
.chase-ghost {
    position: absolute;
    top: 50%;
    width: 26px;
    height: 28px;
    transform: translateY(-50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.5));
    animation: heroChase 9s linear infinite;
    z-index: 2;
}

.ghost-red    { background-image: var(--ghost-red);    animation-delay: -0.5s; }
.ghost-pink   { background-image: var(--ghost-pink);   animation-delay: -1.0s; }
.ghost-cyan   { background-image: var(--ghost-cyan);   animation-delay: -1.5s; }
.ghost-orange { background-image: var(--ghost-orange); animation-delay: -2.0s; }

.hero-actions {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.btn {
    font-family: var(--font-arcade);
    font-size: 11px;
    letter-spacing: 2px;
    padding: 16px 28px;
    border: 2px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--yellow);
    color: #000;
    border-color: var(--yellow);
    box-shadow: 0 0 18px rgba(255, 204, 0, 0.4);
}

.btn-primary:hover {
    background: var(--yellow-bright);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(255, 204, 0, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--maze);
}

.btn-secondary:hover {
    background: rgba(33, 33, 222, 0.2);
    color: var(--yellow);
    transform: translateY(-2px);
}

.scroll-hint {
    margin-top: 60px;
    font-family: var(--font-arcade);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 2px;
    animation: floatY 2s ease-in-out infinite;
}

.scroll-arrow {
    margin-top: 8px;
    color: var(--yellow);
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* =========================================
   SECTIONS — generic
========================================= */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px 60px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-arcade);
    font-size: clamp(16px, 3vw, 24px);
    color: var(--yellow);
    letter-spacing: 3px;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-shadow: 0 0 18px rgba(255, 204, 0, 0.4);
}

.section-title::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--maze) 0%, transparent 100%);
    box-shadow: 0 0 8px var(--maze-glow);
}

.pellet {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--dot);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(255, 184, 151, 0.8);
    animation: pelletPulse 1.2s ease-in-out infinite;
}

@keyframes pelletPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.6); opacity: 0.5; }
}

/* =========================================
   ABOUT
========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: stretch;
}

.about-card {
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 36px;
    position: relative;
}

.about-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--yellow), var(--maze));
    border-radius: 8px 8px 0 0;
}

.about-lead {
    font-size: 17px;
    line-height: 1.75;
    color: #d6d6dd;
}

.hl {
    color: var(--yellow);
    font-weight: 600;
}

.about-meta {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meta-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.meta-row:hover {
    border-color: var(--maze);
    transform: translateX(4px);
}

.meta-key {
    font-family: var(--font-arcade);
    font-size: 9px;
    color: var(--yellow);
    letter-spacing: 1.5px;
}

.meta-val {
    font-size: 14px;
    color: #dcdce4;
    word-break: break-all;
}

/* Arcade (right side) */
.about-arcade {
    background: linear-gradient(180deg, #1c1c20 0%, #0f0f12 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.arcade-screen {
    flex: 1;
    background: #000;
    border: 4px solid var(--maze);
    border-radius: 8px;
    position: relative;
    min-height: 300px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(33, 33, 222, 0.3) inset;
    cursor: pointer;
}

.arcade-screen canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.arcade-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
    font-family: var(--font-arcade);
    color: var(--yellow);
    font-size: 14px;
    letter-spacing: 2px;
    text-shadow: 0 0 14px rgba(255, 204, 0, 0.5);
    animation: blink 1s steps(1) infinite;
    cursor: pointer;
    transition: opacity 0.3s;
}

.arcade-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    animation: none;
    display: none;
}

.arcade-hint {
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 1.5px;
    animation: none;
}

.arcade-base {
    font-family: var(--font-arcade);
    font-size: 10px;
    color: var(--yellow);
    text-align: center;
    margin-top: 12px;
    letter-spacing: 3px;
}

/* =========================================
   TIMELINE / EXPERIENCE
========================================= */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline-track {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--maze);
    box-shadow: 0 0 12px var(--maze-glow);
    border-radius: 2px;
}

.exp {
    position: relative;
    margin-bottom: 36px;
}

.exp-dot {
    position: absolute;
    left: -38px;
    top: 22px;
    width: 18px;
    height: 18px;
    background: var(--dot);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(255, 184, 151, 0.7);
    border: 3px solid var(--bg);
    animation: pelletPulse 1.6s ease-in-out infinite;
}

.exp-card {
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 24px 28px;
    transition: all 0.25s;
}

.exp-card:hover {
    border-color: var(--yellow);
    transform: translateX(6px);
    box-shadow: -4px 0 0 var(--yellow), 0 6px 22px rgba(0,0,0,0.4);
}

.exp-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.exp-header h3 {
    font-size: 18px;
    color: var(--white);
    font-weight: 600;
}

.exp-date {
    font-family: var(--font-arcade);
    font-size: 9px;
    color: var(--yellow);
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.exp-company {
    color: var(--dot);
    font-style: italic;
    margin-bottom: 12px;
    font-size: 14px;
}

.exp-list {
    list-style: none;
    padding: 0;
}

.exp-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 6px;
    color: #c8c8d0;
    font-size: 14.5px;
    line-height: 1.6;
}

.exp-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--dot);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 184, 151, 0.5);
}

/* =========================================
   EDUCATION
========================================= */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.edu-card {
    background: var(--panel);
    border: 2px solid var(--maze);
    border-radius: 8px;
    padding: 28px;
    position: relative;
    box-shadow: 0 0 25px rgba(33, 33, 222, 0.15);
    transition: all 0.25s;
}

.edu-card:hover {
    transform: translateY(-4px);
    border-color: var(--yellow);
    box-shadow: 0 8px 30px rgba(255, 204, 0, 0.15);
}

.edu-ribbon {
    position: absolute;
    top: -1px;
    right: 18px;
    background: var(--yellow);
    color: #000;
    font-family: var(--font-arcade);
    font-size: 9px;
    letter-spacing: 1.5px;
    padding: 8px 14px 6px;
    border-radius: 0 0 6px 6px;
}

.edu-card h3 {
    color: var(--white);
    margin: 18px 0 6px;
    font-size: 19px;
}

.edu-school {
    color: var(--dot);
    font-style: italic;
    margin-bottom: 18px;
    font-size: 14.5px;
}

.edu-stat {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.edu-stat span {
    font-family: var(--font-arcade);
    font-size: 9px;
    color: var(--yellow);
    letter-spacing: 1.5px;
}

.edu-stat strong {
    font-family: var(--font-mono);
    font-size: 22px;
    color: var(--white);
    line-height: 1;
}

.edu-research {
    color: #b8b8c0;
    font-size: 14px;
    line-height: 1.65;
}

/* =========================================
   SKILLS
========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.skill-block {
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 22px;
    transition: border-color 0.2s, transform 0.2s;
}

.skill-block:hover {
    border-color: var(--maze);
    transform: translateY(-3px);
}

.skill-block h4 {
    font-family: var(--font-arcade);
    font-size: 10px;
    color: var(--yellow);
    letter-spacing: 2px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 16px;
    padding: 6px 14px;
    border: 1px solid var(--maze);
    border-radius: 999px;
    background: rgba(33, 33, 222, 0.15);
    color: #e6e6f0;
    transition: all 0.2s;
    cursor: default;
    letter-spacing: 0.5px;
}

.tag:hover {
    background: var(--yellow);
    color: #000;
    border-color: var(--yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

.tags.small .tag {
    font-size: 14px;
    padding: 4px 10px;
}

/* =========================================
   PROJECTS
========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 22px;
}

.proj-card {
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 26px;
    position: relative;
    transition: all 0.25s;
    overflow: hidden;
}

.proj-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(33,33,222,0.15), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.proj-card:hover {
    transform: translateY(-4px);
    border-color: var(--yellow);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.proj-card:hover::before {
    opacity: 1;
}

.proj-corner {
    position: absolute;
    top: -1px;
    left: -1px;
    width: 18px;
    height: 18px;
    background:
        linear-gradient(135deg, var(--maze) 50%, transparent 50%);
    border-radius: 8px 0 0 0;
}

.proj-card.published .proj-corner {
    background: linear-gradient(135deg, var(--yellow) 50%, transparent 50%);
}

.proj-badge {
    display: inline-block;
    font-family: var(--font-arcade);
    font-size: 8px;
    letter-spacing: 1.5px;
    color: #000;
    background: var(--yellow);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.proj-card h3 {
    color: var(--white);
    font-size: 17px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.proj-card p {
    color: #b8b8c0;
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.proj-card em {
    color: var(--dot);
    font-style: italic;
}

/* =========================================
   AWARDS / CERTS
========================================= */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    margin-bottom: 56px;
}

.award-card {
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 26px;
    position: relative;
    transition: all 0.25s;
}

.award-card:hover {
    transform: translateY(-4px);
    border-color: var(--yellow);
}

.award-icon {
    font-size: 28px;
    color: var(--yellow);
    text-shadow: 0 0 16px rgba(255, 204, 0, 0.6);
    margin-bottom: 8px;
}

.award-card h4 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 10px;
}

.award-card p, .award-card li {
    color: #c8c8d0;
    font-size: 14.5px;
    line-height: 1.6;
}

.award-card ul {
    list-style: none;
    padding: 0;
}

.award-card li {
    padding-left: 18px;
    position: relative;
    margin-bottom: 4px;
}

.award-card li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--yellow);
}

.award-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 13.5px !important;
    color: var(--muted) !important;
    font-style: italic;
}

.sub-title {
    font-family: var(--font-arcade);
    color: var(--yellow);
    font-size: 14px;
    letter-spacing: 2px;
    margin: 24px 0 24px;
}

.certs {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 10px 22px;
}

.certs li {
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--maze);
    border-radius: 4px;
    color: #d6d6dd;
    font-size: 14.5px;
    transition: all 0.2s;
}

.certs li:hover {
    border-left-color: var(--yellow);
    background: rgba(33, 33, 222, 0.1);
    transform: translateX(4px);
}

.cert-bullet {
    color: var(--dot);
    margin-right: 8px;
}

/* =========================================
   CONTACT
========================================= */
.section-contact {
    padding-bottom: 100px;
}

.contact-card {
    background: var(--panel);
    border: 2px solid var(--maze);
    border-radius: 10px;
    padding: 36px;
    box-shadow: 0 0 50px rgba(33, 33, 222, 0.2);
}

.contact-screen {
    background: #000;
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 20px 24px;
    font-family: var(--font-mono);
    color: var(--yellow);
    font-size: 22px;
    line-height: 1.5;
    margin-bottom: 28px;
}

.contact-line {
    opacity: 0;
    animation: typeIn 0.6s forwards;
}

.contact-line:nth-child(1) { animation-delay: 0.1s; }
.contact-line:nth-child(2) { animation-delay: 0.6s; }
.contact-line:nth-child(3) { animation-delay: 1.2s; }

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.c-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.c-link:hover {
    transform: translateY(-3px);
    border-color: var(--yellow);
    background: rgba(255, 204, 0, 0.08);
}

.c-key {
    font-family: var(--font-arcade);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--yellow);
}

.c-val {
    color: #e6e6f0;
    font-size: 15px;
    word-break: break-all;
}

/* =========================================
   FOOTER
========================================= */
.footer {
    padding: 40px 24px 30px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.6);
    position: relative;
    z-index: 1;
}

.footer-track {
    position: relative;
    max-width: 700px;
    margin: 0 auto 20px;
    height: 30px;
}

.footer-dots {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

.footer-dots span {
    width: 5px;
    height: 5px;
    background: var(--dot);
    border-radius: 50%;
    animation: dotsEaten 6s linear infinite;
}

.footer-dots span:nth-child(n) { animation-delay: calc(0.25s * var(--i, 0)); }

.footer-pac {
    position: absolute;
    top: 50%;
    left: 0;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    background: var(--pac-open) center / contain no-repeat;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.55));
    animation: footerPac 6s linear infinite, pacChomp 0.4s linear infinite;
}

@keyframes footerPac {
    0%   { left: 0; }
    100% { left: 100%; }
}

.footer-text {
    text-align: center;
    font-family: var(--font-arcade);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--muted);
}

/* =========================================
   CURSOR PAC (desktop only)
========================================= */
.cursor-pac {
    position: fixed;
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 9000;
    transform: translate(-50%, -50%);
    transition: transform 0.04s linear;
    background: var(--pac-open) center / contain no-repeat;
    filter: drop-shadow(0 0 8px rgba(255, 204, 0, 0.6));
    display: none;
    animation: pacChomp 0.4s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
    .cursor-pac { display: block; }
}

/* =========================================
   REVEAL ANIMATIONS
========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .nav { gap: 0; padding: 8px; }
    .nav-link { font-size: 8px; padding: 6px 8px; }
    .hud { padding: 10px 16px; }
    .hud-label { font-size: 7px; }
    .hud-score { font-size: 11px; }
    .hero { padding-top: 160px; }
    .meta-row { grid-template-columns: 80px 1fr; }
}

@media (max-width: 600px) {
    .hud { grid-template-columns: 1fr 1fr; }
    .hud-center { display: none; }
    .timeline { padding-left: 36px; }
    .timeline-track { left: 12px; }
    .exp-dot { left: -28px; }
    .section { padding: 80px 18px 40px; }
}

/* =========================================
   AMBIENT BACKGROUND — single pac-man chased by a ghost trail
========================================= */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.55;
}

.ambient-pac,
.ambient-ghost {
    position: absolute;
    top: 0;
    left: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
}

.ambient-pac {
    background-image: var(--pac-open);
    animation: pacChomp 0.4s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.6));
}

.ambient-ghost {
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.55));
}

.ambient-ghost.ag-red    { background-image: var(--ghost-red); }
.ambient-ghost.ag-pink   { background-image: var(--ghost-pink); }
.ambient-ghost.ag-cyan   { background-image: var(--ghost-cyan); }
.ambient-ghost.ag-orange { background-image: var(--ghost-orange); }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .ambient { display: none; }
    .loader-pac, .chase-pac, .arcade-pac, .footer-pac,
    .chase-ghost, .arcade-ghost { animation: none !important; }
}
