/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0d0d0d;
    --bg-alt:   #111111;
    --surface:  #181818;
    --border:   #242424;
    --primary:  #3b82f6;
    --primary-d:#2563eb;
    --accent:   #10b981;
    --text:     #e5e5e5;
    --muted:    #737373;
    --white:    #ffffff;
    --nav-h:    64px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; }
strong { color: var(--white); }
a { text-decoration: none; color: inherit; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s ease;
    border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.3); }
.btn-outline:hover { border-color: var(--white); transform: translateY(-2px); }
.btn-linkedin { background: #0077b5; color: var(--white); font-size: 1rem; padding: 14px 36px; }
.btn-linkedin:hover { background: #005f8f; transform: translateY(-2px); }

/* ── Navigation ───────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
    background: rgba(13,13,13,.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    background: var(--primary);
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: 6px;
}
.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-links a {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .9rem;
    color: var(--muted);
    transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); background: var(--surface); }
.nav-links .nav-cta { background: var(--primary); color: var(--white) !important; padding: 8px 18px; }
.nav-links .nav-cta:hover { background: var(--primary-d); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all .3s; }

@media (max-width: 768px) {
    .nav-burger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column;
        background: rgba(13,13,13,.98);
        backdrop-filter: blur(12px);
        padding: 16px 24px 24px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 24px; }
.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: .78rem;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -2px;
    background: linear-gradient(160deg, #ffffff 20%, rgba(229,229,229,.72) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.accent { color: var(--primary); }
.hero-content p { font-size: 1.1rem; color: var(--muted); max-width: 580px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
    position: absolute;
    bottom: 32px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    z-index: 2;
}
.hero-scroll span { font-size: .72rem; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }
.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: .4; }
    50% { opacity: 1; transform: scaleY(1.15); }
}

/* ── Sections ─────────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--white); }

/* ── About ────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { margin-bottom: 16px; color: var(--muted); font-size: 1rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: border-color .3s;
}
.stat:hover { border-color: var(--primary); }
.stat-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.stat-label { font-size: .82rem; color: var(--muted); }

/* ── Services ─────────────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px 28px;
    transition: border-color .3s, transform .3s;
}
.service-card:hover { border-color: var(--primary); }
.service-icon {
    width: 50px; height: 50px;
    background: rgba(59,130,246,.1);
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--primary);
}
.service-card h3 { font-size: 1.15rem; color: var(--white); margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: .92rem; }

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline { max-width: 760px; margin: 0 auto; position: relative; padding-left: 32px; }
.timeline::before {
    content: ''; position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 1px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 44px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -37px; top: 6px;
    width: 10px; height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.timeline-date { font-size: .78rem; font-weight: 600; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.timeline-body h4 { font-size: 1.08rem; color: var(--white); margin-bottom: 4px; }
.timeline-role { display: inline-block; font-size: .83rem; color: var(--primary); margin-bottom: 8px; }
.timeline-body p { color: var(--muted); font-size: .92rem; }

/* ── Education ────────────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; max-width: 760px; margin: 0 auto; }
.edu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex; gap: 18px; align-items: flex-start;
    transition: border-color .3s;
}
.edu-card:hover { border-color: var(--primary); }
.edu-icon {
    width: 42px; height: 42px;
    background: rgba(59,130,246,.1);
    border-radius: 8px;
    display: grid; place-items: center;
    color: var(--primary); font-size: 1rem;
    flex-shrink: 0;
}
.edu-year { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.edu-body h4 { color: var(--white); margin-bottom: 2px; font-size: 1rem; }
.edu-body p { color: var(--primary); font-size: .87rem; margin-bottom: 4px; }
.edu-body small { color: var(--muted); font-size: .82rem; }

/* ── Skills ───────────────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 40px; }
.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    transition: border-color .3s, transform .3s;
}
.skill-card:hover { border-color: var(--primary); }
.skill-icon { font-size: 1.5rem; color: var(--primary); margin-bottom: 14px; }
.skill-card h4 { color: var(--white); margin-bottom: 14px; font-size: .95rem; font-weight: 600; }
.skill-card ul { list-style: none; }
.skill-card li { color: var(--muted); font-size: .88rem; padding: 5px 0; border-bottom: 1px solid var(--border); }
.skill-card li:last-child { border-bottom: none; }

.languages-bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lang-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 10px 22px;
    display: flex; gap: 10px; align-items: center;
}
.lang-name { color: var(--white); font-weight: 600; font-size: .88rem; }
.lang-level { color: var(--primary); font-size: .78rem; font-weight: 500; }

/* ── Contact buttons ──────────────────────────────────────────── */
.contact-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 80px 0 32px; }
.footer-content { text-align: center; margin-bottom: 48px; }
.footer-content h2 { font-size: 2rem; color: var(--white); margin-bottom: 14px; }
.footer-content p { color: var(--muted); max-width: 480px; margin: 0 auto 32px; }
.footer-bottom { text-align: center; border-top: 1px solid var(--border); padding-top: 24px; color: var(--muted); font-size: .83rem; }

/* ── Fade-in animations ───────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in.visible { opacity: 1; transform: none; }
.section-header.fade-in { clip-path: inset(0 0 40% 0); transition: opacity .85s ease, transform .85s cubic-bezier(0.16,1,.3,1), clip-path .85s cubic-bezier(0.16,1,.3,1); }
.section-header.fade-in.visible { clip-path: inset(0 0 0% 0); }

/* ── Responsive helpers ───────────────────────────────────────── */
@media (max-width: 768px) {
    .section { padding: 70px 0; }
    .services-grid, .skills-grid { grid-template-columns: 1fr; }
}

/* ── Scroll progress bar ──────────────────────────────────────── */
#progress-bar {
    position: fixed; top: 0; left: 0;
    height: 2px; width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 300;
    transition: width .08s linear;
    pointer-events: none;
}

