/* ===== CSS Variables ===== */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0f1e;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Accent - Sleek Blue/Teal Palette */
    --accent-primary: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --accent-teal: #06b6d4;
    --accent-cyan: #0891b2;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
    
    /* Badges */
    --badge-easy: #10b981;
    --badge-medium: #f59e0b;
    --badge-hard: #ef4444;
    
    /* Callout Colors */
    --callout-note: #3b82f6;
    --callout-info: #06b6d4;
    --callout-important: #f59e0b;
    --callout-warning: #ef4444;
    --callout-question: #8b5cf6;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(59, 130, 246, 0.3);
    
    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    
    /* Spacing */
    --container-width: 1800px; /* EVEN WIDER for symmetry */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Animation Timings - SLOWER */
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Animated Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridPulse 8s ease-in-out infinite;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 1;
}

/* ===== Navigation ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
}

.logo::after {
    content: '_';
    animation: blink 1.2s infinite;
    color: var(--accent-primary);
}

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

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    opacity: 1;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
}

/* Social tab now visible on desktop too */

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
    min-height: 100vh;
}

/* Better balance between columns */
.hero-left,
.hero-right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.hero-left {
    opacity: 0;
    animation: slideInLeft 1s ease forwards;
}

.hero-right {
    opacity: 0;
    animation: slideInRight 1s ease 0.3s forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Header with Photo */
.hero-header-with-photo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs); /* SUPER TIGHT */
}

.hero-text-section {
    flex: 1;
}

.hero-photo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin: 0 0 var(--spacing-xs) 0; /* SUPER TIGHT - very close to hero text */
    position: relative;
}

/* Glitch effect on name */
.hero-name.glitch {
    animation: glitch 200ms ease;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: none;
        transform: translate(0);
    }
    25% {
        text-shadow: -2px 0 red, 2px 0 blue;
        transform: translate(-2px, 0);
    }
    50% {
        text-shadow: 2px 0 red, -2px 0 green;
        transform: translate(2px, 0);
    }
    75% {
        text-shadow: -2px 0 blue, 2px 0 green;
        transform: translate(-1px, 0);
    }
}

/* Hero Tagline Wrapper */
.hero-tagline-wrapper {
    margin-bottom: 0; /* NO bottom margin - super tight */
    min-height: 3.5rem; /* Reserve exact space - prevents layout shift */
}

.hero-tagline-main {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.3rem; /* TIGHT */
    opacity: 0;
    font-weight: 500;
    min-height: 1.8rem; /* Exact space */
}

.hero-tagline-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
    opacity: 0;
    min-height: 1.5rem; /* Exact space */
}

.hero-tagline-main.typing,
.hero-tagline-sub.typing {
    opacity: 1;
}

/* Seeking Roles Line - TIGHTER */
.seeking-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--spacing-sm); /* TIGHT above */
    margin-bottom: var(--spacing-sm); /* TIGHT below */
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInUp 0.8s ease 2.5s forwards;
}

.seeking-arrow {
    color: var(--accent-primary);
    font-size: 1.25em;
    font-weight: 700;
}

.seeking-text {
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Download Resume Button - TIGHTER */
.resume-cta {
    margin-bottom: var(--spacing-md); /* TIGHT */
}

.download-resume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 1.25rem 2rem; /* Slightly smaller padding */
    background: var(--bg-secondary);
    border: 2px solid var(--border-accent);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.download-resume-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gradient-glow);
    transform: translate(-50%, -50%);
    transition: all 0.6s;
}

.download-resume-btn:hover::before {
    width: 500px;
    height: 500px;
}

.download-resume-btn:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px var(--accent-glow);
    transform: translateY(-3px);
}

.download-resume-btn svg {
    position: relative;
    z-index: 1;
}

.download-resume-btn span {
    position: relative;
    z-index: 1;
}

/* Remove old terminal styles */
.hero-header,
.terminal-icon,
.terminal-svg,
.hero-tagline-center {
    display: none;
}

/* ===== Expandable Stats - TIGHTER ===== */
.stats-section {
    margin-top: var(--spacing-md); /* TIGHT - reduced from xl */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm); /* TIGHT - reduced from md */
}

.stat-expandable {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(20px);
    min-height: 80px; /* Consistent minimum height */
}

.stat-expandable.visible {
    animation: fadeInUp 0.6s ease forwards;
}

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

.stat-header {
    padding: var(--spacing-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
    position: relative;
}

.stat-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.stat-header:hover::before {
    opacity: 1;
}

.stat-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

.stat-arrow {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    transition: transform var(--transition-slow);
    position: relative;
    z-index: 1;
}

.stat-expandable.expanded .stat-arrow {
    transform: rotate(180deg);
}

.stat-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.stat-expandable.expanded .stat-content {
    max-height: 350px; /* Limit to ~3 items height */
    overflow-y: auto; /* Scrollable */
}

/* Custom scrollbar for stats */
.stat-content::-webkit-scrollbar {
    width: 8px;
}

.stat-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.stat-content::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

.stat-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-accent);
}

.stat-content-inner {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

.stat-item {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

.stat-expandable.expanded .stat-item {
    animation: slideInItem 0.5s ease forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }
.stat-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

.stat-item-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.stat-item-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.room-link {
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.room-link:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

.room-link-small {
    padding: 0.2rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--accent-primary);
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.room-link-small:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: scale(1.05);
}

/* ===== Contact Links (ALL BLUE) ===== */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3); /* ALL BLUE */
    transform: translate(-50%, -50%);
    transition: all var(--transition-medium);
}

