/* ============================================================
   THEME
   ============================================================ */
:root {
    --bg: #05060f;
    --bg-2: #0a0c1c;
    --surface: rgba(15, 18, 36, 0.82);
    --surface-2: rgba(20, 24, 48, 0.9);
    --border: rgba(148, 163, 255, 0.16);
    --border-bright: rgba(148, 163, 255, 0.4);

    --cyan: #22d3ee;
    --magenta: #e879f9;
    --purple: #a78bfa;
    --green: #4ade80;
    --amber: #fbbf24;
    --red: #f87171;

    --text: #e4e9ff;
    --muted: #8b92c2;
    --dim: #5b6190;

    --grad: linear-gradient(120deg, var(--cyan), var(--purple) 55%, var(--magenta));
    --grad-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(167, 139, 250, 0.18), rgba(232, 121, 249, 0.18));

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

    --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.35);
    --glow-purple: 0 0 20px rgba(167, 139, 250, 0.35);
}

/* theme presets toggled from the terminal */
body[data-theme="matrix"] { --cyan: #4ade80; --purple: #86efac; --magenta: #fbbf24; --grad: linear-gradient(120deg, #4ade80, #86efac, #fbbf24); }
body[data-theme="candy"] { --cyan: #f472b6; --purple: #a78bfa; --magenta: #fb7185; --grad: linear-gradient(120deg, #f472b6, #a78bfa, #fb7185); }
body[data-theme="sunset"] { --cyan: #fb923c; --purple: #f472b6; --magenta: #fbbf24; --grad: linear-gradient(120deg, #fb923c, #f472b6, #fbbf24); }

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

html { scroll-behavior: smooth; scroll-padding-top: 2rem; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

@media (pointer: fine) {
    body, a, button, input, textarea, .magnetic, [data-cursor] { cursor: none; }
}
@media (pointer: coarse) {
    .cursor-dot, .cursor-ring, .cursor-trail { display: none; }
}

::selection { background: var(--purple); color: #0b0614; }

a { color: var(--cyan); text-decoration: none; }

button { font-family: inherit; }

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

section { position: relative; }

h1, h2, h3 { font-family: var(--font-display); }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hl { color: var(--cyan); font-weight: 500; }

.code-inline {
    font-family: var(--font-mono);
    color: var(--green);
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 0.86em;
}

/* ============================================================
   BACKGROUND FX
   ============================================================ */
.matrix-rain {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw !important;
    height: 100dvh !important;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
}

/* ============================================================
   SCROLL PROGRESS / CURSOR
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--grad);
    box-shadow: var(--glow-cyan);
    z-index: 1000;
    transition: width 0.1s linear;
}

.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    will-change: transform;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    z-index: 9999;
}
.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(34, 211, 238, 0.6);
    transition: width 0.25s, height 0.25s, border-color 0.25s;
}
.cursor-ring.is-hover {
    width: 58px;
    height: 58px;
    border-color: var(--magenta);
    background: rgba(232, 121, 249, 0.08);
}
.cursor-ring.is-down { width: 26px; height: 26px; }

.cursor-trail {
    position: fixed;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--purple);
    pointer-events: none;
    z-index: 9997;
    opacity: 0.5;
}

/* ============================================================
   BOOT OVERLAY
   ============================================================ */
.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #03040c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s, visibility 0.6s;
}
.boot-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-window {
    width: min(620px, 90vw);
    border: 1px solid var(--border-bright);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.12);
    overflow: hidden;
}
.boot-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}
.boot-body {
    padding: 18px;
    font-size: 13px;
    min-height: 160px;
    color: var(--green);
    white-space: pre-wrap;
}
.boot-body .ok { color: var(--cyan); }
.boot-body .warn { color: var(--amber); }
.boot-body .err { color: var(--red); }

.boot-skip {
    position: absolute;
    bottom: 26px;
    right: 26px;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 18px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    transition: all 0.3s;
}
.boot-skip:hover { color: var(--text); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4vw;
    transition: all 0.35s;
}
.navbar.scrolled {
    background: rgba(5, 6, 15, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 12px 4vw;
}
.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--text);
    display: flex;
    align-items: center;
}
.logo-bracket { color: var(--cyan); }
.logo-slash { color: var(--magenta); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
    color: var(--muted);
    font-size: 13.5px;
    position: relative;
    transition: color 0.25s;
    padding: 0.5rem 0;
}
.nav-links a::before {
    content: "/";
    color: var(--purple);
    opacity: 0;
    margin-right: 2px;
    transition: opacity 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; }
.nav-cta {
    border: 1px solid var(--border-bright);
    padding: 8px 16px !important;
    border-radius: 8px;
    color: var(--cyan) !important;
    transition: all 0.3s;
}
.nav-cta:hover {
    box-shadow: var(--glow-cyan);
    border-color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
}
.nav-cta::before { display: none; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 120px 24px;
    z-index: 1;
}

.section-head { text-align: center; margin-bottom: 60px; }
.section-tag {
    font-size: 12px;
    color: var(--muted);
    text-transform: lowercase;
    letter-spacing: 3px;
    margin-bottom: 14px;
}
.section-tag::before { content: "["; color: var(--cyan); margin-right: 6px; }
.section-tag::after { content: "]"; color: var(--magenta); margin-left: 6px; }

.section-title {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
}
.section-sub {
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    font-size: 14.5px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 110px;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 26px;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.hero-title {
    font-size: clamp(40px, 6.5vw, 74px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.05;
    margin-bottom: 10px;
}
.hero-title-pre {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 0.5em;
    margin-right: 6px;
}

.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}
.hero:hover .glitch::before {
    opacity: 0.8;
    color: var(--magenta);
    transform: translate(3px, -2px);
    animation: glitch-shift 3s infinite steps(2);
}
.hero:hover .glitch::after {
    opacity: 0.8;
    color: var(--cyan);
    transform: translate(-3px, 2px);
    animation: glitch-shift 3s infinite steps(2) reverse;
}
@keyframes glitch-shift {
    0%, 92%, 100% { clip-path: inset(0 0 100% 0); }
    93% { clip-path: inset(20% 0 50% 0); }
    95% { clip-path: inset(60% 0 20% 0); }
    97% { clip-path: inset(5% 0 75% 0); }
}

.hero-subtitle {
    font-size: clamp(16px, 2.4vw, 21px);
    color: var(--muted);
    margin-bottom: 22px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.sub-pre { color: var(--green); font-size: 0.9em; }
.type-wrap { display: inline-flex; align-items: baseline; }
.typed { color: var(--purple); font-weight: 500; }
.typed-caret {
    color: var(--cyan);
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 34px;
    font-size: 15px;
}

.hero-ctas { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s;
    border: 1px solid transparent;
}
.btn-icon {
    font-size: 16px;
    line-height: 1;
}
img.btn-icon {
    width: 16px;
    aspect-ratio: 1 / 1;
}
.btn-primary {
    background: var(--grad);
    color: #0a0a18;
    box-shadow: 0 4px 30px rgba(167, 139, 250, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 40px rgba(232, 121, 249, 0.5); }
.btn-ghost {
    border-color: var(--border-bright);
    color: var(--text);
    background: var(--surface);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); transform: translateY(-3px); }
.btn-icon-only {
    padding: 13px 15px;
    border-color: var(--border-bright);
    background: var(--surface);
    color: var(--purple);
    font-size: 16px;
}
.btn-icon-only:hover { border-color: var(--magenta); box-shadow: var(--glow-purple); transform: translateY(-3px); color: var(--magenta); }

.hero-stats { display: flex; gap: 44px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { color: var(--dim); font-size: 12px; letter-spacing: 1px; text-transform: lowercase; }

/* --- Mascot --- */
.hero-mascot { display: flex; justify-content: center; position: relative; }
.monitor {
    width: 280px;
    position: relative;
}
.monitor-face {
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--border-bright);
    border-radius: 18px;
    padding: 46px 34px 30px;
    aspect-ratio: 6 / 5;
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
.monitor-stand {
    margin: 0;
    width: 110px;
    height: 22px;
    background: var(--surface-2);
    border: 1px solid var(--border-bright);
    border-radius: 14px 14px 0 0;
    position: absolute;
    border-top: none;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
}
.monitor-stand::after {
    content: "";
    position: absolute;
    transform: translateX(-50%);
    border-radius: 0 0 10px 10px;
    background: var(--surface-2);
    top: -14px;
    width: 120px;
    height: 14px;
    left: 50%;
}
.monitor-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(34, 211, 238, 0.06) 50%);
    background-size: 100% 4px;
    animation: scan-move 4s linear infinite;
    pointer-events: none;
}
@keyframes scan-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

.mascot-eyes {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}
.eye {
    width: 26px;
    height: 34px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 18px var(--cyan), inset 0 0 6px rgba(0, 0, 0, 0.6);
    animation: eye-blink 5s infinite;
    position: relative;
    transform-origin: center;
}
@keyframes eye-blink {
    0%, 90%, 100% { transform: scaleY(1); }
    93% { transform: scaleY(0.1); }
    96% { transform: scaleY(1); }
}
.mascot-mouth {
    width: 30px;
    height: 8px;
    margin: 26px auto 0;
    border: 2px solid var(--green);
    border-radius: 0 0 20px 20px;
    border-top: none;
}
.mascot-cpu {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    font-size: 9px;
    color: var(--dim);
    font-weight: 700;
    letter-spacing: 2px;
    gap: 2px;
}
.mascot-cpu span { animation: cpu-pulse 2.4s infinite; }
.mascot-cpu span:nth-child(2) { animation-delay: 0.8s; }
.mascot-cpu span:nth-child(3) { animation-delay: 1.6s; }
@keyframes cpu-pulse { 50% { color: var(--green); text-shadow: 0 0 6px var(--green); } }

.monitor-face::before {
    content: "";
    position: absolute;
    top: -70%;
    left: -70%;
    width: 60%;
    height: 150%;
    background: linear-gradient(transparent, rgba(34, 211, 238, 0.25));
    transform: rotate(25deg);
    animation: monitor-glare 6s ease-in-out infinite;
}
@keyframes monitor-glare {
    0%, 55% { transform: rotate(25deg) translateX(0); }
    70%, 100% { transform: rotate(25deg) translateX(350%); }
}

.mascot-tooltip {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-2);
    border: 1px solid var(--border-bright);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--green);
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: float-tip 3s ease-in-out infinite;
}
.mascot-tooltip::before {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(225deg);
    width: 10px;
    height: 10px;
    background: var(--surface-2);
    border-left: 1px solid var(--border-bright);
    border-top: 1px solid var(--border-bright);
}
@keyframes float-tip {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}
.mascot-tooltip.typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 12px;
    background: var(--green);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 0.8s steps(1) infinite;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.hero-scroll:hover { color: var(--cyan); }
