:root {
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --color-bg: #f9fafc;
    --color-surface: rgba(255, 255, 255, 0.75);
    --color-surface-strong: #ffffff;
    --color-text: #12141d;
    --color-text-muted: #5b6270;
    --color-primary: #4f46e5;
    --color-primary-soft: rgba(79, 70, 229, 0.12);
    --color-border: rgba(18, 20, 29, 0.08);
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-hard: 0 25px 80px rgba(15, 23, 42, 0.15);
    --hero-gradient: radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 55%),
        radial-gradient(circle at center right, rgba(14, 165, 233, 0.15), transparent 50%),
        linear-gradient(180deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.05));
}

body[data-theme="dark"] {
    --color-bg: #0f172a;
    --color-surface: rgba(15, 23, 42, 0.75);
    --color-surface-strong: #0b1324;
    --color-text: #edf2ff;
    --color-text-muted: #9aa5ce;
    --color-primary: #818cf8;
    --color-primary-soft: rgba(129, 140, 248, 0.14);
    --color-border: rgba(129, 140, 248, 0.18);
    --shadow-soft: 0 20px 45px rgba(2, 6, 23, 0.55);
    --shadow-hard: 0 25px 80px rgba(8, 11, 30, 0.75);
    --hero-gradient: radial-gradient(circle at top left, rgba(129, 140, 248, 0.18), transparent 65%),
        radial-gradient(circle at center right, rgba(94, 234, 212, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(129, 140, 248, 0.12), rgba(14, 165, 233, 0.08));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    display: block;
}

main {
    display: grid;
    gap: 96px;
    padding: 0 32px 128px;
    margin: 0 auto;
    max-width: 1100px;
}
section {
    scroll-margin-top: 120px;
}

.hero {
    position: relative;
    padding: 48px 32px 120px;
    background: var(--hero-gradient);
    overflow: visible;
}

.nav {
    position: sticky;
    top: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1100px;
    margin: 16px auto 20px;
    padding: 14px 24px;
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    border-radius: 18px;
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    will-change: opacity, transform;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.04rem;
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    font-weight: 500;
}

.nav-links a {
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.theme-toggle {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 999px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle span {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle .icon-sun {
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
}

.theme-toggle .icon-moon {
    border-radius: 50%;
    background: currentColor;
    overflow: hidden;
    transform: rotate(-15deg);
}

.theme-toggle .icon-moon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--color-bg);
    transform: translateX(5px);
    opacity: 0.92;
}

.theme-toggle .icon-moon::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 6px 3px 0 rgba(255, 255, 255, 0.35), 3px 7px 0 rgba(255, 255, 255, 0.25);
    opacity: 0.85;
}

body[data-theme="light"] .icon-sun {
    opacity: 1;
}

body[data-theme="dark"] .icon-moon {
    opacity: 1;
}

.hero-content {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    display: grid;
    gap: 24px;
}

.eyebrow {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.hero h1 {
    font-size: clamp(2.6rem, 5vw, 3.6rem);
    line-height: 1.1;
    margin: 0;
}

.hero-copy {
    color: var(--color-text-muted);
    margin: 0 auto;
    max-width: 540px;
}

.hero-cta {
    display: inline-flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hard);
}

.btn.ghost {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text);
}

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

.hero-card {
    margin: 72px auto 0;
    padding: 28px 32px;
    max-width: 420px;
    border-radius: 28px;
    background: var(--color-surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 24px;
}


.hero-card,
.skills-grid article,
.testimonial-grid figure {
    transition: transform 0.4s ease, box-shadow 0.45s ease;
}

.hero-card:hover,
.skills-grid article:hover,
.testimonial-grid figure:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hard);
}
.profile {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 20px;
    background: #d4d9f0;
}

.profile h2 {
    margin: 0;
    font-size: 1.15rem;
}

.profile p {
    margin: 4px 0 0;
    color: var(--color-text-muted);
}

.stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.stats span {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.section-heading {
    display: grid;
    gap: 12px;
    max-width: 620px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
}

.about {
    display: grid;
    gap: 32px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}

.about-grid p {
    margin: 0;
    color: var(--color-text-muted);
}

.about-grid .details {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 24px;
    border-radius: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.details span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.details strong {
    display: block;
    margin-top: 8px;
}

.skills {
    display: grid;
    gap: 36px;
}

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

.skills-grid article {
    padding: 24px 26px;
    border-radius: 20px;
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 14px;
}

.skills-grid p {
    margin: 0;
    color: var(--color-text-muted);
}

.skills-grid ul {
    margin: 0;
    padding-left: 18px;
    color: var(--color-text);
}

.projects {
    display: grid;
    gap: 36px;
}

.project-list {
    display: grid;
    gap: 24px;
}

.project-list article {
    padding: 24px 28px;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: grid;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.project-list article:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hard);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.project-meta span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.project-link {
    font-weight: 600;
    color: var(--color-primary);
}

.experience {
    display: grid;
    gap: 36px;
}

.timeline {
    position: relative;
    display: grid;
    gap: 32px;
    padding-left: 4px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 16px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-border));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.85;
}

.experience.reveal.is-visible .timeline::before {
    transform: scaleY(1);
}

.timeline .timeline-item {
    display: flex;
    gap: 24px;
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.timeline .timeline-item:nth-child(1) {
    transition-delay: 0.05s;
}
.timeline .timeline-item:nth-child(2) {
    transition-delay: 0.12s;
}
.timeline .timeline-item:nth-child(3) {
    transition-delay: 0.19s;
}
.timeline .timeline-item:nth-child(4) {
    transition-delay: 0.26s;
}
.timeline .timeline-item:nth-child(5) {
    transition-delay: 0.33s;
}

.timeline-dot {
    position: relative;
    min-width: 24px;
    height: 24px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 6px var(--color-primary-soft);
    transform: scale(0.8);
    opacity: 0.65;
    transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease;
}

.timeline .timeline-item.is-visible .timeline-dot {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 8px var(--color-primary-soft);
}

.timeline h3 {
    margin: 0;
}

.timeline span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.timeline p {
    margin: 12px 0 0;
    color: var(--color-text-muted);
}

.testimonials {
    display: grid;
    gap: 36px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.testimonial-grid figure {
    margin: 0;
    padding: 24px 28px;
    border-radius: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: grid;
    gap: 18px;
}

blockquote {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

figcaption strong {
    display: block;
}

figcaption span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.contact {
    display: grid;
}

.contact-card {
    display: grid;
    gap: 32px;
    padding: 42px;
    border-radius: 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.contact-links {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.contact-links a {
    color: var(--color-primary);
    font-weight: 600;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.contact-form label {
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-strong);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.footer {
    padding: 36px 32px 64px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.to-top {
    display: inline-block;
    margin-top: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.is-visible,
    .timeline .timeline-item,
    .timeline .timeline-item.is-visible {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .timeline::before {
        transition: none !important;
        transform: scaleY(1) !important;
    }

    .timeline .timeline-item .timeline-dot {
        transition: none !important;
        transform: scale(1) !important;
        opacity: 1 !important;
        box-shadow: 0 0 0 6px var(--color-primary-soft);
    }
}

@media (max-width: 960px) {
    .hero {
        padding-bottom: 96px;
    }

    .nav-links {
        display: none;
    }

    main {
        padding-left: 24px;
        padding-right: 24px;
    }

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

    .about-grid .details {
        grid-column: auto;
    }

    .hero-card {
        margin-top: 56px;
    }

    .contact-card {
        padding: 32px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 36px 22px 72px;
    }

    main {
        padding: 0 18px 96px;
    }

    .hero-content {
        gap: 18px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        font-size: 0.8rem;
    }

    .project-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-card {
        padding: 26px;
    }
}




