/* ============================================
   Danny Ahn — Portfolio Website Stylesheet v6
   2026 design system: bento grid · dark mode 2.0 · grain
   kinetic type (hero only) · glassmorphism (nav/cards)
   magnetic buttons · custom cursor · scroll-driven anims
   ============================================ */

/* --- CSS Custom Properties (Easy Theming) --- */
:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a12;
    --bg-card: #111119;
    --bg-hover: #1a1a26;

    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #8b5cf6 100%);
    --accent-gradient-reverse: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #3b82f6 100%);

    --border-color: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast), transform 0.15s ease;
}

a:hover {
    color: var(--accent-cyan);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Grain Overlay (Dark Mode 2.0 — organic texture) --- */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--text-primary); /* solid fallback — name always visible */
}

/* Gradient fill only where the browser actually supports it */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    h1 {
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

strong, em {
    color: var(--text-primary);
}

/* --- Layout Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   NAVIGATION (glassmorphism, active states)
   ============================================ */
.nav {
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--accent-cyan);
    -webkit-text-fill-color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

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

.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: all var(--transition-normal);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(5, 5, 8, 0.98);
    z-index: 99;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
    color: var(--accent-cyan);
}

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

/* ============================================
   HERO SECTION (Landing Page)
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

/* Animated gradient blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -4s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -2s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
    100% { transform: translate(10px, -10px) scale(1.02); }
}

/* Vertical Lines */
.vertical-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.vertical-lines span {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.15), transparent);
    animation: lineFade 4s ease-in-out infinite alternate;
}

.vertical-lines span:nth-child(1) { left: 15%; animation-delay: 0s; }
.vertical-lines span:nth-child(2) { left: 35%; animation-delay: -1.5s; }
.vertical-lines span:nth-child(3) { left: 65%; animation-delay: -3s; }
.vertical-lines span:nth-child(4) { left: 85%; animation-delay: -0.75s; }

@keyframes lineFade {
    0% { opacity: 0.2; }
    100% { opacity: 0.6; }
}

/* Grid Pattern */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-left {
    max-width: 600px;
}

/* Terminal-style eyebrow line */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 28px;
}

.hero-eyebrow .terminal-prompt {
    color: #27c93f;
}

.hero-eyebrow .cursor-blink {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--accent-cyan);
    vertical-align: middle;
    animation: blinkCursor 1s step-end infinite;
}

.hero-eyebrow .eyebrow-sep {
    color: var(--text-muted);
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Eyebrow (status pill above hero title) */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 999px;
    margin-bottom: 28px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27c93f;
    box-shadow: 0 0 12px rgba(39, 201, 63, 0.8);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
    margin-bottom: 20px;
    line-height: 1.05;
}

.gradient-text {
    color: var(--accent-cyan); /* solid fallback */
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .gradient-text {
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

.hero-subtitle {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 12px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    color: #ffffff;
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-3px);
}

/* Hero Right - Stats */
.hero-right {
    display: grid;
    gap: 20px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.stat-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator span {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* ============================================
   PARTICLE CANVAS BACKGROUND (hero only)
   ============================================ */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   BENTO GRID (2026 landing layout)
   ============================================ */
.bento-section {
    padding: 80px 0;
    position: relative;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 20px;
    margin-top: 36px;
}

.bento-tile {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color var(--transition-normal),
                box-shadow var(--transition-normal);
    will-change: transform;
}

.bento-tile:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-md);
}

/* Tile spans */
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; }
.tile-full { grid-column: span 4; }

/* Tile content (text block inside a tile) */
.tile-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tile-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
}

.tile-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

