/* ═══════════════════════════════════════════════════════════════
   Design Tokens & Reset
═══════════════════════════════════════════════════════════════ */
:root {
    --bg: #0a0a0f;
    --bg-card: #111118;
    --bg-elevated: #1a1a26;
    --accent: #00e5ff;
    --accent-dim: #00e5ff30;
    --accent-glow: #00e5ff60;
    --green: #00ff88;
    --yellow: #ffcc00;
    --red: #ff5f57;
    --text: #e0e0e0;
    --text-muted: #888;
    --border: #2a2a38;
    --terminal-bg: #0d0d12;
    --nav-h: 60px;
    --radius: 10px;
    --radius-sm: 6px;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Courier New", monospace;
}

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

html {
    scroll-behavior: smooth;
}

html,
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100%;
}

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

a:hover {
    text-decoration: underline;
}

code,
pre {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 0.15em 0.4em;
}

pre {
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

/* ═══════════════════════════════════════════════════════════════
   Navigation
═══════════════════════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.site-nav {
    max-width: 1100px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.02em;
    text-decoration: none;
}

.nav-logo-prompt {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-link {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-elevated);
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0.9rem;
    right: 0.9rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}

/* ── Hidden on home page ── */
body.page-home .site-header,
body.page-home .site-footer {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   Footer
═══════════════════════════════════════════════════════════════ */
.site-footer {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    margin-top: 6rem;
}

/* ═══════════════════════════════════════════════════════════════
   Page layout helpers
═══════════════════════════════════════════════════════════════ */
#page-main {
    padding: 0;
}

.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

.page-container--narrow {
    max-width: 760px;
}

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-subtitle {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════════════
   Shared Components
═══════════════════════════════════════════════════════════════ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover {
    text-decoration: none;
    opacity: 0.88;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 18px var(--accent-glow);
    opacity: 1;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-dim);
    opacity: 1;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
    opacity: 1;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
}

/* Tags / chips */
.tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-family: var(--font-mono);
}

.chip {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 0.82rem;
    border: 1px solid var(--border);
}

.accent {
    color: var(--accent);
}

/* Alert */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE - Boot Sequence (scoped to body.page-home)
═══════════════════════════════════════════════════════════════ */
body.page-home {
    overflow: hidden;
}

/* Power Screen */
#power-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: var(--bg);
    z-index: 100;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#power-screen.off {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

#power-btn {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

#power-btn svg {
    width: 68px;
    height: 68px;
    stroke: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: filter 0.2s, stroke 0.2s, transform 0.2s;
    z-index: 2;
    position: relative;
}

#power-btn:hover svg {
    filter: drop-shadow(0 0 18px var(--accent)) drop-shadow(0 0 40px var(--accent-glow));
    transform: scale(1.08);
}

#power-btn:active svg {
    transform: scale(0.92);
}

.power-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent-glow);
    animation: ring-pulse 2.4s ease-in-out infinite;
}

@keyframes ring-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.06);
    }
}

#power-btn.pressing svg {
    stroke: #fff;
    filter: drop-shadow(0 0 30px #fff) drop-shadow(0 0 60px var(--accent));
    animation: btn-flash 0.5s ease forwards;
}

@keyframes btn-flash {
    0% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.power-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: hint-blink 2.8s ease-in-out infinite;
}

@keyframes hint-blink {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.9;
    }
}

/* Boot Terminal */
#boot-terminal {
    position: fixed;
    inset: 0;
    background: var(--terminal-bg);
    display: flex;
    flex-direction: column;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    font-family: var(--font-mono);
    font-size: clamp(12px, 1.4vw, 15px);
}

#boot-terminal.visible {
    opacity: 1;
    pointer-events: auto;
}

#boot-terminal.fade-out {
    opacity: 0;
    transition: opacity 0.9s ease;
}

.terminal-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.18) 2px,
            rgba(0, 0, 0, 0.18) 4px);
    pointer-events: none;
    z-index: 5;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #1a1a22;
    border-bottom: 1px solid #2a2a38;
    flex-shrink: 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f57;
}

.dot.yellow {
    background: #febc2e;
}

.dot.green {
    background: #28c840;
}

.terminal-title {
    margin-left: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex: 1;
    text-align: center;
}

#boot-output {
    flex: 1;
    padding: 18px 24px 0;
    overflow: hidden;
    line-height: 1.65;
    position: relative;
    z-index: 2;
}

#boot-output .line {
    opacity: 0;
    transform: translateY(4px);
    animation: line-drop 0.18s ease forwards;
    white-space: pre;
}

@keyframes line-drop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ok {
    color: var(--green);
}

