/* ============================================
   Design Tokens
   ============================================ */
:root {
    /* Surface */
    --surface-primary: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-tertiary: #f1f5f9;
    --surface-elevated: #ffffff;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* Brand */
    --brand-400: #60a5fa;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;

    /* Accent */
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;
    --purple-50: #f5f3ff;
    --purple-100: #ede9fe;

    /* Semantic */
    --success-500: #10b981;
    --success-600: #059669;
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --rose-50: #fff1f2;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-50: #f0fdfa;

    /* Border */
    --border-default: #e2e8f0;
    --border-subtle: #f1f5f9;

    /* Shadow */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--surface-secondary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Ambient Background
   ============================================ */
.bg-ambient {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-ambient::before,
.bg-ambient::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
}

.bg-ambient::before {
    width: 640px;
    height: 640px;
    background: rgba(59, 130, 246, 0.1);
    top: -240px;
    right: -120px;
}

.bg-ambient::after {
    width: 520px;
    height: 520px;
    background: rgba(139, 92, 246, 0.07);
    bottom: -180px;
    left: -100px;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-20) var(--space-6) var(--space-16);
    position: relative;
    z-index: 1;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    display: flex;
    align-items: flex-start;
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}

.avatar-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.avatar-image-wrap {
    position: relative;
    width: 150px;
    height: 150px;
}

.avatar-links {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.avatar-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--duration-fast);
}
.avatar-link svg { width: 13px; height: 13px; }
.avatar-link:hover { color: var(--brand-600); }

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--brand-500), var(--purple-500), var(--brand-400), var(--purple-600), var(--brand-500));
    animation: rotate-ring 4s linear infinite;
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
}

@keyframes rotate-ring {
    to { transform: rotate(360deg); }
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    background: var(--surface-tertiary);
    border: 3px solid var(--surface-primary);
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--success-500);
    border: 3px solid var(--surface-primary);
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

@keyframes pulse-status {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
    50% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
}

.status-dot {
    animation: pulse-status 2.5s ease-in-out infinite;
}

.hero-content {
    flex: 1;
    min-width: 0;
    padding-top: var(--space-1);
}

.hero-name {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: var(--space-1);
}

.hero-tagline {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--brand-600);
    margin-bottom: var(--space-3);
    letter-spacing: -0.01em;
}

.hero-bio {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: var(--space-4);
}

.bio-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.bio-list li {
    position: relative;
    padding-left: var(--space-4);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.bio-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-400);
}

.bio-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Info Row */
.hero-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin-bottom: var(--space-4);
}