.tile-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.tile-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.bento-tile:hover .tile-cta {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

/* Tile graphics (SVG art fills the top of a tile) */
.tile-graphic {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 18px;
    aspect-ratio: 16 / 10;
}

.tile-graphic svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* CTA tile (full-width contact banner) */
.bento-tile.tile-cta .cta-content h3 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .bento-tile.tile-cta .cta-content h3 {
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* Footer links */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

/* Tile accent glow (top edge) */
.bento-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-tile:hover::before {
    transform: scaleX(1);
}

/* Tile icon */
.tile-icon {
    display: block;
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    color: var(--accent-cyan);
}

.bento-tile h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.bento-tile p {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 0;
}

/* Stat tiles inside bento */
.tile-stat .stat-number {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.tile-stat .stat-label {
    font-size: 0.95rem;
}

/* Terminal tile */
.terminal-tile {
    background: #0a0a12;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    display: flex;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.terminal-body {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 2;
    color: var(--text-secondary);
    flex-grow: 1;
}

.term-prompt { color: #27c93f; }
.term-cmd { color: var(--text-primary); }
.term-flag { color: #d19a66; }
.term-output { color: var(--text-muted); }

/* Blinking cursor in terminal */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--accent-cyan);
    vertical-align: middle;
    animation: blinkCursor 1s step-end infinite;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Skill bars inside bento */
.skill-row {
    margin-bottom: 14px;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.skill-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    width: 0;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

/* Animate skill bars when scrolled into view (JS adds .in-view) */
.bento-tile.in-view .skill-fill {
    width: var(--fill-width);
}

/* ============================================
   CUSTOM CURSOR (dot + ring, desktop only)
   ============================================ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(6, 182, 212, 0.4);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-dot.is-active {
    width: 14px;
    height: 14px;
    background: var(--accent-blue);
}

.cursor-ring.is-active {
    width: 56px;
    height: 56px;
    border-color: rgba(59, 130, 246, 0.7);
}

/* Hide the native cursor on fine-pointer devices — the custom dot+ring replaces it */
@media (pointer: fine) {
    body.has-custom-cursor,
    body.has-custom-cursor a,
    body.has-custom-cursor button {
        cursor: none;
    }
}

/* Hide custom cursor on touch devices */
@media (pointer: coarse) {
    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

/* ============================================
   MAGNETIC BUTTONS
   ============================================ */
.magnetic {
    will-change: transform;
}

/* ============================================
   SCROLL-DRIVEN ANIMATIONS (CSS, GPU off-thread)
   Bento tiles fade/slide in as they enter viewport.
   Fallback: if unsupported, tiles are simply visible.
   ============================================ */
@supports (animation-timeline: view()) {
    .bento-grid .bento-tile {
        animation: bentoReveal 1s cubic-bezier(0.22, 1, 0.36, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
    }

    @keyframes bentoReveal {
        from {
            opacity: 0;
            transform: translateY(48px) scale(0.97);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* ============================================
   STAT CARD ICONS
   ============================================ */
.stat-icon {
    display: block;
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    color: var(--accent-cyan);
}

/* ============================================
   BLOG CARD IMAGES
   ============================================ */
.blog-image-container {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.blog-image-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   CONTACT SVG ICONS
   ============================================ */
.contact-icon-svg {
    display: block;
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
    color: var(--accent-blue);
}

/* ============================================
   GSAP LETTER ANIMATION CLASSES
   ============================================ */
.letter {
    display: inline-block;
    will-change: transform, opacity;
}

/* ============================================
   CONTENT SECTIONS (Blog/Video Previews)
   ============================================ */
.content-section {
    padding: 80px 0;
}

.blog-preview-section,
.video-preview-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* ============================================
   BLOG CARDS & GRID
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.blog-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.blog-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 12px;
}

.blog-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
}

.blog-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    transition: all var(--transition-fast);
}

.blog-link:hover {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

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

/* Blog Filters */
.blog-filters,
.video-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #ffffff;
}

/* ============================================
   VIDEO CARDS & GRID
   ============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 36px;
}

.video-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.video-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Click-to-load video thumbnail (replaces the eager iframe) */
.video-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
}

.video-thumb .thumb-play {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

.video-thumb:hover .thumb-play {
    transform: scale(1.12);
    background: rgba(6, 182, 212, 0.15);
}

.video-thumb .thumb-play svg {
    width: 20px;
    height: 20px;
    margin-left: 3px; /* optical centering of the play triangle */
    fill: var(--accent-cyan);
}

/* "More coming" note under blog/video grids (replaces dead pagination) */
.blog-upcoming-note {
    display: block;
    width: fit-content;
    margin: 48px auto 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 16px 24px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

/* ============================================
   REDUCED MOTION — kill decorative animation for users who ask for it
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}

.video-title {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 20px 20px 8px;
    line-height: 1.4;
}

.video-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0 20px 20px;
    margin-bottom: 0;
}

/* ============================================
   ABOUT PAGE SPECIFIC STYLES
   ============================================ */
.about-section {
    padding: 120px 0;
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
    align-items: start;
}

.about-text {
    max-width: 600px;
}

.lead-paragraph {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-normal);
}

.highlight-item:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.highlight-item h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.highlight-item p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.about-visual {
    position: sticky;
    top: 100px;
}

.code-block {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.code-header {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

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

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.code-block pre {
    padding: 24px;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.code-keyword { color: #c678dd; }
.code-string { color: #98c379; }
.code-number { color: #d19a66; }
.code-punct { color: #56b6c2; }

/* Career Story */
.career-story {
    margin-top: 64px;
}

.story-intro {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    padding-left: 24px;
    border-left: 3px solid var(--accent-blue);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-gradient);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

.timeline-item h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.timeline-item p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
}

/* Expertise Grid */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.expertise-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.expertise-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.expertise-card:hover::before {
    transform: scaleX(1);
}

.expertise-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 16px;
}

.expertise-card h4 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.expertise-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.contact-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
    display: block;
}

.contact-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 16px;
}

.contact-card h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.page-link:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.page-link.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #ffffff;
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 36px 0;
    text-align: center;
}

.footer-inner p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ============================================
   ANIMATIONS (Purposeful, Not Decorative)
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animations (via Intersection Observer in JS) */
.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    /* Bento collapses to 2 columns */
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tile-full {
        grid-column: span 2;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-visual {
        position: relative;
        top: auto;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-section {
        min-height: 100vh;
        padding: 60px 0;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }

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

    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* Bento collapses to single column */
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .tile-wide,
    .tile-tall,
    .tile-full {
        grid-column: span 1;
        grid-row: span 1;
    }

    .blog-grid,
    .video-grid,
    .expertise-grid {
        grid-template-columns: 1fr;
    }

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

    .section-container h2 {
        font-size: 1.5rem;
    }

    .content-section,
    .bento-section {
        padding: 60px 0;
    }
}

/* ============================================
   ARTICLE PAGE (role guide / keyword landing)
   ============================================ */
.article-page h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 24px;
}

.article-page .lead-paragraph {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.article-page h2 {
    margin-top: 48px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.article-page p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}

.article-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.article-list li {
    position: relative;
    padding-left: 28px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.article-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 12px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent-gradient);
}

/* Role comparison cards */
.role-compare {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.compare-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
}

.compare-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.compare-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.compare-card.accent {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.12), rgba(6, 182, 212, 0.08));
}

/* Article CTA */
.article-cta {
    margin-top: 48px;
    padding: 32px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.article-cta h3 {
    margin-bottom: 12px;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
    color: #ffffff;
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-3px);
}

/* FAQ accordion */
.faq-item {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    padding: 18px 24px;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    position: relative;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-cyan, #06b6d4);
    font-size: 1.2rem;
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-item p {
    padding: 0 24px 20px;
    margin: 0;
}

@media (max-width: 768px) {
    .role-compare {
        grid-template-columns: 1fr;
    }
}

/* Featured guide banner (blog page) */
.featured-guide {
    display: block;
    padding: 28px 32px;
    margin-bottom: 40px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.featured-guide h3 {
    margin: 12px 0;
    font-size: 1.3rem;
}

.featured-guide h3 a {
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.featured-guide p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}