.warn {
    color: var(--yellow);
}

.info {
    color: var(--accent);
}

.dim {
    color: var(--text-muted);
}

#boot-cursor {
    display: inline-block;
    color: var(--accent);
    padding: 0 24px;
    animation: cursor-blink 0.8s step-end infinite;
    position: relative;
    z-index: 2;
}

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

/* ── Portfolio Content (About Me) ── */
#portfolio-content {
    position: fixed;
    inset: 0;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    z-index: 80;
    transition: opacity 1s ease;
    overflow-y: auto;
}

#portfolio-content.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT ME page
═══════════════════════════════════════════════════════════════ */
.about-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    min-height: 100vh;
    padding: 4rem 10vw;
    flex-wrap: wrap;
}

.about-hero-text {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 520px;
}

.about-hello {
    color: var(--text-muted);
    font-size: 1rem;
    font-family: var(--font-mono);
    margin-bottom: 0.4rem;
}

.about-name {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1rem;
    animation: hero-in 0.9s ease 0.1s both;
}

.about-tagline {
    color: var(--text-muted);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    animation: hero-in 0.9s ease 0.25s both;
}

@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: hero-in 0.9s ease 0.4s both;
}

/* ── Hero detail blocks ── */
.hero-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    animation: hero-in 0.9s ease 0.55s both;
}

.hero-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-status-sep {
    color: var(--text-muted);
    opacity: 0.5;
    font-size: 0.75rem;
}

.hero-status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.hero-terminal {
    margin-top: 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    animation: hero-in 0.9s ease 0.65s both;
    max-width: 400px;
}

.hero-prompt {
    color: var(--accent);
    opacity: 0.7;
}

.hero-cmd {
    color: var(--text);
}

.hero-cmd-output {
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-size: 0.75rem;
    opacity: 0.75;
}

.hero-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.4rem;
    animation: hero-in 0.9s ease 0.75s both;
}

.hero-stack-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    border: 1px solid var(--accent-glow);
    border-radius: 3px;
    padding: 0.18rem 0.55rem;
    opacity: 0.55;
    letter-spacing: 0.06em;
}


/* Avatar badge */
.about-hero-badge {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    animation: hero-in 0.9s ease 0.3s both;
}

.badge-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--accent-glow);
    animation: ring-pulse 3s ease-in-out infinite;
}

.badge-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.badge-photo-clip {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-glow);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.badge-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transform: scale(1.8) translateY(-20%);
    transform-origin: center top;
}

/* About sections - layout now controlled by .home-section */


.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-group-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Currently building */
.about-building {
    padding-bottom: 5rem;
}

/* Extra breathing room when inside a home-section */
.home-section .about-building {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.building-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    color: var(--text-muted);
}

.building-dot {
    margin-top: 0.55rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: ring-pulse 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS page
═══════════════════════════════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
    border-color: var(--accent-glow);
    box-shadow: 0 0 24px var(--accent-dim);
    transform: translateY(-3px);
}

.project-card-body {
    padding: 1.5rem 1.5rem 1rem;
    flex: 1;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.project-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.project-card-summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.project-card-footer {
    padding: 1rem 1.5rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT DETAIL page
═══════════════════════════════════════════════════════════════ */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text);
    text-decoration: none;
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.post-meta time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.post-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 0.85rem;
}

.post-summary {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 60ch;
    margin-bottom: 1.25rem;
}

.github-header-btn {
    margin-top: 0.25rem;
}

.post-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Rendered write-up body */
.post-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.post-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}

.post-body p {
    margin-bottom: 1rem;
}

.post-body ul,
.post-body ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.post-body li {
    margin-bottom: 0.35rem;
}

.post-body pre {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.post-footer {
    margin-top: 3rem;
}

/* ═══════════════════════════════════════════════════════════════
   HACK ME page
═══════════════════════════════════════════════════════════════ */
/* CTF Scoreboard strip */
#ctf-scoreboard {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.ctf-score-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.ctf-score-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ctf-score-value,
.ctf-solved-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.ctf-score-sep {
    color: var(--border);
    font-size: 1.2rem;
}

.ctf-reset-btn {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.ctf-reset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Secret flag reveal box */
#ctf-secret-flag {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-glow);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.12);
    border-radius: var(--radius);
    padding: 1rem 1.4rem;
    margin-bottom: 2rem;
    animation: hero-in 0.5s ease both;
}

.ctf-secret-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.ctf-secret-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.ctf-secret-flag-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 0.04em;
    user-select: all;
}

.ctf-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.challenge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.challenge-card:hover {
    border-color: var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.challenge-card.challenge-solved {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.12);
}

