:root {
    --bg: #08080c;
    --surface: #0f0f15;
    --card: #111118;
    --border: #1e1e2a;
    --muted: #7a7a8a;
    --fg: #e8e8ed;
    --accent: #00d4aa;
    --accent-dark: #00b894;
    --accent-warm: #ff6b35;
    --warm: #ff6b35;
    --fg-muted: #7a7a8a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =============================================================================
   SCROLLBAR STYLES (ADDED BACK)
   ============================================================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Typography Utilities */
.headline { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.mono-text { font-family: 'JetBrains Mono', monospace; }

/* Accent Line Effect */
.accent-line { position: relative; display: inline-block; }
.accent-line::after {
    content: ''; position: absolute; left: 0; bottom: -4px;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm));
    border-radius: 2px;
}

/* Fix for Fixed Nav Overlay */
#active-projects, #support { scroll-margin-top: 120px; }

/* Particle Canvas */
#particles-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* =============================================================================
   BACKGROUND ELEMENTS
   ============================================================================= */

.bg-grid {
    position: fixed; inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 170, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none; z-index: 0;
}

.bg-gradient-orbs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.3; animation: float 25s ease-in-out infinite; }
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(0, 212, 170, 0.12) 0%, transparent 70%); top: -150px; right: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%); bottom: 10%; left: -100px; animation-delay: -8s; }
.orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(0, 212, 170, 0.1) 0%, transparent 70%); bottom: -50px; right: 15%; animation-delay: -16s; }

@keyframes float { 
    0%, 100% { transform: translate(0, 0) scale(1); } 
    25% { transform: translate(40px, -40px) scale(1.05); } 
    50% { transform: translate(-30px, 30px) scale(0.95); } 
    75% { transform: translate(30px, 15px) scale(1.02); } 
}

.noise-overlay { 
    position: fixed; inset: 0; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); 
    opacity: 0.025; pointer-events: none; z-index: 1; 
}

/* =============================================================================
   PAGE LAYOUT
   ============================================================================= */

