/* ═══════════════════════════════════════════
   BARONLAB – Modern Design System
   Inspired by: bg-1.jpg cyan/teal palette
   ═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #080c14;
    --bg-2: #0d1320;
    --bg-3: #111827;
    --surface: #151d2e;
    --surface-2: #1a2540;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --white: #f8fafc;
    --cyan: #22d3ee;
    --cyan-dim: rgba(34,211,238,0.15);
    --cyan-glow: rgba(34,211,238,0.3);
    --teal: #14b8a6;
    --radius: 12px;
    --radius-lg: 16px;
    --font: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan); }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ═══════════════════════
   NAVBAR
   ═══════════════════════ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.35s ease;
    background: transparent;
}

.navbar.scrolled {
    padding: 14px 0;
    background: rgba(8,12,20,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container { display: flex; align-items: center; justify-content: space-between; }

.logo {
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.08em;
}
.logo:hover { color: var(--white); }
.logo-accent { color: var(--cyan); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

.nav-cta {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg);
    background: var(--cyan);
    padding: 10px 22px;
    border-radius: 8px;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.nav-cta:hover {
    background: #06b6d4;
    color: var(--bg);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--white);
    transition: all 0.3s;
    border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translateY(7px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translateY(-7px); }

/* ═══════════════════════
   HERO
   ═══════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(135deg, rgba(8,12,20,0.88) 0%, rgba(8,12,20,0.5) 50%, rgba(8,12,20,0.75) 100%),
        radial-gradient(ellipse at 80% 50%, rgba(34,211,238,0.08) 0%, transparent 60%);
    z-index: 1;
}

.hero-particles {
    position: absolute; inset: 0;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 160px 0 100px;
    max-width: 780px;
}

.hero-label {
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.9;
}

.hero h1 {
    font-family: var(--font);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 28px;
}

.hero-sub {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 64px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bg);
    background: var(--cyan);
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: #06b6d4;
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34,211,238,0.25);
}
.btn-primary.btn-lg {
    padding: 18px 40px;
    font-size: 1.05rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.2s;
}
.btn-ghost:hover {
    border-color: rgba(255,255,255,0.35);
    color: var(--white);
    background: rgba(255,255,255,0.04);
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-num {
    display: block;
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.1);
}

/* ═══════════════════════
   SECTIONS
   ═══════════════════════ */
.section { padding: 100px 0; }
.section-alt { padding: 100px 0; background: var(--bg-2); }

.section-dark {
    padding: 100px 0;
    background: var(--bg-3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header { margin-bottom: 60px; }

.section-tag {
    display: inline-block;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--white);
}

.section-header.light h2 { color: var(--white); }
.section-tag.light { color: var(--cyan); }

/* ═══════════════════════
   EXPERTISE CARDS
   ═══════════════════════ */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.exp-card {
    background: var(--bg);
    padding: 40px 32px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.exp-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.exp-card:hover {
    background: var(--surface);
}

.exp-num {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    opacity: 0.7;
}

.exp-card h3 {
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.exp-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.exp-list {
    list-style: none;
    padding: 0;
}

.exp-list li {
    font-size: 0.82rem;
    color: var(--text-dim);
    padding: 5px 0;
    border-top: 1px solid var(--border);
    font-family: var(--font);
    letter-spacing: 0.01em;
}

.exp-list li:first-child { border-top: none; padding-top: 0; }

/* ═══════════════════════
   TECH STACK
   ═══════════════════════ */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stack-col {
    opacity: 0;
    transform: translateY(20px);
}
.stack-col.revealed {
    opacity: 1;
    transform: translateY(0);
}

.stack-heading {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cyan-dim);
}

.stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stack-items span {
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.stack-items span:hover {
    color: var(--cyan);
    border-color: var(--cyan-dim);
    background: rgba(34,211,238,0.06);
}

/* ═══════════════════════
   PROJECTS
   ═══════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.project-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.project-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border-color: var(--cyan-dim);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}
.project-featured::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(34,211,238,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.project-tag {
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.project-card h3 {
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}
.project-featured h3 { font-size: 1.4rem; }

.project-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ═══════════════════════
   EXPERIENCE BLOCKS
   ═══════════════════════ */
.exp-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.exp-block {
    padding: 36px 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}
.exp-block.revealed {
    opacity: 1;
    transform: translateY(0);
}
.exp-block:hover {
    border-color: var(--border-hover);
    background: var(--surface);
}

.exp-block-icon {
    color: var(--cyan);
    margin-bottom: 20px;
    opacity: 0.8;
}

.exp-block h3 {
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.exp-block p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ═══════════════════════
   CTA
   ═══════════════════════ */
.section-cta {
    padding: 120px 0;
    text-align: center;
    background: var(--bg);
    position: relative;
}

.section-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34,211,238,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.cta-container {
    max-width: 640px;
    position: relative;
}

.section-cta h2 {
    font-family: var(--font);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 20px;
}

.section-cta p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 36px;
}

.cta-links {
    margin-top: 24px;
}
.cta-links a {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.2s;
}
.cta-links a:hover { color: var(--cyan); }

/* ═══════════════════════
   FOOTER
   ═══════════════════════ */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0 32px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.footer-logo {
    font-size: 1rem;
    margin-bottom: 4px;
}
.footer-logo:hover { color: var(--white); }

.footer-left p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.footer-right {
    display: flex;
    gap: 24px;
}
.footer-right a {
    font-size: 0.82rem;
    color: var(--text-dim);
}
.footer-right a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ═══════════════════════
   LEGAL PAGES
   ═══════════════════════ */
.legal-page {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
}
.legal-page h1 {
    font-family: var(--font);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}
.legal-page .legal-updated {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 40px;
}
.legal-page h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--white);
}
.legal-page h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--white);
}
.legal-page p, .legal-page li {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
}
.legal-page ul { padding-left: 24px; margin-bottom: 16px; }
.legal-page a { color: var(--cyan); text-decoration: underline; }
.legal-page .legal-content { max-width: 800px; }
.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ═══════════════════════
   SCROLL REVEAL TRANSITIONS
   ═══════════════════════ */