.challenge-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.challenge-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
}

.badge--category {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge--easy {
    background: rgba(0, 255, 136, 0.15);
    color: var(--green);
}

.badge--medium {
    background: rgba(255, 204, 0, 0.15);
    color: var(--yellow);
}

.badge--hard {
    background: rgba(255, 95, 87, 0.15);
    color: var(--red);
}

.challenge-points {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 700;
}

.challenge-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.challenge-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Hint */
.hint-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hint-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    width: fit-content;
    transition: color 0.2s, border-color 0.2s;
}

.hint-toggle:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-elevated);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--yellow);
    flex-shrink: 0;
}

.hint-body {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hint-body[hidden] {
    display: none;
}

.hint-count-badge {
    margin-left: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 0.1rem 0.45rem;
    color: var(--yellow);
    line-height: 1.4;
}

.hint-item {
    margin: 0;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.hint-num {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.hint-item code {
    display: inline;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.05em 0.35em;
    white-space: nowrap;
}

.hint-toggle:disabled {
    opacity: 0.45;
    cursor: default;
}

/* Flag form */
.challenge-start-btn {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.flag-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
}

.flag-input-wrap {
    display: flex;
    gap: 0.5rem;
}

.flag-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.flag-input:focus {
    border-color: var(--accent);
}

.flag-feedback {
    font-size: 0.82rem;
    font-family: var(--font-mono);
    min-height: 1.2em;
    animation: flag-pop 0.3s ease;
}

@keyframes flag-pop {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.flag-correct {
    color: var(--green);
}

.flag-wrong {
    color: var(--red);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════════ */

/* ── Canvas particle background ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* Ensure page content sits above canvas */
.site-header,
.site-footer,
#page-main {
    position: relative;
    z-index: 1;
}

/* ── Page entrance ── */
.page-container {
    animation: page-fade-in 0.55s ease both;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    transition-delay: calc(var(--stagger-i, 0) * 90ms);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

/* ── Card stagger entrance (non-scroll, load-time) ── */
.card-animate {
    animation: card-in 0.5s ease both;
    animation-delay: calc(var(--stagger-i, 0) * 90ms);
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Floating avatar ── */
.about-hero-badge {
    animation: hero-in 0.9s ease 0.3s both, float 4s ease-in-out 1.5s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ── Accent heading shimmer ── */
.section-title {
    background: linear-gradient(90deg, var(--accent), #80ffea, var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    from {
        background-position: 0% center;
    }

    to {
        background-position: 200% center;
    }
}

/* ── Page-title glow pulse ── */
.page-title {
    animation: title-in 0.6s ease both;
}

@keyframes title-in {
    from {
        opacity: 0;
        letter-spacing: 0.08em;
    }

    to {
        opacity: 1;
    }
}

/* ── Typing cursor ── */
.typing-text::after {
    content: '|';
    color: var(--accent);
    animation: cursor-blink 0.75s step-end infinite;
    margin-left: 2px;
}

/* ── Wrong flag shake ── */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-7px);
    }

    30% {
        transform: translateX(7px);
    }

    45% {
        transform: translateX(-5px);
    }

    60% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-3px);
    }

    90% {
        transform: translateX(3px);
    }
}

.shake {
    animation: shake 0.45s ease;
}

/* ── Challenge card solved border animation ── */
.challenge-card.challenge-solved {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.12);
    animation: solved-pulse 0.6s ease;
}

@keyframes solved-pulse {
    0% {
        box-shadow: 0 0 0 rgba(0, 255, 136, 0);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.35);
    }

    100% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.12);
    }
}

/* ── Nav link hover underline slide ── */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0.9rem;
    right: 0.9rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover::before {
    transform: scaleX(1);
}

.nav-link.active::before {
    transform: scaleX(1);
}

/* Remove the old active::after in favour of ::before */
.nav-link.active::after {
    display: none;
}

/* ── Chip hover ── */
.chip {
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent-glow);
}

/* ── Project / challenge card enhanced hover ── */
.project-card,
.challenge-card {
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--accent-glow);
    box-shadow: 0 8px 32px rgba(0, 229, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   3D HERO CUBE
═══════════════════════════════════════════════════════════════ */

/* Static cube - flex child between hero text and badge */
.hero-cube-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 200px;
    perspective: 520px;
    perspective-origin: 50% 50%;
    position: relative;
    animation: hero-in 0.9s ease 0.35s both;
}

/* Both cubes share the same face layout */
.hero-cube {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 140px;
    height: 140px;
    transform-style: preserve-3d;
    animation: cube-spin 9s linear infinite;
}

