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

:root {
    --bg: #0a0a0f;
    --bg2: #0f0f18;
    --bg3: #13131e;
    --card: #14141f;
    --card-hover: #1a1a2e;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #4f8ef7;
    --accent2: #7c3aed;
    --accent-g: linear-gradient(135deg, #4f8ef7, #7c3aed);
    --text: #e8e8f0;
    --text-muted: #888899;
    --text-dim: #555566;
    --mono: "Space Mono", monospace;
    --sans: "Syne", sans-serif;
    --radius: 12px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: rgba(79, 142, 247, 0.3);
}

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

/* ── NAV ─────────────────────────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 64px;
    background: rgba(10, 10, 15, 0);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}
#navbar.scrolled {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}
.nav-logo {
    font-family: var(--mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 2px;
}
.nav-logo .dot {
    color: var(--accent);
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.nav-links a {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color var(--transition);
}
.nav-links a:hover {
    color: var(--accent);
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ── HERO ────────────────────────────────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0 5%;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79, 142, 247, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 142, 247, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}
.glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(79, 142, 247, 0.12);
    top: -100px;
    right: 10%;
}
.glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(124, 58, 237, 0.1);
    bottom: 0;
    left: 5%;
}
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px;
    gap: 4rem;
}
.hero-text {
    flex: 1;
    max-width: 620px;
}
.hero-tag {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hero-tag::before {
    content: "> ";
    opacity: 0.5;
}
.hero-name {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}
.accent-text {
    background: var(--accent-g);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 500px;
}
.hero-desc strong {
    color: var(--text);
}
.hero-btns {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.btn-primary {
    padding: 0.75rem 2rem;
    background: var(--accent-g);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition:
        opacity var(--transition),
        transform var(--transition);
}
.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}
.btn-outline {
    padding: 0.75rem 2rem;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition:
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}
.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(79, 142, 247, 0.08);
    transform: translateY(-2px);
}
.hero-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.lang-badge {
    font-family: var(--mono);
    font-size: 0.72rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition:
        border-color var(--transition),
        color var(--transition);
}
.lang-badge:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Hero Photo */
.hero-photo {
    flex-shrink: 0;
    position: relative;
    width: 280px;
    height: 280px;
}
.photo-frame {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--border);
    overflow: hidden;
    position: relative;
    z-index: 2;
    background: var(--card);
}
.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--card);
}
.photo-frame.no-photo img {
    display: none;
}
.photo-frame.no-photo .photo-placeholder {
    display: flex;
}
.photo-deco {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(79, 142, 247, 0.2);
    z-index: 1;
    animation: spin 20s linear infinite;
    background: conic-gradient(
        from 0deg,
        transparent 60%,
        rgba(79, 142, 247, 0.3) 100%
    );
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 5%;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}
.scroll-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, var(--text-dim), transparent);
}

/* ── CONTAINER ───────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ── SECTIONS ────────────────────────────────────────────────── */
section {
    padding: 7rem 0;
}
section:nth-child(even) {
    background: var(--bg2);
}
.section-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}
.section-sub {
    color: var(--text-muted);
    margin-top: -2rem;
    margin-bottom: 3rem;
    font-size: 1rem;
}