.exp-card, .project-card, .stack-col, .exp-block {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Staggered delay per card */
.expertise-grid .exp-card:nth-child(1) { transition-delay: 0s; }
.expertise-grid .exp-card:nth-child(2) { transition-delay: 0.08s; }
.expertise-grid .exp-card:nth-child(3) { transition-delay: 0.16s; }
.expertise-grid .exp-card:nth-child(4) { transition-delay: 0.24s; }
.expertise-grid .exp-card:nth-child(5) { transition-delay: 0.32s; }
.expertise-grid .exp-card:nth-child(6) { transition-delay: 0.4s; }

.stack-col:nth-child(1) { transition-delay: 0s; }
.stack-col:nth-child(2) { transition-delay: 0.1s; }
.stack-col:nth-child(3) { transition-delay: 0.2s; }
.stack-col:nth-child(4) { transition-delay: 0.3s; }

.projects-grid .project-card:nth-child(1) { transition-delay: 0s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.2s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.3s; }
.projects-grid .project-card:nth-child(5) { transition-delay: 0.35s; }
.projects-grid .project-card:nth-child(6) { transition-delay: 0.4s; }
.projects-grid .project-card:nth-child(7) { transition-delay: 0.45s; }

.exp-summary .exp-block:nth-child(1) { transition-delay: 0s; }
.exp-summary .exp-block:nth-child(2) { transition-delay: 0.1s; }
.exp-summary .exp-block:nth-child(3) { transition-delay: 0.2s; }
.exp-summary .exp-block:nth-child(4) { transition-delay: 0.3s; }

/* ═══════════════════════
   RESPONSIVE
   ═══════════════════════ */
@media (max-width: 1024px) {
    .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .project-featured { grid-column: 1; }
    .exp-summary { grid-template-columns: 1fr; }
    .nav-cta { display: none; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: rgba(8,12,20,0.98);
        backdrop-filter: blur(20px);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .nav-cta { display: none; }

    .hero { min-height: auto; }
    .hero-content { padding: 140px 0 80px; }
    .hero h1 { font-size: 2.2rem; }
    .hero-sub { font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }

    .section, .section-alt, .section-dark { padding: 64px 0; }
    .section-header { margin-bottom: 40px; }
    .section-header h2 { font-size: 1.6rem; }

    .expertise-grid { grid-template-columns: 1fr; }
    .exp-card { padding: 28px 24px; }

    .stack-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    .project-featured { padding: 32px 24px; }

    .section-cta { padding: 80px 0; }
    .section-cta h2 { font-size: 1.6rem; }

    .footer-container { flex-direction: column; gap: 16px; text-align: center; }
}