/* ── Custom cursor ────────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
    *, *::before, *::after { cursor: none !important; }
}
.cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 5px; height: 5px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform .15s ease, opacity .3s;
    will-change: left, top;
}
.cursor-ring {
    position: fixed; top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1px solid rgba(59,130,246,.45);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width .3s ease, height .3s ease, border-color .3s, background .3s, opacity .3s;
    will-change: left, top;
}
body.cur-hover .cursor-ring {
    width: 52px; height: 52px;
    border-color: var(--primary);
    background: rgba(59,130,246,.06);
}
body.cur-hover .cursor-dot { transform: translate(-50%, -50%) scale(0); }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ── Hero overlays ────────────────────────────────────────────── */
.hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(ellipse at 28% 55%, rgba(59,130,246,.09) 0%, transparent 65%),
        radial-gradient(ellipse at 72% 28%, rgba(16,185,129,.06) 0%, transparent 55%);
}
.hero::after {
    content: '';
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: .034;
    mix-blend-mode: overlay;
}

/* ── Hero accent gradient text ────────────────────────────────── */
.hero-content h1 .accent {
    background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Marquee strip ────────────────────────────────────────────── */
.marquee-strip {
    overflow: hidden;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 13px 0;
    user-select: none;
}
.marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marqueeScroll 40s linear infinite;
}
.marquee-strip:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    display: inline-block;
    padding: 0 20px;
    font-size: .70rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.marquee-track .mdot { color: var(--primary); opacity: .6; padding: 0 4px; letter-spacing: 0; }
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Card glow on hover ───────────────────────────────────────── */
.service-card:hover { box-shadow: 0 0 40px rgba(59,130,246,.13), 0 20px 40px rgba(0,0,0,.25); }
.skill-card:hover   { box-shadow: 0 0 30px rgba(59,130,246,.10), 0 16px 30px rgba(0,0,0,.18); }
.edu-card:hover     { box-shadow: 0 0 24px rgba(59,130,246,.09); }
.stat:hover         { box-shadow: 0 0 24px rgba(59,130,246,.12); }