.contact-link:hover::before {
    width: 300px;
    height: 300px;
}

.contact-link:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.contact-link svg {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.contact-link span {
    position: relative;
    z-index: 1;
    word-break: break-word;
}

/* ===== Latest Write-ups (Right Side) ===== */
.latest-writeups {
    /* Removed position: sticky - let it scroll naturally with content */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0;
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
    position: relative;
    transition: opacity 0.3s ease;
    min-height: 2.5rem; /* Prevent layout shift during typing */
}

.section-title.type-on-scroll {
    opacity: 0; /* Will be set to 1 when typing starts */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
}

.writeup-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-md);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 100px; /* Consistent minimum height */
}

.writeup-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.8s;
}

.writeup-preview:hover::after {
    left: 100%;
}

.writeup-preview:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.writeup-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    gap: var(--spacing-sm);
}

.writeup-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.writeup-preview-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
}

/* ===== Certifications ===== */
.certifications {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.cert-item {
    transition: transform var(--transition-medium);
    opacity: 0;
    animation: popIn 0.8s ease forwards;
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.cert-item:nth-child(1) { animation-delay: 0.2s; }
.cert-item:nth-child(2) { animation-delay: 0.4s; }
.cert-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.cert-item:hover {
    transform: scale(1.1) rotate(2deg);
}

.cert-badge {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
    transition: filter var(--transition-fast);
}

.cert-item:hover .cert-badge {
    filter: drop-shadow(0 8px 30px var(--accent-glow));
}

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

/* ===== Badges (ALL CONSISTENT) ===== */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-easy {
    background: rgba(16, 185, 129, 0.2);
    color: var(--badge-easy);
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.badge-medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--badge-medium);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.badge-hard {
    background: rgba(239, 68, 68, 0.2);
    color: var(--badge-hard);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* ===== CTA Button ===== */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: all 0.6s;
}

.cta-button:hover::before {
    width: 400px;
    height: 400px;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 40px var(--accent-glow);
}

/* ===== OBSIDIAN CALLOUTS SUPPORT ===== */
/* Base callout styling */
.writeup-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--callout-note);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    position: relative;
}

.writeup-content blockquote p:first-child {
    margin-top: 0;
}

.writeup-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Note callout - Blue */
.writeup-content blockquote[data-callout="note"] {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

/* Info callout - Cyan */
.writeup-content blockquote[data-callout="info"] {
    border-left-color: #06b6d4;
    background: rgba(6, 182, 212, 0.08);
}

/* Important callout - Amber */
.writeup-content blockquote[data-callout="important"] {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

/* Warning callout - Red */
.writeup-content blockquote[data-callout="warning"] {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Question callout - Purple */
.writeup-content blockquote[data-callout="question"] {
    border-left-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
}

/* Tip callout - Green */
.writeup-content blockquote[data-callout="tip"] {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

/* Success callout - Emerald */
.writeup-content blockquote[data-callout="success"] {
    border-left-color: #059669;
    background: rgba(5, 150, 105, 0.08);
}

/* Error/Danger callout - Rose */
.writeup-content blockquote[data-callout="error"],
.writeup-content blockquote[data-callout="danger"] {
    border-left-color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

/* Example callout - Teal */
.writeup-content blockquote[data-callout="example"] {
    border-left-color: #14b8a6;
    background: rgba(20, 184, 166, 0.08);
}

/* Quote callout - Gray */
.writeup-content blockquote[data-callout="quote"] {
    border-left-color: #6b7280;
    background: rgba(107, 114, 128, 0.08);
}

/* ===== Write-up Page ===== */
.writeup-page {
    padding: var(--spacing-xl) 0;
}

.writeup-container {
    max-width: 900px;
    margin: 0 auto;
}

.writeup-content {
    font-size: 1rem;
    line-height: 1.8;
}

.writeup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: var(--spacing-lg) 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.writeup-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-md);
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

.writeup-content code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-primary);
}

.writeup-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .latest-writeups {
        position: static;
    }
    
    .nav-links {
        gap: var(--spacing-sm);
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Hero adjustments for mobile - SUPER TIGHT */
    .hero-header-with-photo {
        gap: var(--spacing-sm);
    }
    
    .hero-photo {
        width: 70px;
        height: 70px;
    }
    
    .hero-name {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
        margin-bottom: 0.25rem; /* SUPER TIGHT */
    }
    
    .hero-tagline-wrapper {
        min-height: 3rem; /* Tighter */
    }
    
    .hero-tagline-main {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.2rem;
    }
    
    .hero-tagline-sub {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .seeking-line {
        font-size: 0.85rem;
        margin-top: var(--spacing-xs); /* TIGHT */
        margin-bottom: var(--spacing-xs); /* TIGHT */
    }
    
    /* HIDE ARROW ON MOBILE */
    .seeking-arrow {
        display: none;
    }
    
    .download-resume-btn {
        font-size: 0.9rem;
        padding: 1rem 1.25rem; /* Smaller */
    }
    
    .resume-cta {
        margin-bottom: var(--spacing-sm); /* TIGHT */
    }
}

@media (max-width: 768px) {
    :root {
        --container-width: 100%;
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .contact-links {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .nav .container {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .stat-item-right {
        width: 100%;
    }
}

/* ===== Looping Glow Animation ===== */
@keyframes breathe {
    0%, 100% {
        box-shadow: 0 0 20px var(--accent-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--accent-glow);
    }
}

.glow-effect {
    animation: breathe 4s ease-in-out infinite;
}