.main { position: relative; z-index: 10; padding-top: 100px; }
.hero { max-width: 1400px; margin: 0 auto; padding: 3rem 2rem 4rem; }
.hero-header { margin-bottom: 4rem; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgba(0, 212, 170, 0.1); border: 1px solid rgba(0, 212, 170, 0.2); border-radius: 100px; font-size: 0.85rem; color: var(--accent); margin-bottom: 1.5rem; font-family: 'JetBrains Mono', monospace; }
.badge-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
.hero-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.5rem; }
.hero-title span { background: linear-gradient(135deg, var(--fg) 0%, var(--muted) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.2rem; color: var(--muted); max-width: 600px; line-height: 1.7; margin-bottom: 2rem; }

/* Stats Items (Used inside the new Grid layout) */
.stat-item { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-value { 
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700; 
    font-size: 2.5rem; 
    background: linear-gradient(135deg, var(--fg) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Projects Section - UPDATED PADDING */
.projects-section { 
    max-width: 1400px; 
    margin: 0 auto; 
    /* Updated: Added top padding 4rem (py-16 equivalent) */
    padding: 4rem 2rem 6rem; 
}

/* Coming Soon Section - UPDATED PADDING */
.coming-soon-section { 
    max-width: 1400px; 
    margin: 0 auto; 
    /* Updated: Added top padding 4rem (py-16 equivalent) */
    padding: 4rem 2rem 6rem; 
}

/* Card Styles */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; display: block; text-decoration: none; color: inherit; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.3s; }
.card:hover { border-color: rgba(0, 212, 170, 0.3); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
.card:hover::before { opacity: 1; }

/* =============================================================================
   FEATURED PROJECT CARD (Active Projects)
   ============================================================================= */

.featured-card { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    overflow: hidden; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative; 
}
.featured-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0, 212, 170, 0.05) 0%, transparent 50%); opacity: 0; transition: opacity 0.4s ease; }
.featured-card:hover { border-color: rgba(0, 212, 170, 0.3); transform: translateY(-4px); box-shadow: 0 20px 60px -20px rgba(0, 212, 170, 0.2); }
.featured-card:hover::before { opacity: 1; }

.featured-inner { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 0; 
    position: relative; 
    z-index: 1; 
}

/* --- Content Side --- */
.featured-content { padding: 2.5rem 3rem 2.5rem 2.5rem; }

/* Featured Badge */
.featured-badge {
  background: linear-gradient(135deg, var(--accent) 0%, #00b894 100%);
  color: var(--bg); font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
  display: inline-block;
}

.featured-description { color: var(--muted); line-height: 1.7; margin-bottom: 2rem; font-size: 1rem; }
.featured-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.meta-item svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tech-tag { position: relative; padding: 0.35rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 0.8rem; font-family: 'JetBrains Mono', monospace; color: var(--fg); cursor: help; transition: all 0.2s ease; }
.tech-tag:hover { border-color: var(--accent); background: rgba(0, 212, 170, 0.1); }
.tech-tag[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--card); border: 1px solid var(--border); padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.7rem; font-family: 'Space Grotesk', sans-serif; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 10; }
.tech-tag[data-tooltip]:hover::after { opacity: 1; visibility: visible; }
.featured-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Preview Side (Fake Terminal) --- */
.featured-preview { 
    padding: 2.5rem 2.5rem 2.5rem 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.preview-window { 
    width: 100%; 
    background: var(--surface); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5); 
    min-width: 0;
}

.preview-header { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    padding: 0.75rem 1rem; 
    background: var(--card); 
    border-bottom: 1px solid var(--border); 
}
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-dot.red { background: #ef4444; } 
.preview-dot.yellow { background: #eab308; } 
.preview-dot.green { background: #22c55e; }

.preview-url { 
    margin-left: 1rem; 
    padding: 0.35rem 0.75rem; 
    background: var(--surface); 
    border-radius: 4px; 
    font-size: 0.65rem; 
    color: var(--muted); 
    font-family: 'JetBrains Mono', monospace; 
    flex: 1; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.preview-content { padding: 1.5rem; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.preview-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; width: 100%; }
.preview-tool { 
    padding: 0.75rem; 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    text-align: center; 
    font-size: 0.7rem; 
    color: var(--muted); 
    transition: all 0.2s ease; 
}
.preview-tool:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.preview-tool svg { width: 20px; height: 20px; margin: 0 auto 0.5rem; display: block; color: var(--accent); }

/* =============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================= */

/* Tablet - Stack vertically */
@media (max-width: 900px) {
    .featured-inner { 
        grid-template-columns: 1fr; 
    }
    
    .featured-content { 
        padding: 2rem; 
    }
    
    .featured-preview { 
        padding: 0 2rem 2rem 2rem; 
        /* Add visual separation when stacked */
        border-top: 1px solid var(--border);
        margin-top: 1rem;
        padding-top: 2rem;
    }
}

/* Mobile Specific Adjustments */
@media (max-width: 640px) {
    /* Section Padding - UPDATED FOR RESPONSIVE SPACING */
    .main { padding-top: 80px; }
    .hero { padding: 2rem 1rem 3rem; }
    
    /* Updated to match py-16 sm:py-20 */
    .projects-section { padding-top: 3rem; padding-bottom: 4rem; }
    .coming-soon-section { padding-top: 3rem; padding-bottom: 4rem; }
    
    /* Stats Value Size */
    .stat-value { font-size: 1.75rem; }
    
    /* Featured Content */
    .featured-content {
        padding: 1.5rem;
    }
    
    /* Featured Preview */
    .featured-preview {
        padding: 0 1rem 1.5rem;
        margin-top: 0.5rem;
        padding-top: 1.5rem;
    }
    
    /* Fake Terminal Adjustments */
    .preview-header {
        padding: 0.5rem 0.75rem;
    }
    
    .preview-dot {
        width: 8px;
        height: 8px;
    }
    
    .preview-url {
        font-size: 0.5rem; /* Smaller terminal text */
        padding: 0.25rem 0.5rem;
        margin-left: 0.5rem;
    }
    
    .preview-content {
        padding: 1rem;
        min-height: auto; 
    }
    
    /* Tools Grid: 3 columns compact (Keeps "Dashboard" look) */
    .preview-tools {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .preview-tool {
        padding: 0.6rem 0.4rem;
        font-size: 0.6rem;
    }
    
    .preview-tool svg {
        width: 16px;
        height: 16px;
        margin-bottom: 0.35rem;
    }
    
    /* Buttons */
    .featured-actions {
        flex-direction: column;
    }
    
    .featured-actions .btn-primary,
    .featured-actions .btn-outline {
        width: 100%;
        justify-content: center;
    }
}

/* Larger Screens (Added to match sm:py-20 lg:py-24) */
@media (min-width: 641px) {
    .projects-section { padding-top: 5rem; } /* sm:py-20 = 5rem */
    .coming-soon-section { padding-top: 5rem; }
}

@media (min-width: 1024px) {
    .projects-section { padding-top: 6rem; } /* lg:py-24 = 6rem */
    .coming-soon-section { padding-top: 6rem; }
}

/* Coming Soon Card Animation */
.coming-soon-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s;
  position: relative; cursor: pointer;
}
.coming-soon-card .card-content { transition: all 0.4s; }
.coming-soon-card .overlay-message {
  position: absolute; inset: 0;
  background: rgba(8, 8, 12, 0.95);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transition: all 0.4s;
  padding: 20px; text-align: center;
}
.coming-soon-card:hover .overlay-message { opacity: 1; }
.coming-soon-card:hover .card-content { filter: blur(4px); }

.skill-tag {
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.2);
  color: var(--accent);
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  transition: all 0.2s; display: inline-block;
}

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1.5rem; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: var(--bg); border: none; border-radius: 10px; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none; transition: all 0.3s ease; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(0, 212, 170, 0.4); }
.btn-outline { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1.5rem; background: transparent; color: var(--fg); border: 1px solid var(--border); border-radius: 10px; font-weight: 500; font-size: 0.95rem; cursor: pointer; text-decoration: none; transition: all 0.3s ease; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 212, 170, 0.05); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; position: relative; z-index: 10; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-links { display: flex; justify-center; gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; transition: color 0.2s ease; }
.footer-link:hover { color: var(--accent); }
.footer-copy { color: var(--muted); font-size: 0.85rem; }

/* Back to Top Button */
#back-to-top { transition: opacity 0.3s, transform 0.2s; }
#back-to-top.visible { opacity: 1; pointer-events: auto; }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Focus States - REMOVED input:focus-visible to fix search border issue */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

/* =============================================================================
   TYPING CURSOR
   ============================================================================= */

.typing-cursor {
  display: inline-block; width: 3px; height: 1em;
  background: var(--accent); margin-left: 4px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }