:root {
    --bg: #f7f7f9;
    --surface: #ffffff;
    --surface-soft: #f0f1f4;
    --ink: #202126;
    --muted: #696d78;
    --line: #dedfe5;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --shadow: 0 18px 55px rgba(20, 23, 31, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, #fbfbfc 0%, var(--bg) 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body.dark {
    --bg: #14161c;
    --surface: #1d2028;
    --surface-soft: #272b35;
    --ink: #f4f6fb;
    --muted: #b1b6c3;
    --line: #343946;
    --accent: #7dd3fc;
    --accent-soft: #193345;
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    background: radial-gradient(circle at 80% 12%, rgba(125, 211, 252, 0.12), transparent 28%),
        linear-gradient(180deg, #11131a 0%, var(--bg) 100%);
}

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

ul {
    list-style: none;
}

.site-nav {
    position: sticky;
    top: 18px;
    z-index: 20;
    width: min(1150px, calc(100% - 32px));
    min-height: 78px;
    margin: 18px auto 0;
    padding: 14px 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

body.dark .site-nav {
    background: rgba(29, 32, 40, 0.82);
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links a {
    min-width: 96px;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    text-align: center;
    transition: background 180ms ease, color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: var(--surface-soft);
    color: var(--ink);
}

.theme-toggle {
    justify-self: end;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.4rem;
}

main {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.hero {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 44px;
    padding: 48px 0 64px;
}

.hero-copy {
    max-width: 820px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.eyebrow span {
    width: 48px;
    height: 2px;
    background: var(--line);
}

.eyebrow.center {
    justify-content: center;
}

.eyebrow.center span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--line);
}

h1 {
    margin-top: 24px;
    font-size: clamp(3rem, 6.2vw, 5.8rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.role {
    margin-top: 24px;
    color: var(--ink);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 800;
}

.summary,
.about-text,
.project-card p,
.contact-lead {
    color: var(--muted);
    font-size: 1.08rem;
}

.summary {
    max-width: 660px;
    margin-top: 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.button {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 34px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-weight: 800;
}

.button.primary {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
}

.button.secondary {
    background: var(--surface);
}

.hero-visual {
    aspect-ratio: 1;
    width: min(100%, 430px);
    justify-self: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    box-shadow: var(--shadow);
}

.hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.section {
    padding: 92px 0;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 34px;
}

.section-heading h2,
.contact-section h2 {
    margin-top: 18px;
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.06;
    letter-spacing: 0;
}

.about {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    border-top: 1px solid var(--line);
}

.about-text {
    display: grid;
    gap: 18px;
}

.skill-grid,
.project-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.card,
.timeline-card,
.project-card,
.contact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.card {
    padding: 28px;
}

.card h3,
.timeline-card h3,
.project-card h3 {
    font-size: 1.35rem;
    line-height: 1.25;
}

.card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.card li,
.achievement-list span {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 700;
}

.timeline-card {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 28px;
    padding: 30px;
}

.timeline-card ul {
    display: grid;
    gap: 12px;
    color: var(--muted);
}

.timeline-card li {
    padding-left: 18px;
    position: relative;
}

.timeline-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.label {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
    min-height: 245px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.project-card p:not(.label) {
    margin-top: 18px;
}

.project-link {
    margin-top: auto;
    padding-top: 24px;
    color: var(--ink);
    font-weight: 800;
}

.achievement-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-section {
    text-align: center;
}

.contact-section h2 {
    font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.contact-lead {
    max-width: 740px;
    margin: 20px auto 48px;
}

.contact-grid {
    max-width: 1008px;
    margin: 0 auto;
}

.contact-card {
    min-height: 110px;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 24px;
    padding: 20px 28px;
    text-align: left;
}

.contact-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-soft);
    font-weight: 900;
}

.contact-card strong,
.contact-card small {
    display: block;
}

.contact-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.98rem;
    word-break: break-word;
}

.contact-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 1.25rem;
}

footer {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 44px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .site-nav {
        grid-template-columns: 1fr auto;
        border-radius: 28px;
    }

    .nav-links {
        grid-column: 1 / -1;
        justify-content: space-between;
        order: 3;
        width: 100%;
    }

    .nav-links a {
        min-width: 0;
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .hero,
    .about,
    .timeline-card {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 56px;
    }

    .hero-visual {
        justify-self: start;
        width: min(100%, 420px);
    }

    .project-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    main,
    footer {
        width: min(100% - 28px, 1280px);
    }

    .site-nav {
        width: calc(100% - 20px);
        top: 10px;
        margin-top: 10px;
        padding: 12px;
    }

    .brand {
        font-size: 1.05rem;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        padding: 9px 7px;
        font-size: 0.84rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    h1 {
        font-size: clamp(2.8rem, 16vw, 4.2rem);
    }

    .section {
        padding: 68px 0;
    }

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

    .button {
        width: 100%;
    }

    .contact-card {
        grid-template-columns: 52px minmax(0, 1fr) 18px;
        gap: 14px;
        padding: 18px;
    }

    .contact-icon {
        width: 52px;
        height: 52px;
    }
}
