﻿:root {
    --bg: #f6f7fb;
    --bg-elevated: #ffffff;
    --bg-soft: #eef0f7;
    --text: #171d33;
    --text-muted: #5b6478;
    --border: #e3e6ef;
    --brand: #314570;
    --accent: #3d5af1;
    --accent-2: #14b8a6;
    --shadow: 0 10px 30px -12px rgba(23, 29, 51, 0.16);
    --shadow-lg: 0 24px 60px -20px rgba(23, 29, 51, 0.28);
    --radius: 16px;
    --maxw: 1080px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg: #0d1220;
    --bg-elevated: #141b2e;
    --bg-soft: #182036;
    --text: #e9ecf7;
    --text-muted: #9aa4c2;
    --border: #262f48;
    --brand: #9fb2e8;
    --accent: #7b93ff;
    --accent-2: #2dd4bf;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --bg: #0d1220;
        --bg-elevated: #141b2e;
        --bg-soft: #182036;
        --text: #e9ecf7;
        --text-muted: #9aa4c2;
        --border: #262f48;
        --brand: #9fb2e8;
        --accent: #7b93ff;
        --accent-2: #2dd4bf;
        --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
        --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- NAV ---------- */
header.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(14px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: var(--maxw);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 1.05rem;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
}

nav.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

    nav.nav-links a {
        padding: 8px 14px;
        border-radius: 999px;
        font-size: 0.92rem;
        font-weight: 500;
        color: var(--text-muted);
        transition: background 0.2s ease, color 0.2s ease;
        white-space: nowrap;
    }

        nav.nav-links a:hover {
            color: var(--text);
            background: var(--bg-soft);
        }

        nav.nav-links a.active {
            color: var(--accent);
            background: var(--bg-soft);
        }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.15s ease, background 0.2s ease;
}

    .icon-btn:hover {
        background: var(--bg-soft);
        transform: translateY(-1px);
    }

.menu-toggle {
    display: none;
}

@media (max-width: 780px) {
    nav.nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    nav.nav-links.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
        gap: 2px;
        box-shadow: var(--shadow);
    }

        nav.nav-links.open a {
            width: 100%;
            padding: 12px 14px;
        }
}

/* ---------- SECTION SCAFFOLDING ---------- */
section {
    padding: 96px 0;
    border-bottom: 1px solid var(--border);
}

    section:last-of-type {
        border-bottom: none;
    }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 10px;
}

h2.section-title {
    font-size: clamp(1.6rem, 2.6vw, 2.15rem);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.section-lede {
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 0 44px;
    font-size: 1.02rem;
}

/* Content is fully visible by default (no-JS / slow-JS safe).
     Only when the tiny head script confirms JS is running do we hide
     .reveal elements ahead of their scroll-in animation. */
html.js-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    html.js-ready .reveal.in-view {
        opacity: 1;
        transform: translateY(0);
    }

/* ---------- HERO ---------- */
section.hero {
    padding: 76px 0 90px;
    position: relative;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    top: -140px;
    right: -160px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent), transparent 70%);
    opacity: 0.18;
    filter: blur(10px);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
}

@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 22px;
}

    .hero-kicker .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent-2);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent);
    }