/* ── ABOUT ───────────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: start;
}
.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.75;
}
.about-text strong {
    color: var(--text);
}
.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 2rem;
    text-align: center;
    min-width: 140px;
}
.stat-num {
    font-family: var(--mono);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-g);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2.5rem;
}
.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    background: var(--bg);
    transition: var(--transition);
}
.timeline-dot.active {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 12px rgba(79, 142, 247, 0.5);
}
.timeline-date {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}
.timeline-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition:
        border-color var(--transition),
        transform var(--transition);
}
.timeline-card:hover {
    border-color: rgba(79, 142, 247, 0.3);
    transform: translateX(4px);
}
.card-header {
    margin-bottom: 0.75rem;
}
.card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.card-company {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}
.card-bullets {
    list-style: none;
    margin-bottom: 1rem;
}
.card-bullets li {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}
.card-bullets li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
    top: 3px;
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.card-tags span {
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(79, 142, 247, 0.1);
    color: var(--accent);
    border: 1px solid rgba(79, 142, 247, 0.2);
}

/* ── SKILLS ──────────────────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.skill-group {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition:
        border-color var(--transition),
        transform var(--transition);
}
.skill-group:hover {
    border-color: rgba(79, 142, 247, 0.3);
    transform: translateY(-3px);
}
.skill-group-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.skill-group h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}
.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.skill-pills span {
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    transition:
        border-color var(--transition),
        color var(--transition);
}
.skill-group:hover .skill-pills span {
    border-color: rgba(79, 142, 247, 0.25);
    color: var(--text);
}

/* ── CERTIFICATIONS ──────────────────────────────────────────── */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}
.cert-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition:
        border-color var(--transition),
        transform var(--transition);
    position: relative;
    overflow: hidden;
}
.cert-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-g);
    opacity: 0;
    transition: opacity var(--transition);
}
.cert-card:hover {
    border-color: rgba(79, 142, 247, 0.3);
    transform: translateY(-4px);
}
.cert-card:hover::before {
    opacity: 1;
}
.cert-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
}
.cert-icon svg {
    width: 100%;
    height: 100%;
}
.cert-info {
    flex: 1;
}
.cert-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.cert-info p {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.cert-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.25);
    margin-top: 0.4rem;
    letter-spacing: 0.5px;
}
.cert-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(79, 142, 247, 0.3);
    padding: 0.45rem 0.9rem;
    border-radius: 5px;
    transition:
        background var(--transition),
        transform var(--transition);
    letter-spacing: 0.5px;
}
.cert-btn svg {
    width: 14px;
    height: 14px;
}
.cert-btn:hover {
    background: rgba(79, 142, 247, 0.12);
    transform: translateY(-1px);
}

/* ── CONTACT ─────────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition:
        border-color var(--transition),
        transform var(--transition);
}
.contact-card:hover {
    border-color: rgba(79, 142, 247, 0.35);
    transform: translateY(-3px);
}
.contact-card.no-link {
    cursor: default;
}
.contact-card.no-link:hover {
    transform: none;
    border-color: var(--border);
}
.contact-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(79, 142, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.contact-icon svg {
    width: 20px;
    height: 20px;
}
.contact-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
    font-family: var(--mono);
    letter-spacing: 1px;
}
.contact-val {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
    padding: 2.5rem 5%;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
footer p {
    font-size: 0.85rem;
    color: var(--text-dim);
}
footer strong {
    color: var(--text-muted);
}
.footer-sub {
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

/* ── REVEAL ANIMATIONS ───────────────────────────────────────── */
/* Non-hero sections: hidden until scrolled into view */
section:not(#hero) .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
section:not(#hero) .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero: pure CSS animation, no JS needed */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#hero .reveal {
    animation: fadeUp 0.7s ease forwards;
}
#hero .delay-1 {
    animation-delay: 0.12s;
    opacity: 0;
}
#hero .delay-2 {
    animation-delay: 0.24s;
    opacity: 0;
}
#hero .delay-3 {
    animation-delay: 0.36s;
    opacity: 0;
}
#hero .delay-4 {
    animation-delay: 0.48s;
    opacity: 0;
}

.delay-1 {
    transition-delay: 0.12s;
}
.delay-2 {
    transition-delay: 0.24s;
}
.delay-3 {
    transition-delay: 0.36s;
}
.delay-4 {
    transition-delay: 0.48s;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-photo {
        width: 200px;
        height: 200px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
@media (max-width: 680px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.97);
        padding: 1.5rem 5%;
        gap: 1.2rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open {
        display: flex;
    }
    .hamburger {
        display: flex;
    }
    .hero-content {
        flex-direction: column-reverse;
        gap: 2rem;
        padding-top: 100px;
    }
    .hero-photo {
        width: 160px;
        height: 160px;
    }
    .hero-name {
        font-size: 2.2rem;
    }
    .scroll-hint {
        display: none;
    }
    .timeline {
        padding-left: 1rem;
    }
}
