: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 */
::-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 */
#converters, #editors, #documentation, #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'%3A%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-subtitle { font-size: 1.2rem; color: var(--muted); max-width: 600px; line-height: 1.7; margin-bottom: 2rem; }

/* Stats */
.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 */
.projects-section { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 4rem 2rem 6rem; 
}

/* =============================================================================
   SECTION TITLE ICONS
   ============================================================================= */

.section-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0; 
    transition: transform 0.3s ease;
}

.section-title-icon svg {
    width: 24px;
    height: 24px;
}

h2:hover .section-title-icon {
    transform: rotate(-5deg) scale(1.05);
}

@media (max-width: 640px) {
    .section-title-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .section-title-icon svg {
        width: 18px;
        height: 18px;
    }
}


/* =============================================================================
   TOOL CARDS (UPDATED WITH SHINE & OVERLAY)
   ============================================================================= */

.tool-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Shine Animation Effect */
.tool-card::after {
    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.6s ease;
    z-index: -1; 
}

.tool-card:hover::after {
    left: 100%;
}

.tool-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;
}

.tool-card:hover {
    border-color: rgba(0, 212, 170, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.tool-info { flex: 1; min-width: 0; position: relative; z-index: 2; }
.tool-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.tool-info p { font-size: 0.85rem; color: var(--fg-muted); }

.tool-arrow {
    color: var(--fg-muted); opacity: 0; transform: translateX(-10px);
    transition: all 0.3s;
    align-self: center; 
    position: relative; z-index: 2;
}
.tool-card:hover .tool-arrow { opacity: 1; transform: translateX(0); color: var(--accent); }

.featured-card-sm {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.05) 0%, var(--card) 100%);
}

/* =============================================================================
   COMING SOON OVERLAY STYLES
   ============================================================================= */

.tool-card.coming-soon {
    cursor: pointer; /* Pointer to indicate interaction */
}

.tool-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    transition: filter 0.4s ease;
}

.tool-card-overlay {
    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: opacity 0.4s ease;
    text-align: center;
    padding: 1.5rem;
    z-index: 10; /* Above content */
    border-radius: 16px; /* Match card radius */
}

.tool-card.coming-soon:hover .tool-card-overlay {
    opacity: 1;
}

.tool-card.coming-soon:hover .tool-card-inner {
    filter: blur(4px);
}

/* =============================================================================
   TOAST NOTIFICATION
   ============================================================================= */

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 90%;
    width: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    color: var(--accent-warm);
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--fg);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 900px) {
    .hero-title { font-size: 3rem; }
}

@media (max-width: 640px) {
    .main { padding-top: 80px; }
    .hero { padding: 2rem 1rem 3rem; }
    .projects-section { padding-top: 3rem; padding-bottom: 4rem; }
    .stat-value { font-size: 1.75rem; }
    .tool-card { padding: 1.25rem; }
    .tool-icon { width: 40px; height: 40px; }
    .tool-info h3 { font-size: 1rem; }
    .tool-info p { font-size: 0.8rem; }
    .tool-arrow { display: none; }
}

@media (min-width: 641px) {
    .projects-section { padding-top: 5rem; }
}

@media (min-width: 1024px) {
    .projects-section { padding-top: 6rem; }
}

/* 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-copy { color: var(--muted); font-size: 0.85rem; }

/* Back to Top */
#back-to-top { transition: opacity 0.3s, transform 0.2s; }
#back-to-top.visible { opacity: 1; pointer-events: auto; }

/* Reveal Animation */
.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 */
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; } }

/* =============================================================================
   CHROMATIC FOCUS STACK NAVIGATION
   ============================================================================= */

/* Color Definitions */
.col-violet { --item-color: #8b5cf6; } .col-fuchsia { --item-color: #d946ef; }
.col-blue { --item-color: #3b82f6; } .col-cyan { --item-color: #06b6d4; }
.col-amber { --item-color: #f59e0b; } .col-rose { --item-color: #f43f5e; }
.col-green { --item-color: #10b981; } .col-slate { --item-color: #64748b; }

.nav-chromatic-stack {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 100;
    padding: 10px;
}

.zoom-item {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    text-decoration: none;
    color: var(--item-color); 
}

.zoom-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.6; 
    transition: all 0.3s;
}

/* Label Tooltip */
.label-tip {
    position: absolute;
    right: 50px;
    background: var(--fg);
    color: var(--bg);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Interaction Logic */

/* Step 1: Container Hover */
.nav-chromatic-stack:hover .zoom-item {
    margin: 4px 0; 
    transform: scale(1.1);
    background: var(--card);
    border-color: var(--border);
}

/* Step 2: Individual Hover */
.zoom-item:hover {
    transform: scale(1.5) translateX(-15px) !important;
    background: var(--item-color) !important; 
    border-color: var(--item-color) !important;
    box-shadow: 0 0 25px color-mix(in srgb, var(--item-color) 50%, transparent);
    z-index: 10;
}

.zoom-item:hover svg {
    color: white !important; 
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.zoom-item:hover .label-tip { opacity: 1; }

/* Active State */
.zoom-item.active {
    background: var(--item-color);
    border-color: var(--item-color);
    color: white;
    box-shadow: 0 0 15px color-mix(in srgb, var(--item-color) 40%, transparent);
}
.zoom-item.active svg { opacity: 1; color: white; }

/* Mobile Hide */
@media (max-width: 768px) {
    .nav-chromatic-stack { display: none; }
}

/* =============================================================================
   ANIMATED GUIDE BUTTONS
   ============================================================================= */

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.guide-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  overflow: hidden; 
  transition: all 0.3s ease;
  z-index: 1;
}

.guide-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.guide-btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.2);
}
.guide-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
  transform: translateY(-2px);
}

.guide-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.guide-btn-outline:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.05);
}

.guide-btn:hover svg { transform: translateY(-2px); }

/* Shine Animation */
.guide-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  z-index: 2;
}
.guide-btn:hover::before { left: 100%; }