.scroll-line {
    width: 1.5px;
    height: 42px;
    background: var(--border-bright);
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: "";
    position: absolute;
    top: -40%;
    left: 0;
    width: 100%;
    height: 40%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: scroll-line 2s infinite;
}
@keyframes scroll-line { to { top: 110%; } }

/* ============================================================
   TERMINAL
   ============================================================ */
/* .terminal-section { padding-top: 60px; } */

.terminal-window {
    max-width: 860px;
    margin: 0 auto;
    background: rgba(8, 10, 22, 0.92);
    border: 1px solid var(--border-bright);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(34, 211, 238, 0.08);
    backdrop-filter: blur(10px);
}
.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}
.titlebar-dots { display: flex; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title { flex: 1; text-align: center; letter-spacing: 1px; }
.terminal-clock { font-size: 11px; color: var(--dim); letter-spacing: 2px; }

.terminal-body {
    padding: 18px 20px;
    font-size: 13.5px;
    line-height: 1.65;
    height: 330px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-bright) transparent;
}
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

.term-line { margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.term-line.out { color: var(--text); }
.term-line.dim { color: var(--dim); }
.term-line.ok { color: var(--green); }
.term-line.warn { color: var(--amber); }
.term-line.err { color: var(--red); }
.term-line.cmd-line { color: var(--text); }
.term-line .cmd-prompt { color: var(--green); }
.term-line .cmd-input { color: var(--text); }
.term-line .accent { color: var(--purple); }
.term-line .cyan { color: var(--cyan); }
.term-line table { border-collapse: collapse; margin: 4px 0; }
.term-line td { padding: 1px 18px 1px 0; }
.term-line .td-key { color: var(--muted); }

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border);
    background: rgba(8, 10, 22, 0.6);
}
.prompt {
    padding: 14px 0 14px 20px;
    color: var(--green);
    white-space: nowrap;
}
.terminal-input {
    padding: 14px 20px 14px 0;
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13.5px;
    caret-color: var(--cyan);
}

.terminal-hints {
    max-width: 860px;
    margin: 14px auto 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--dim);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 44px;
}
.chip {
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12.5px;
    transition: all 0.25s;
}
.chip:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.chip.active {
    background: var(--grad);
    color: #0a0a18;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.35);
}
.chip .chip-count { opacity: 0.7; font-size: 11px; margin-left: 4px; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 28px;
}

.project-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease-out, border-color 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
    will-change: transform;
}
.project-card:hover {
    border-color: var(--border-bright);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(34, 211, 238, 0.12);
}
.project-card.reveal.visible {
    transition: transform 0.2s ease-out, border-color 0.3s, box-shadow 0.3s;
}
.project-card.fade-out {
    opacity: 0;
    transform: scale(0.9) !important;
    transition: opacity 0.25s, transform 0.25s !important;
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    transform: translateZ(40px);
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .card-media img { transform: scale(1.08); }
.card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(5, 6, 15, 0.95));
}
.card-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(34, 211, 238, 0.07) 50%);
    background-size: 100% 4px;
    z-index: 1;
    pointer-events: none;
}
.card-scan-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--cyan);
    background: rgba(5, 6, 15, 0.7);
    border: 1px solid rgba(34, 211, 238, 0.35);
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}
.card-arrow {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a18;
    font-size: 18px;
    transform: rotate(-45deg);
    transition: transform 0.35s, box-shadow 0.35s;
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.4);
}
.project-card:hover .card-arrow { transform: rotate(0deg); box-shadow: 0 6px 26px rgba(232, 121, 249, 0.55); }