.hero-info-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.hero-info-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.hero-info-divider {
    width: 1px;
    height: 14px;
    background: var(--border-default);
    align-self: center;
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.social-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.social-link:hover {
    color: var(--brand-600);
    border-color: var(--brand-500);
    background: var(--brand-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.section-title-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-title-icon svg {
    width: 18px;
    height: 18px;
}

.section-title-text {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.section-title-line {
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

/* ============================================
   Tech Stack — Categorized Cards (2×2)
   ============================================ */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.tech-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.tech-card--blue::before  { background: linear-gradient(90deg, var(--brand-500), var(--brand-400)); }
.tech-card--green::before { background: linear-gradient(90deg, var(--success-500), #34d399); }
.tech-card--purple::before { background: linear-gradient(90deg, var(--purple-500), #a78bfa); }
.tech-card--amber::before { background: linear-gradient(90deg, var(--amber-500), #fbbf24); }
.tech-card--rose::before  { background: linear-gradient(90deg, var(--rose-500), #fb7185); }
.tech-card--teal::before  { background: linear-gradient(90deg, var(--teal-500), #2dd4bf); }

.tech-card:hover {
    border-color: var(--brand-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tech-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    margin-top: 0;
}

.tech-card-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tech-card-icon svg {
    width: 14px;
    height: 14px;
}

.tc-icon-blue   { background: var(--brand-50);  color: var(--brand-600); }
.tc-icon-green  { background: var(--success-50); color: var(--success-600); }
.tc-icon-purple { background: var(--purple-50);  color: var(--purple-600); }
.tc-icon-amber  { background: var(--amber-50);  color: var(--amber-600); }
.tc-icon-rose   { background: var(--rose-50);   color: var(--rose-600); }
.tc-icon-teal   { background: var(--teal-50);   color: var(--teal-600); }

.tech-card-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tech-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    background: var(--surface-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    transition: all var(--duration-fast) var(--ease-out);
}

.tech-tag:hover {
    border-color: var(--brand-400);
    background: var(--brand-50);
    color: var(--brand-600);
}

/* ============================================
   Project Cards
   ============================================ */
.projects-section {
    margin-bottom: var(--space-12);
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-3);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--brand-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.project-card:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
}

.project-card-top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.project-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-icon-box svg {
    width: 22px;
    height: 22px;
}

.pi-purple { background: var(--purple-50);  color: var(--purple-600); }
.pi-green  { background: var(--success-50); color: var(--success-600); }
.pi-blue   { background: var(--brand-50);   color: var(--brand-600); }
.pi-amber  { background: var(--amber-50);   color: var(--amber-600); }
.pi-rose   { background: var(--rose-50);    color: var(--rose-600); }

.project-card-body {
    flex: 1;
    min-width: 0;
}

.project-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-1);
}

.project-title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--brand-600);
    font-family: var(--font-mono);
    background: var(--brand-50);
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    transition: all var(--duration-fast) var(--ease-out);
}

.project-link svg {
    width: 13px;
    height: 13px;
}

.project-card:hover .project-link {
    background: var(--brand-100);
}

/* Status Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge--live {
    color: var(--success-600);
    background: var(--success-50);
    border: 1px solid var(--success-100);
}

.badge--live .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-500);
    animation: blink-dot 2s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.badge--wip {
    color: var(--amber-600);
    background: var(--amber-50);
    border: 1px solid var(--amber-100);
}

.badge--oss {
    color: var(--purple-600);
    background: var(--purple-50);
    border: 1px solid var(--purple-100);
}

.badge--released {
    color: var(--brand-600);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
}

/* External arrow */
.project-card-arrow {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    color: var(--text-tertiary);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-out);
}

.project-card-arrow svg {
    width: 18px;
    height: 18px;
}

.project-card:hover .project-card-arrow {
    opacity: 1;
    color: var(--brand-500);
    transform: translate(3px, -3px);
}

/* Sub-feature pills inside project card */
.project-features {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.project-feature-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    transition: all var(--duration-fast) var(--ease-out);
    cursor: pointer;
    text-decoration: none;
}

.project-feature-pill svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.project-feature-pill:hover {
    border-color: var(--brand-400);
    background: var(--brand-50);
    color: var(--brand-600);
}

.project-feature-title {
    font-weight: 600;
    font-size: 0.8125rem;
}

.project-feature-desc {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.project-feature-sep {
    color: var(--text-tertiary);
    opacity: 0.4;
    margin: 0 2px;
}

/* Feature grid for the first project */
.features-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.feature-tile {
    text-align: center;
    padding: var(--space-4) var(--space-3);
    background: var(--surface-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature-tile:hover {
    border-color: var(--brand-500);
    background: var(--brand-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}

.feature-tile-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto var(--space-2);
    color: var(--brand-600);
}

.feature-tile-icon svg {
    width: 100%;
    height: 100%;
}

.feature-tile-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feature-tile-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ============================================
   Stats Row
   ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.stat-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--duration-fast) var(--ease-out);
}

.stat-card:hover {
    border-color: var(--brand-500);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 14px;
    height: 14px;
}

.si-blue   { background: var(--brand-50);  color: var(--brand-600); }
.si-green  { background: var(--success-50); color: var(--success-600); }
.si-purple { background: var(--purple-50);  color: var(--purple-600); }

.stat-body {
    min-width: 0;
}

.stat-value {
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.15;
}

.stat-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-default);
    margin-top: var(--space-4);
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.footer-text strong {
    font-weight: 700;
    color: var(--brand-600);
}

.footer-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-tertiary);
    opacity: 0.4;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .container {
        padding: var(--space-10) var(--space-4) var(--space-12);
    }

    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-bio {
        max-width: 100%;
    }

    .social-links {
        justify-content: center;
    }

    .hero-name {
        font-size: 1.5rem;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: var(--space-4);
    }

    .project-card-arrow {
        display: none;
    }

    .features-grid-3 {
        grid-template-columns: 1fr;
    }

    .project-features {
        flex-direction: column;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Project Detail Page
   ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    margin-bottom: var(--space-6);
    transition: all var(--duration-fast) var(--ease-out);
}
.back-link svg { width: 14px; height: 14px; }
.back-link:hover {
    color: var(--brand-600);
    border-color: var(--brand-500);
    background: var(--brand-50);
}

.detail-header {
    margin-bottom: var(--space-6);
}
.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}
.detail-badge-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}
.detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}
.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}
.detail-link--primary {
    color: #fff;
    background: var(--brand-500);
    border: 1px solid var(--brand-500);
}
.detail-link--primary:hover {
    background: var(--brand-600);
    border-color: var(--brand-600);
}
.detail-link--secondary {
    color: var(--text-secondary);
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
}
.detail-link--secondary:hover {
    color: var(--brand-600);
    border-color: var(--brand-500);
    background: var(--brand-50);
}
.detail-link svg { width: 16px; height: 16px; }

/* Description Block */
.detail-desc {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-6);
}
.detail-desc h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}
.detail-desc p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.detail-tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: var(--space-3);
}
.detail-points {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.detail-points li {
    position: relative;
    padding-left: var(--space-5);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
}
.detail-points li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0.6em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-400);
}

.detail-tech-tag {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    background: var(--surface-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* Screenshot Gallery */
.screenshot-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}
.screenshot-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}
.screenshot-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}
.screenshot-card:hover {
    border-color: var(--brand-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.screenshot-card img {
    width: 100%;
    height: auto;
    display: block;
}
.screenshot-placeholder {
    aspect-ratio: 16/10;
    background: var(--surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}
.screenshot-label {
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
}

@media (max-width: 640px) {
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
    .detail-title {
        font-size: 1.25rem;
    }
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lb-fade-in 0.2s ease-out;
}
@keyframes lb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: lb-zoom-in 0.25s var(--ease-out);
}
@keyframes lb-zoom-in {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ============================================
   Sidebar Navigation
   ============================================ */
.sidebar {
    position: fixed;
    left: max(calc((100vw - 800px) / 2 - 180px), 12px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.sidebar-link:hover {
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.04);
}

.sidebar-link.active {
    color: var(--brand-600);
    font-weight: 600;
    border-left-color: var(--brand-500);
    background: rgba(59, 130, 246, 0.06);
}

@media (max-width: 1200px) {
    .sidebar { display: none; }
}