/* Inner cube: smaller + spins the other way */
.hero-cube--inner {
    width: 70px;
    height: 70px;
    animation: cube-spin-reverse 6s linear infinite;
}

@keyframes cube-spin {
    from {
        transform: rotateX(22deg) rotateY(0deg) rotateZ(8deg);
    }

    to {
        transform: rotateX(22deg) rotateY(360deg) rotateZ(8deg);
    }
}

@keyframes cube-spin-reverse {
    from {
        transform: rotateX(-18deg) rotateY(0deg) rotateZ(-6deg);
    }

    to {
        transform: rotateX(-18deg) rotateY(-360deg) rotateZ(-6deg);
    }
}

/* Shared face styles */
.hc-face {
    position: absolute;
    border: 1.5px solid var(--accent);
    background: rgba(0, 229, 255, 0.04);
    box-shadow: inset 0 0 12px rgba(0, 229, 255, 0.08),
        0 0 6px rgba(0, 229, 255, 0.18);
}

/* Outer cube faces (140 × 140, half = 70) */
.hero-cube:not(.hero-cube--inner) .hc-face {
    width: 140px;
    height: 140px;
}

.hero-cube:not(.hero-cube--inner) .hc-front {
    transform: translateZ(70px);
}

.hero-cube:not(.hero-cube--inner) .hc-back {
    transform: rotateY(180deg) translateZ(70px);
}

.hero-cube:not(.hero-cube--inner) .hc-left {
    transform: rotateY(-90deg) translateZ(70px);
}

.hero-cube:not(.hero-cube--inner) .hc-right {
    transform: rotateY(90deg) translateZ(70px);
}

.hero-cube:not(.hero-cube--inner) .hc-top {
    transform: rotateX(90deg) translateZ(70px);
}

.hero-cube:not(.hero-cube--inner) .hc-bottom {
    transform: rotateX(-90deg) translateZ(70px);
}

/* Inner cube faces (70 × 70, half = 35) */
.hero-cube--inner .hc-face {
    width: 70px;
    height: 70px;
    border-color: rgba(0, 229, 255, 0.55);
    box-shadow: inset 0 0 8px rgba(0, 229, 255, 0.12),
        0 0 4px rgba(0, 229, 255, 0.3);
}

.hero-cube--inner .hc-front {
    transform: translateZ(35px);
}

.hero-cube--inner .hc-back {
    transform: rotateY(180deg) translateZ(35px);
}

.hero-cube--inner .hc-left {
    transform: rotateY(-90deg) translateZ(35px);
}

.hero-cube--inner .hc-right {
    transform: rotateY(90deg) translateZ(35px);
}

.hero-cube--inner .hc-top {
    transform: rotateX(90deg) translateZ(35px);
}

.hero-cube--inner .hc-bottom {
    transform: rotateX(-90deg) translateZ(35px);
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE SECTIONS
═══════════════════════════════════════════════════════════════ */

/* Section container - centred at max 1100px so borders + decorations stay contained */
.home-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 5rem 3rem;
    border-top: 1px solid var(--border);
    position: relative;
}

/* Decorative vertical lines sit just inside the section's own left/right edges */
.home-section::before,
.home-section::after {
    content: "";
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent 0%,
            var(--accent-glow) 30%,
            var(--accent-glow) 70%,
            transparent 100%);
    opacity: 0.2;
    pointer-events: none;
}

.home-section::before {
    left: 1.2rem;
}

.home-section::after {
    right: 1.2rem;
}

.section-inner {
    width: 100%;
    box-sizing: border-box;
}

/* ── Scroll indicator ── */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: hero-in 1s ease 1.5s both;
}

.scroll-label {
    opacity: 0.5;
}

.scroll-arrow {
    width: 1.5px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--accent));
    animation: scroll-arrow-pulse 1.6s ease-in-out infinite;
}

@keyframes scroll-arrow-pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scaleY(0.6);
        transform-origin: top;
    }

    50% {
        opacity: 0.9;
        transform: scaleY(1);
        transform-origin: top;
    }
}


/* ── About section stacked layout ── */
.about-bio {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    max-width: 72ch;
    /* comfortable reading width, adapts to container */
}

/* Stats: 4 cards in a horizontal row */
.about-stats-row {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 2.4rem;
}

.about-stats-row .stat-card {
    flex: 1 1 130px;
    /* grow/shrink but minimum 130px */
}

/* ── Stat cards ── */

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    border-color: var(--accent-glow);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.08);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Contact section ── */
.section-contact-inner {
    text-align: center;
    max-width: 1000px;
    /* wider than default to let cards sit in a row */
}

