*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --text-primary: #e8e8ed;
    --text-secondary: #9494a0;
    --text-muted: #5e5e6e;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVBAR ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

#navbar.scrolled {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-social a {
    color: var(--text-muted);
    transition: color 0.2s;
    display: inline-flex;
    padding: 6px;
    border-radius: 6px;
}

.nav-social a:hover {
    color: var(--accent-light);
    background: var(--accent-glow);
}

.nav-social svg {
    width: 16px;
    height: 16px;
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent-light);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    background: var(--gradient-1);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 100px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
    z-index: 0;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero-avatar-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    position: relative;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-1);
    animation: spin 8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-avatar, .avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    background: var(--bg-card);
}

.avatar-placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-light);
}

.hero-overline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
}

.hero-tech-stack {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.tech-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 6px 14px;
    background: var(--accent-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    color: var(--accent-light);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator span {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== SECTIONS ===== */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 48px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.section-title-light {
    color: var(--text-primary);
}

/* ===== ABOUT ===== */
#about {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-content {
    max-width: 720px;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== FOCUS AREAS ===== */
#focus {
    background: var(--bg-primary);
    position: relative;
}

.focus-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.05;
    z-index: 0;
}

#focus .container {
    position: relative;
    z-index: 1;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.focus-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.focus-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.focus-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
}

.focus-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 20px 24px 0;
}

.focus-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 8px 24px 24px;
}

/* ===== EXPERIENCE / TIMELINE ===== */
#experience {
    background: var(--bg-primary);
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    z-index: 1;
}

.timeline-item:first-child .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.timeline-role {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-period {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-company {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 12px;
}

.timeline-location {
    color: var(--text-muted);
    font-weight: 400;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.timeline-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-highlights li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    line-height: 1.6;
}

.timeline-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-highlights .highlight-title {
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-highlights.collapsed li:nth-child(n+3) {
    display: none;
}

.show-more-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-light);
    color: var(--accent-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s, color 0.2s;
}

.show-more-btn:hover {
    background: var(--accent-glow);
}

.timeline-highlights.collapsed + .show-more-btn {
    display: inline-flex;
}

.timeline-screenshot {
    margin-top: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.timeline-screenshot img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.subsidiary-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.subsidiary-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.subsidiary-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.subsidiary-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.subsidiary-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.timeline-screenshot + .timeline-highlights,
.subsidiary-card .timeline-screenshot + * {
    margin-top: 0;
}

/* ===== SKILLS ===== */
#skills {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: border-color 0.3s, transform 0.3s;
}

.skill-category:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.skill-cat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
}

/* ===== CERTIFICATIONS ===== */
#certifications {
    background: var(--bg-primary);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

.cert-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px);
}

.cert-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-glow);
}

.cert-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-light);
}

.cert-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-issuer {
    font-size: 0.8rem;
    color: var(--accent-light);
    margin-bottom: 4px;
}

.cert-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===== FOOTER / CONTACT ===== */
#contact {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 100px 24px;
}

.contact-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.contact-btn {
    margin-bottom: 64px;
}

.footer-bottom {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contact-links {
    margin-bottom: 64px;
}

.contact-links-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.link-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.link-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: border-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.link-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.link-card svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.link-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .certs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .focus-grid {
        grid-template-columns: 1fr;
    }

    .subsidiary-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    section {
        padding: 72px 0;
    }

    .nav-social {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-social a {
    color: var(--text-secondary);
    transition: color 0.2s;
    display: inline-flex;
    padding: 4px;
}

.nav-social a:hover {
    color: var(--accent-light);
}

.nav-social svg {
    width: 18px;
    height: 18px;
}

    .hero-name {
        font-size: 2.2rem;
    }

    .certs-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -30px;
        width: 12px;
        height: 12px;
    }

    .timeline-header {
        flex-direction: column;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .timeline-screenshot img {
        max-height: 200px;
    }

    .link-grid {
        flex-direction: column;
        align-items: center;
    }

    .link-card {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}