.card-body { padding: 20px 22px 24px; transform: translateZ(25px); }
.card-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-index { font-size: 11px; color: var(--dim); letter-spacing: 1px; }
.card-live { font-size: 11px; color: var(--green); }
.card-live::before { content: "● "; text-shadow: 0 0 8px var(--green); }
.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--font-display);
    letter-spacing: -0.3px;
}
.card-title a {
    color: var(--text);
}
.card-title a:hover {
    color: var(--cyan);
}
.card-desc {
    color: var(--muted);
    font-size: 13.5px;
    margin-bottom: 16px;
    min-height: 42px;
}
.card-tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.card-tag {
    font-size: 11px;
    color: var(--purple);
    border: 1px solid rgba(167, 139, 250, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(167, 139, 250, 0.06);
    flex-shrink: 0;
}
.card-links {
    margin-top: 18px;
    display: flex;
    column-gap: 14px;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
}
.card-link {
    font-size: 12.5px;
    color: var(--cyan);
    padding-block: 0.5rem;
}
.card-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.no-projects {
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}
.link-btn {
    background: none;
    border: none;
    color: var(--cyan);
    font-family: var(--font-mono);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   SKILLS
   ============================================================ */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
    margin-bottom: 54px;
    border-block: 1px solid var(--border);
    padding: 16px 0;
}
.marquee-track {
    display: flex;
    gap: 44px;
    width: max-content;
    animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    font-family: var(--font-display);
}
.marquee-item::after { content: "/"; color: var(--purple); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 26px;
}
.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    transition: border-color 0.3s, transform 0.3s;
}
.skill-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-4px);
}
.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.skill-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.5px;
}
.skill-lvl {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.75px;

    b {
        font-weight: bolder;
        font-size: 15px;
    }
}
.skill-bar {
    height: 8px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 100px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    width: 0;
    border-radius: 100px;
    background: var(--grad);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
    transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.skill-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag { font-size: 10.5px; color: var(--muted); border: 1px solid var(--border); padding: 2px 9px; border-radius: 100px; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { max-width: 880px; }
.about-terminal {
    background: var(--surface);
    border: 1px solid var(--border-bright);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.about-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.about-filename { font-size: 12.5px; color: var(--muted); }
.about-filename::before { content: "📄 "; }
.about-badge {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
}
.about-body { padding: 24px 26px; font-size: 14.5px; }
.about-line { margin-bottom: 14px; color: var(--text); }
.about-line .cmd { color: var(--green); margin-right: 4px; }
.about-line .cmd-text { color: var(--text); }
.about-line b { color: var(--cyan); }
.about-line em { color: var(--purple); }
.about-line.dim { color: var(--dim); font-size: 13px; }
.about-line.dim::before { content: "# "; color: var(--green); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section { padding-block: 25dvh !important; }
.contact-inner { text-align: center; }
.contact-big {
    font-family: var(--font-display);
    font-size: clamp(34px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 20px;
}
.contact-caret { color: var(--cyan); animation: blink 1s steps(1) infinite; }
.contact-sub { color: var(--muted); max-width: 500px; margin: 0 auto 34px; font-size: 15px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    background: rgba(5, 6, 15, 0.7);
    z-index: 1;
    position: relative;
}
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--dim);
}
.footer-bracket { color: var(--purple); }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-window {
    position: relative;
    width: min(920px, 100%);
    max-height: 90vh;
    background: var(--bg-2);
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8), 0 0 50px rgba(167, 139, 250, 0.15);
    transform: scale(0.92) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal.open .modal-window { transform: scale(1) translateY(0); }
.modal-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.modal-title { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-close {
    border: none;
    font-size: 24px;
    background: none;
    color: var(--muted);
    transition: color 0.2s, transform 0.2s;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    display: flex;
    height: 32px;
    width: 32px;
}
.modal-close:hover { color: var(--red); transform: scale(1.5); }

.modal-body {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    overflow-y: auto;
}
.modal-gallery { padding: 20px; background: rgba(3, 4, 12, 0.5); }
.gallery-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16 / 10;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    animation: img-fade 0.4s ease;
}
@keyframes img-fade { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-bright);
    background: rgba(5, 6, 15, 0.7);
    color: var(--text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    z-index: 2;
}
.gallery-nav:hover { background: var(--cyan); color: #0a0a18; box-shadow: var(--glow-cyan); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    font-size: 11px;
    color: var(--text);
    background: rgba(5, 6, 15, 0.7);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
}
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 64px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    opacity: 0.55;
    transition: all 0.25s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { opacity: 1; border-color: var(--cyan); box-shadow: 0 0 12px rgba(34, 211, 238, 0.4); }

.modal-details { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tag {
    font-size: 11.5px;
    color: var(--purple);
    border: 1px solid rgba(167, 139, 250, 0.3);
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(167, 139, 250, 0.06);
    transition: all 0.2s;
}
.modal-tag:hover { border-color: var(--cyan); color: var(--cyan); }
.modal-description { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.modal-description p { margin-bottom: 12px; }
.modal-description b, .modal-description strong { color: var(--cyan); font-weight: 600; }
.modal-description em { color: var(--purple); }
.modal-description ul { margin: 8px 0 8px 18px; }
.modal-description li { margin-bottom: 6px; list-style: none; position: relative; }
.modal-description li::before {
    content: "›";
    position: absolute;
    left: -14px;
    color: var(--green);
}
.modal-description a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.modal-description code {
    color: var(--green);
    background: rgba(74, 222, 128, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.modal-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.modal-link {
    padding: 11px 18px;
    border-radius: 9px;
    border: 1px solid var(--border-bright);
    color: var(--cyan);
    font-size: 13px;
    transition: all 0.25s;
}
.modal-link:hover { background: var(--cyan); color: #0a0a18; box-shadow: var(--glow-cyan); }

/* ============================================================
   TOAST / PARTY / MISC
   ============================================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--surface-2);
    border: 1px solid var(--border-bright);
    color: var(--green);
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 13px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

body.party {
    animation: hue-cycle 6s linear infinite;
}
@keyframes hue-cycle { to { filter: hue-rotate(360deg); } }
.party-confetti {
    position: fixed;
    width: 10px;
    height: 14px;
    top: -20px;
    z-index: 2000;
    pointer-events: none;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    to {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0.3;
    }
}

.magnetic { transition: transform 0.2s ease-out; }

.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-mascot { order: -1; margin-bottom: 10px; }
    .hero-ctas, .hero-stats { justify-content: center; }
    .hero-desc { margin-inline: auto; }
    .hero-subtitle { justify-content: center; }
    .hero { padding-top: 140px; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-gallery { order: 2; }
    .modal-details { order: 1; }
    .hero-scroll { display: none; }
}

@media (max-width: 640px) {
    .nav-links {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        background: rgba(5, 6, 15, 0.97);
        backdrop-filter: blur(16px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: 99;
        font-size: 20px;
    }
    .nav-links.open { opacity: 1; visibility: visible; }
    .nav-links a { font-size: 20px; }
    .hamburger { display: flex; z-index: 101; }
    .section { padding: 90px 18px; }
    .terminal-body { height: 280px; }
    .terminal-hints { justify-content: flex-start; }
}