.contact-blurb {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.8rem 2.2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    min-width: 160px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.contact-card:hover {
    border-color: var(--accent-glow);
    box-shadow: 0 8px 32px rgba(0, 229, 255, 0.12);
    transform: translateY(-4px);
    color: var(--accent);
}

.contact-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.contact-label {
    font-weight: 600;
    font-size: 1rem;
}

.contact-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   DECORATIVE SIDE MARGIN ELEMENTS
═══════════════════════════════════════════════════════════════ */

/* Glowing dot on left side line at section midpoint */
.home-section [data-side-dot]::before {
    display: none;
    /* slot for optional JS-driven dot, reserved */
}

/* Each section gets a faint vertical label on the left margin */
#section-about::before {
    content: "◈  about";
}

#section-skills::before {
    content: "◈  skills";
}

#section-contact::before {
    content: "◈  contact";
}

.home-section[id]::before {
    /* override the plain line with a labelled version */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    opacity: 0.25;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    width: auto;
    background: none;
    left: -2.2rem;
    /* push into the left margin, away from content */
}

/* Right side: keep the gradient line + add small diamond markers at top/bottom */
.home-section::after {
    right: 2vw;
    top: 3rem;
    bottom: 3rem;
}

/* Diamond sparkle markers on right side at section boundaries */
.home-section[id]::after {
    content: "◆";
    /* Override line with a diamond */
    background: none;
    width: auto;
    height: auto;
    top: 3.2rem;
    right: 2vw;
    font-size: 0.55rem;
    color: var(--accent);
    opacity: 0.3;
    display: flex;
    align-items: flex-start;
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   CHALLENGE PAGES  (shared + sqli-101)
═══════════════════════════════════════════════════════════════ */
.challenge-page-wrap {
    max-width: 700px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.challenge-header {
    margin-bottom: 2.5rem;
}

.challenge-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1.2rem;
    transition: color 0.2s;
}

.challenge-back:hover {
    color: var(--accent);
}

.challenge-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.challenge-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.challenge-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* SQLi terminal wrapper */
.sqli-terminal-wrap {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.sqli-terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.sqli-terminal-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

.sqli-login-body {
    padding: 1.8rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sqli-prompt-line {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.sqli-error {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
    margin: 0;
}

.sqli-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.sqli-field {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sqli-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    min-width: 90px;
    flex-shrink: 0;
}

.sqli-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 0.45rem 0.75rem;
    outline: none;
    transition: border-color 0.2s;
}

.sqli-input:focus {
    border-color: var(--accent-glow);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.08);
}

.sqli-submit {
    align-self: flex-start;
    margin-top: 0.4rem;
}

.sqli-hint-note {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin: 0;
}

/* Success state */
.sqli-success {
    border-color: rgba(34, 197, 94, 0.3);
}

.sqli-ok {
    color: #22c55e;
    font-weight: 600;
}

.sqli-flag-reveal {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin-top: 0.5rem;
}

.sqli-flag-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.sqli-flag-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #22c55e;
    letter-spacing: 0.04em;
    user-select: all;
    word-break: break-all;
}

/* DB dump table */
.sqli-dump-wrap {
    margin-top: 0.5rem;
}

.sqli-dump-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

.sqli-dump-table th {
    text-align: left;
    padding: 0.4rem 0.7rem;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}

.sqli-dump-table td {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    word-break: break-all;
}

.sqli-dump-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
}

/* ── Secret dev notes page ── */
.secret-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.secret-note {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 1.2rem 1.4rem;
}

.secret-note-author {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    margin-bottom: 0.6rem;
    opacity: 0.75;
}

.secret-note p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.secret-note code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.05em 0.35em;
}

.secret-flag {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 6px;
    padding: 0.8rem 1.2rem;
    user-select: all;
    word-break: break-all;
}

/* ── Project detail body (rendered markdown) ── */
.post-body {
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.95rem;
}

.post-body h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

.post-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.5rem;
}

.post-body p {
    margin: 0 0 1rem;
}

.post-body ul,
.post-body ol {
    margin: 0 0 1rem 1.4rem;
    padding: 0;
}

.post-body li {
    margin-bottom: 0.3rem;
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.05em 0.35em;
}

.post-body pre {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.post-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
}

/* Tables */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.post-body th {
    text-align: left;
    color: var(--text);
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.post-body td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.post-body tr:last-child td {
    border-bottom: none;
}

.post-body tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ── Projects empty state ── */
.projects-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.projects-empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.projects-empty-sub {
    font-size: 0.9rem;
    opacity: 0.6;
}