:root {
    --bg: #0f1722;
    --bg-soft: #162234;
    --surface: #1d2b3f;
    --surface-alt: #22344c;
    --text: #e6edf7;
    --text-muted: #aeb9c9;
    --line: #31455f;
    --accent: #7cc6ff;
    --accent-strong: #9ed5ff;
    --shadow: 0 12px 30px rgba(4, 10, 20, 0.35);
    --radius: 14px;
    --space-1: 0.5rem;
    --space-2: 0.75rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, #243955 0%, transparent 45%),
        radial-gradient(circle at 90% 100%, #1a2740 0%, transparent 35%),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    color: var(--accent-strong);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: var(--space-3);
    background: var(--accent);
    color: #09111e;
    padding: var(--space-2) var(--space-3);
    border-radius: 8px;
    font-weight: 700;
    z-index: 1000;
}

.skip-link:focus {
    top: var(--space-3);
}

.container {
    width: min(var(--max-width), calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(199, 219, 247, 0.12);
    background: rgba(14, 22, 35, 0.88);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: var(--space-3);
}

.brand {
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.site-nav a {
    color: var(--text-muted);
    font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--text);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid transparent;
    background: var(--accent);
    color: #071223;
    padding: 0.68rem 1.1rem;
    border-radius: 10px;
    font-weight: 800;
    transition: background-color 160ms ease, border-color 160ms ease;
    box-shadow: 0 8px 20px rgba(124, 198, 255, 0.25);
}

.button:hover,
.button:focus-visible {
    background: var(--accent-strong);
    color: #071223;
}

.button-small {
    padding: 0.5rem 0.9rem;
    font-size: 0.86rem;
}

.button-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
    box-shadow: none;
}

.button-ghost:hover,
.button-ghost:focus-visible {
    background: var(--surface-alt);
    border-color: var(--text-muted);
    color: var(--text);
}

.hero {
    padding: var(--space-6) 0 var(--space-5);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    gap: var(--space-5);
    align-items: stretch;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    margin: 0 0 var(--space-2);
}

h1,
h2,
h3 {
    color: var(--text);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    max-width: 15ch;
    margin-bottom: var(--space-3);
}

.lead {
    color: var(--text-muted);
    max-width: 62ch;
    margin: 0;
}

.hero-actions {
    margin-top: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.profile-panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface), #182639);
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: var(--shadow);
}

.profile-panel img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2f4560;
    margin-bottom: var(--space-3);
}

.profile-panel h2 {
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
}

.profile-panel p {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: var(--space-3);
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.contact-list a {
    color: var(--text);
    font-weight: 600;
}

.section {
    margin-bottom: var(--space-5);
    padding: var(--space-5);
    background: rgba(24, 37, 56, 0.7);
    border: 1px solid rgba(195, 216, 244, 0.13);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    margin-bottom: var(--space-3);
}

.section p {
    margin-top: 0;
    color: var(--text-muted);
}

.detail-list,
.stack-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
}

.detail-list li,
.stack-list li {
    margin-bottom: 0.42rem;
}

.detail-list strong {
    color: var(--text);
    font-weight: 700;
}

.skill-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.7rem;
}

.skill-grid li {
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    background: var(--surface-alt);
    border: 1px solid #385072;
    color: var(--text);
    text-align: center;
    font-weight: 600;
}

.project-grid {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: var(--space-4);
    background: #1d2c40;
    transition: border-color 160ms ease;
}

.project-card:hover {
    border-color: #5a7fa5;
}

.project-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.7rem;
}

.project-card p {
    font-size: 0.96rem;
    margin-bottom: 0.95rem;
}

.project-card a {
    font-weight: 700;
}

.experience-card {
    border-left: 3px solid #5ca9df;
    padding-left: var(--space-3);
    margin-bottom: var(--space-4);
}

.experience-card .meta {
    margin: 0;
    color: #d2dfef;
    font-weight: 700;
}

.resume-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.resume-preview {
    margin-top: var(--space-3);
    width: 100%;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0d1522;
}

.resume-intro,
.resume-fallback {
    color: var(--text-muted);
    font-size: 0.98rem;
}

.resume-intro {
    margin-bottom: 0;
}

.resume-fallback {
    margin-top: var(--space-2);
    word-break: break-word;
}

.site-footer {
    border-top: 1px solid rgba(199, 219, 247, 0.15);
    margin-top: var(--space-4);
}

.site-footer p {
    margin: 0;
    padding: 1.1rem 0 1.35rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.93rem;
}

@media (max-width: 900px) {
    .site-nav {
        display: none;
    }

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

    .profile-panel {
        max-width: 420px;
    }

    .resume-preview {
        min-height: 500px;
    }
}

@media (max-width: 640px) {
    .section {
        padding: var(--space-4);
    }

    .hero {
        padding-top: var(--space-5);
    }

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

    .button {
        width: 100%;
    }

    .resume-preview {
        min-height: 430px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto;
    }
}
