/* Theme tokens for spacing, palette, and typography. */
:root {
    --bg: #030712;
    --bg-soft: #0f172b;
    --bg-panel: #0b1121;
    --text: #f7fbff;
    --muted: #94a3b8;
    --accent: #51d5ff;
    --accent-strong: #f4c95d;
    --border: rgba(255, 255, 255, 0.08);
    --radius-lg: 28px;
    --radius-sm: 16px;
    --shadow: 0 20px 45px rgba(2, 6, 23, 0.55);
    --space-1: 0.75rem;
    --space-2: 1.25rem;
    --space-3: 2rem;
    --space-4: 3rem;
    --font-body: "Space Grotesk", "Inter", system-ui, sans-serif;
    --bg-ambient: 
        radial-gradient(
            1200px 600px at 50% -10%,
            rgba(81, 213, 255, 0.06),
            transparent 60%
        );
}

body {
    font-family: var(--font-body);
    background:
        var(--bg-ambient),
        var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

body.is-light {
    --bg: #f5f7fb;
    --bg-soft: #ffffff;
    --bg-panel: #fdfdfd;
    --text: #1a1a1a;
    --muted: #6b7280;
    --border: rgba(15, 23, 42, 0.12);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-2);
}

.hero-viewport {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}

@supports (height: 100dvh) {
    .hero-viewport {
        min-height: 100dvh;
    }
}

.hero-card {
    flex: 0 1 100%;
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(145deg, #030712, #0e1b36 65%, rgba(82, 198, 255, 0.25));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--space-3) 0 var(--space-4); /* ⬅️ remove horizontal padding */
    display: grid;
    grid-template-rows: auto 1fr;
    row-gap: var(--space-3);
    position: relative;
}

body.is-light .hero-card {
    background:
        radial-gradient(
            900px 400px at 15% 10%,
            rgba(81, 213, 255, 0.18),
            transparent 60%
        ),
        radial-gradient(
            700px 350px at 85% 0%,
            rgba(244, 201, 93, 0.18),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f1f5f9 70%,
            #eef2f7 100%
        );
    position: relative;
}

body.is-light .hero-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--bg)
    );
    pointer-events: none;
}

body:not(.is-light) .hero-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(3, 7, 18, 0.85)
    );
    pointer-events: none;
}

.hero__row {
    width: 100%;
}

.hero__content-row {
    display: flex;
    align-items: center;
}

.hero__content-row .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.hero__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin: 0;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text);
}

.hero__links {
    list-style: none;
    display: flex;
    gap: var(--space-2);
    padding: 0;
    margin: 0;
}

.hero__links a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    padding: 0.35rem 0.4rem;
    border-radius: 999px;
    transition: background 0.3s ease;
}

.hero__links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 50px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hero__content {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-2);
    min-height: 0;
}

.hero__eyebrow,
.eyebrow {
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: var(--muted);
    font-size: 0.8rem;
}

.hero__eyebrow {
    margin-bottom: var(--space-1);
}

body.is-light .hero__eyebrow {
    color: #475569;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

.hero__lead {
    font-size: 1.1rem;
    color: var(--muted);
}

.hero__credential {
    font-size: 0.95rem;
    color: var(--muted);
    letter-spacing: 0.05rem;
    margin-top: -0.5rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.hero__tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: calc(var(--space-1) * -1) 0 0;
}

.hero__tags li {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-1);
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero__stats li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

body.is-light .hero__stats li {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero__stats span {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

/* Layout helpers for stacked sections. */
.section {
    position: relative;
    margin-top: var(--space-4);
    color: var(--text);
}

.section__header {
    max-width: 720px;
    margin-bottom: var(--space-2);
}

.section__header h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 0.35rem 0 0;
}

.section__intro {
    max-width: 720px;
    color: var(--muted);
    margin-bottom: var(--space-3);
    line-height: 1.7;
}

.section__body {
    max-width: 860px;
    color: var(--text);
    line-height: 1.8;
}

.section--grid .skills-grid,
.section--panel .building-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-2);
}

.card {
    background: linear-gradient(
        180deg,
        var(--bg-panel),
        rgba(11, 17, 33, 0.95)
    );
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 55px rgba(2, 6, 23, 0.55);
}

.skill-card h3 {
    margin-bottom: 0.25rem;
}

.skill-card__level {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.skill-card__details {
    color: var(--text);
    line-height: 1.6;
}

.building-card__header h3 {
    margin-bottom: 0.2rem;
}

.building-card__summary {
    margin: var(--space-1) 0 var(--space-2);
    color: var(--text);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background: linear-gradient(135deg, rgba(81, 213, 255, 0.25), rgba(249, 205, 91, 0.25));
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.is-light .pill {
    background: linear-gradient(
        135deg,
        rgba(81, 213, 255, 0.18),
        rgba(249, 205, 91, 0.18)
    );
    color: #1e293b;
    border: 1px solid rgba(15, 23, 42, 0.15);
}

body.is-light .pill:hover {
    background: linear-gradient(
        135deg,
        rgba(81, 213, 255, 0.28),
        rgba(249, 205, 91, 0.28)
    );
}

.section--panel {
    position: relative;
    padding-top: calc(var(--space-4) + 40px);
    background:
        radial-gradient(
            900px 420px at 85% -80px,
            rgba(81, 213, 255, 0.08),
            transparent 70%
        );
}

.section--panel::after {
    content: "";
    position: absolute;
    bottom: -160px;
    left: 0;
    right: 0;
    height: 160px;
    background: radial-gradient(
        900px 360px at 15% 100%,
        rgba(81, 213, 255, 0.06),
        transparent 75%
    );
    pointer-events: none;
}

.section--contact .contact-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.contact-panel p {
    color: var(--text);
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #030712;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(1, 25, 63, 0.2);
}

.button--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.is-light .button--ghost {
    border: 1px solid rgba(15, 23, 42, 0.25);
}

body.is-light .section--panel {
    background:
        radial-gradient(
            circle at top right,
            rgba(81, 213, 255, 0.12),
            transparent 60%
        );
}

body.is-light .card {
    background: #ffffff;
    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.08),
        0 2px 6px rgba(15, 23, 42, 0.04);
}

.button--link {
    padding: 0.65rem 1.1rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.contact-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.site-footer {
    text-align: center;
    margin-top: var(--space-4);
    padding: var(--space-2);
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 880px) {
    .hero__nav {
        flex-direction: column;
    }

    .hero__links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__stats {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

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