/* ============================================
   CrowsEmperor — Shadowy Freedom
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #00d4ff;
    --accent-2: #7c3aed;
    --accent-3: #06d6a0;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --accent-2-glow: rgba(124, 58, 237, 0.3);
    --border: rgba(255, 255, 255, 0.06);
    --gradient-1: linear-gradient(135deg, #00d4ff, #7c3aed);
    --gradient-2: linear-gradient(135deg, #7c3aed, #06d6a0);
    --gradient-3: linear-gradient(135deg, #00d4ff, #06d6a0);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* === Matrix Background Canvas === */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.07;
    pointer-events: none;
}

/* === Floating Particles === */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: float-particle linear infinite;
    opacity: 0;
}

@keyframes float-particle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

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

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: #0d0d12;
    border-bottom-color: var(--border);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.logo-bracket { color: var(--accent); }
.logo-text { color: var(--text-primary); }

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    background: rgba(0, 212, 255, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.nav-login-btn {
    color: var(--accent) !important;
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin-left: 8px;
}

.nav-login-btn:hover {
    background: rgba(0, 212, 255, 0.15) !important;
    border-color: var(--accent);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translateY(7px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    transform: translateY(20px);
    opacity: 0;
}

.mobile-menu.active .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-link:nth-child(6) { transition-delay: 0.35s; }

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

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.4;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 0 24px;
}

/* Glitch Effect */
.glitch-wrapper { position: relative; display: inline-block; }

.glitch {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: glitch-skew 4s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch::before {
    animation: glitch-1 2s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
    animation: glitch-2 2s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
    0%, 90% { transform: translate(0); }
    91% { transform: translate(-3px, 1px); }
    92% { transform: translate(3px, -1px); }
    93% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    95% { transform: translate(-1px, 1px); }
    96%, 100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0%, 90% { transform: translate(0); }
    91% { transform: translate(3px, -1px); }
    92% { transform: translate(-3px, 1px); }
    93% { transform: translate(2px, -2px); }
    94% { transform: translate(-2px, 2px); }
    95% { transform: translate(1px, -1px); }
    96%, 100% { transform: translate(0); }
}

@keyframes glitch-skew {
    0%, 95% { transform: skew(0deg); }
    96% { transform: skew(0.5deg); }
    97% { transform: skew(-0.5deg); }
    98% { transform: skew(0.3deg); }
    99% { transform: skew(-0.3deg); }
    100% { transform: skew(0deg); }
}

/* Typewriter */
.typewriter-container {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent);
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.typewriter-prefix {
    color: var(--accent-3);
    font-weight: 700;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

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

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

.separator {
    color: var(--accent);
    margin: 0 8px;
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before { left: 100%; }

.btn-primary {
    background: var(--gradient-1);
    color: var(--bg-primary);
    border: none;
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px var(--accent-glow), 0 10px 40px rgba(0,0,0,0.3);
}

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

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn:hover .btn-icon { transform: translateX(4px); }

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

/* === Section Styles === */
.section {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.title-number {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.2rem;
}

.title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
    min-width: 60px;
}

/* === About Section === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.about-visual {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.about-greeting {
    font-size: 1.5rem !important;
    color: var(--text-primary) !important;
    margin-bottom: 20px !important;
}

.wave {
    display: inline-block;
    animation: wave-hand 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave-hand {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60%, 100% { transform: rotate(0deg); }
}

/* Stats */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Code Window */
.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.code-window:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.code-block {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-keyword { color: #c678dd; }
.code-var { color: #e06c75; }
.code-key { color: #61afef; }
.code-string { color: #98c379; }
.code-bool { color: #d19a66; }

/* === Skills Section === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.skill-category-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon { font-size: 1.4rem; }

.skill-items { display: flex; flex-direction: column; gap: 20px; }

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

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === Projects Section === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

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

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.project-emoji {
    font-size: 4rem;
    transition: var(--transition);
}

.project-card:hover .project-emoji { transform: scale(1.2) rotate(5deg); }

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 212, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-link {
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 24px;
    border: 2px solid var(--bg-primary);
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.project-link:hover {
    background: var(--bg-primary);
    color: var(--accent);
}

.project-info { padding: 24px; }

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tags, .blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    transition: var(--transition);
    text-decoration: none;
}

.tag:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--accent);
}

/* === Blog Section === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.blog-card.featured {
    grid-column: span 3;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(124, 58, 237, 0.05));
    border-color: rgba(0, 212, 255, 0.2);
    padding: 40px;
}

.blog-badge {
    position: absolute;
    top: -1px;
    right: 24px;
    background: var(--gradient-1);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 0 0 8px 8px;
}

.blog-thumb {
    margin: -28px -28px 20px;
    overflow: hidden;
    max-height: 200px;
}
.blog-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.blog-card.featured .blog-thumb {
    margin: -40px -40px 24px;
    max-height: 280px;
}
.blog-card.featured .blog-thumb img {
    height: 280px;
}

.blog-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title { color: var(--accent); }

.blog-card.featured .blog-title { font-size: 1.6rem; }

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

.blog-tags { margin-bottom: 16px; }

.blog-read-more {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-read-more:hover { gap: 8px; }

/* === Contact Section === */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.8;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.contact-icon { font-size: 2rem; }
.contact-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.contact-value {
    font-size: 0.9rem;
    color: var(--accent);
}

/* === Footer === */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-code { color: var(--accent); margin-right: 8px; }
.footer-year { margin-left: 8px; }

/* === Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-card.featured {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-menu { display: flex; }

    .container { padding: 0 20px; }

    .section { padding: 70px 0; }

    .section-title { font-size: 1.5rem; margin-bottom: 40px; }
    .title-number { font-size: 1rem; }
    .title-line { min-width: 40px; }

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

    .about-text {
        order: 1;
        overflow: hidden;
        min-width: 0;
        max-width: 100%;
    }

    .about-greeting {
        font-size: 1.15rem !important;
        margin-bottom: 14px !important;
    }

    .about-text p {
        font-size: 0.92rem;
        line-height: 1.75;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 24px;
    }

    .stat-card {
        padding: 18px 12px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .about-visual {
        order: 2;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .code-block {
        font-size: 0.78rem;
        padding: 18px;
    }

    .skills-grid,
    .projects-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card.featured {
        grid-column: span 1;
    }

    .contact-links {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .glitch { font-size: 2.8rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }

    .section { padding: 50px 0; }

    .section-title { font-size: 1.35rem; margin-bottom: 32px; }

    .about-greeting {
        font-size: 1.05rem !important;
    }

    .about-text p {
        font-size: 0.88rem;
        line-height: 1.7;
    }

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

    .stat-card {
        padding: 14px 10px;
    }

    .stat-number {
        font-size: 1.35rem;
    }

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

/* === Page Preloader === */
#page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a1e;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#page-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.preloader-card {
    text-align: center;
    padding: 48px 64px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(0, 212, 255, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 20px;
    box-shadow: 0 0 80px rgba(124, 58, 237, 0.15), 0 0 160px rgba(0, 212, 255, 0.06);
}

.preloader-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.06);
    border-top-color: #7c3aed;
    border-right-color: #00d4ff;
    border-radius: 50%;
    animation: preloaderSpin 0.8s linear infinite;
}

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

.preloader-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.preloader-logo .logo-bracket {
    color: #7c3aed;
}

.preloader-logo .logo-text {
    color: #ffffff;
}

.preloader-page {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 20px;
}

.preloader-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.preloader-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7c3aed;
    animation: preloaderDotPulse 1.2s ease-in-out infinite;
}

.preloader-dots span:nth-child(2) {
    animation-delay: 0.2s;
    background: #a855f7;
}

.preloader-dots span:nth-child(3) {
    animation-delay: 0.4s;
    background: #00d4ff;
}

@keyframes preloaderDotPulse {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
    40% { transform: scale(1.2); opacity: 1; }
}
