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

:root {
    --bg: #F8F9FA;
    --surface: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --accent: #2563EB;
    --accent-light: rgba(37, 99, 235, 0.08);
    --accent-hover: #1D4ED8;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-lg: 16px;
}

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

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

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

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

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}

.nav-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
}

/* Hero */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: rgba(248, 249, 250, 0.75);
    will-change: height;
    padding: 0;
    margin: 0;
}

.hero-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 0;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--surface);
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.02);
}

.hero-name {
    font-family: 'Poppins', sans-serif;
    font-size: 56px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-tag {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    background: var(--accent-light);
    padding: 4px 14px;
    border-radius: 20px;
    transition: opacity 0.3s ease;
}

/* Full-page canvas background */
.bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--accent);
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}
.scroll-indicator.hidden {
    opacity: 0;
}
.scroll-indicator svg {
    animation: scrollBounce 1.6s ease-in-out infinite;
}
.scroll-indicator svg:nth-child(2) {
    margin-top: -12px;
    animation-delay: 0.2s;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* Hero extras — content that appears as hero compresses */
.hero-extras {
    padding: 64px 0 48px;
    position: relative;
    z-index: 1;
    background: var(--bg);
}

.hero-extras h2 {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 400;
}

.hero-extras p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.hero-extras .cta-buttons {
    margin-bottom: 32px;
}

.hero-extras .social-links {
    display: flex;
    gap: 10px;
}

.hero-extras h2,
.hero-extras p,
.hero-extras .cta-buttons,
.hero-extras .social-links {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-extras.in-view h2,
.hero-extras.in-view p,
.hero-extras.in-view .cta-buttons,
.hero-extras.in-view .social-links {
    opacity: 1;
    transform: translateY(0);
}
.hero-extras.in-view p { transition-delay: 0.1s; }
.hero-extras.in-view .cta-buttons { transition-delay: 0.2s; }
.hero-extras.in-view .social-links { transition-delay: 0.3s; }

.social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Sections */
section {
    padding: 96px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 56px;
}
.section-title h2,
.section-title p {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.section-title.in-view h2,
.section-title.in-view p {
    opacity: 1;
    transform: translateY(0);
}
.section-title p {
    transition-delay: 0.1s;
}

.anim-card {
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-card:nth-child(odd) {
    transform: translateX(-40px) scale(0.94);
}
.anim-card:nth-child(even) {
    transform: translateX(40px) scale(0.94);
}
.in-view .anim-card {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) scale(1);
}
.anim-card:nth-child(2) { transition-delay: 0.05s; }
.anim-card:nth-child(3) { transition-delay: 0.10s; }
.anim-card:nth-child(4) { transition-delay: 0.15s; }
.anim-card:nth-child(5) { transition-delay: 0.20s; }
.anim-card:nth-child(6) { transition-delay: 0.25s; }
.anim-card:nth-child(7) { transition-delay: 0.30s; }
.anim-card:nth-child(8) { transition-delay: 0.35s; }
.anim-card:nth-child(9) { transition-delay: 0.40s; }

.anim-item {
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.timeline .anim-item:nth-child(odd) {
    transform: translateX(-30px) scale(0.96);
}
.timeline .anim-item:nth-child(even) {
    transform: translateX(30px) scale(0.96);
}
.contact-info .anim-item {
    transform: translateY(30px) scale(0.93);
}
.in-view .anim-item {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0) translateY(0) scale(1);
}
.anim-item:nth-child(2) { transition-delay: 0.08s; }
.anim-item:nth-child(3) { transition-delay: 0.16s; }
.anim-item:nth-child(4) { transition-delay: 0.24s; }
.anim-item:nth-child(5) { transition-delay: 0.32s; }

.section-title h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.skill-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
}

.skill-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12);
}

.project-header {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    padding: 28px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.project-body {
    padding: 24px;
}

.project-body p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.project-body .btn {
    margin-top: 4px;
    padding: 8px 18px;
    font-size: 13px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), #7C3AED);
}

.timeline-item {
    margin-bottom: 32px;
    position: relative;
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: calc(50% - 36px);
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.timeline-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: var(--accent);
    margin-bottom: 2px;
    font-weight: 600;
}

.timeline-content h4 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 12px;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg);
    z-index: 1;
}

/* Contact */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.contact-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.contact-item h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin-bottom: 8px;
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-social .social-link {
    width: 40px;
    height: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: var(--surface);
        border-left: 1px solid var(--border);
        padding: 80px 24px 24px;
        gap: 4px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 10px;
        display: block;
    }

    .nav-overlay.show {
        display: block;
    }

    .hero-name {
        font-size: 36px;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

    .hero-tag {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 3px 12px;
    }

    .hero-extras h2 {
        font-size: 20px;
    }

    .hero-extras p {
        font-size: 15px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-content {
        width: calc(100% - 40px);
        margin-left: 40px !important;
    }

    .timeline-dot {
        left: 0;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .skills-grid,
    .projects-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 28px;
    }

    .profile-img {
        width: 160px;
        height: 160px;
    }

    .hero-tag {
        font-size: 10px;
        letter-spacing: 1.5px;
        padding: 2px 10px;
    }

    .hero-extras h2 {
        font-size: 18px;
    }

    .hero-extras p {
        font-size: 14px;
    }

    section {
        padding: 64px 0;
    }

    .container {
        padding: 0 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-name {
        font-size: 44px;
    }

    .profile-img {
        width: 240px;
        height: 240px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}