h1.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
}

    h1.hero-title span {
        background: linear-gradient(120deg, var(--brand), var(--accent));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.hero-sub {
    font-size: 1.12rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 0 32px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.94rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .btn:hover {
        transform: translateY(-2px);
    }

.btn-primary {
    background: linear-gradient(120deg, var(--brand), var(--accent));
    color: #fff;
    box-shadow: var(--shadow);
}

    .btn-primary:hover {
        box-shadow: var(--shadow-lg);
    }

.btn-ghost {
    background: var(--bg-elevated);
    border-color: var(--border);
    color: var(--text);
}

    .btn-ghost:hover {
        background: var(--bg-soft);
    }

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 640px) {
    .stat-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px;
    text-align: left;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--brand);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-ring {
    width: min(320px, 80vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--brand), var(--accent) 60%, var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    position: relative;
}

    .avatar-ring::before {
        content: "";
        position: absolute;
        inset: 10px;
        border-radius: 50%;
        background: var(--bg);
        opacity: 0.06;
    }

.avatar-mono {
    font-size: clamp(3.4rem, 9vw, 5rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

/* ---------- ABOUT ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: start;
}

@media (max-width: 860px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-text p {
    margin: 0 0 18px;
    color: var(--text);
}

.quote-block {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 18px;
    margin: 26px 0;
    font-style: italic;
    color: var(--text-muted);
}

.trait-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trait {
    display: flex;
    gap: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.trait-emoji {
    font-size: 1.4rem;
    line-height: 1;
}

.trait h4 {
    margin: 0 0 4px;
    font-size: 0.98rem;
}

.trait p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ---------- CARDS GRID (now working on) ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
        border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    }

.card-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card h3 {
    margin: 4px 0 0;
    font-size: 1.05rem;
}

.card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    flex-grow: 1;
}

.card .card-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 6px;
}

.card .tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-2);
    background: color-mix(in srgb, var(--accent-2) 14%, transparent);
    padding: 3px 10px;
    border-radius: 999px;
    align-self: flex-start;
}

/* ---------- TIMELINE ---------- */
.timeline {
    position: relative;
    padding-left: 28px;
}

    .timeline::before {
        content: "";
        position: absolute;
        left: 6px;
        top: 4px;
        bottom: 4px;
        width: 2px;
        background: linear-gradient(var(--border), var(--border));
    }

.timeline-item {
    position: relative;
    padding-bottom: 34px;
}

    .timeline-item:last-child {
        padding-bottom: 0;
    }

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
}

.timeline-item.current .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.timeline-period {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
    letter-spacing: 0.02em;
}

.timeline-item h3 {
    margin: 0 0 2px;
    font-size: 1.06rem;
}

.timeline-item .role {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.timeline-item p.desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 620px;
}

/* ---------- SKILLS ---------- */
.skill-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

@media (max-width: 700px) {
    .skill-groups {
        grid-template-columns: 1fr;
    }
}

.skill-group h3 {
    font-size: 0.95rem;
    margin: 0 0 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.86rem;
    font-weight: 600;
}

.cert-list {
    list-style: none;
    padding: 0;
    margin: 40px 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}

@media (max-width: 700px) {
    .cert-list {
        grid-template-columns: 1fr;
    }
}

.cert-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

    .cert-list li::before {
        content: "✓";
        color: var(--accent-2);
        font-weight: 800;
        flex-shrink: 0;
    }

/* ---------- PROJECTS (history) ---------- */
.proj-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

details.proj {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    margin-bottom: 14px;
    overflow: hidden;
}

    details.proj summary {
        list-style: none;
        cursor: pointer;
        padding: 18px 22px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        font-weight: 700;
    }

        details.proj summary::-webkit-details-marker {
            display: none;
        }

.proj-summary-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.proj-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

details.proj[open] .chevron {
    transform: rotate(180deg);
}

.proj-body {
    padding: 0 22px 22px;
    color: var(--text-muted);
    font-size: 0.94rem;
}

    .proj-body p {
        margin: 0 0 12px;
    }

    .proj-body a {
        color: var(--accent);
        font-weight: 600;
    }

        .proj-body a:hover {
            text-decoration: underline;
        }

/* ---------- VERV ---------- */
.verv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

@media (max-width: 780px) {
    .verv-grid {
        grid-template-columns: 1fr;
    }
}

.verv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .verv-list li {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px dashed var(--border);
        font-size: 0.92rem;
    }

        .verv-list li:last-child {
            border-bottom: none;
        }

.verv-role {
    color: var(--text-muted);
    font-size: 0.86rem;
    text-align: right;
}

.verv-sub h3 {
    font-size: 0.95rem;
    margin: 0 0 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.verv-note {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ---------- PERSONLIG ---------- */
.personal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .personal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.personal-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
}

.personal-emoji {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.personal-card h4 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}

.personal-card p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* ---------- CONTACT / FOOTER ---------- */
section.contact {
    text-align: center;
}

.social-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 34px 0 10px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    font-weight: 700;
    font-size: 0.86rem;
    transition: transform 0.15s ease, background 0.2s ease;
}

    .social-btn:hover {
        transform: translateY(-2px);
        background: var(--bg-soft);
    }

.social-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
}

footer.site-footer {
    padding: 28px 0 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}
