:root {
    --bg: #070b12;
    --bg-deep: #04070c;
    --bg-panel: #101a2b;
    --line: #d3e0ec;
    --line-faint: rgba(211, 224, 236, 0.07);
    --line-mid: rgba(211, 224, 236, 0.22);
    --accent: #45e0d8;
    --accent-dim: rgba(69, 224, 216, 0.14);
    --text: #e7eef5;
    --text-muted: #7c8ba0;
    --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.35);

    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg);
    background-image: radial-gradient(var(--line-faint) 1px, transparent 1px);
    background-size: 24px 24px;
    line-height: 1.6;
}

a {
    color: inherit;
}

/* ---------- Navbar ---------- */
.navbar {
    background-color: rgba(4, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-mid);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.nav-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.7;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.disabled {
    color: #3c4a5c;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-links a.disabled .nav-tag {
    color: #3c4a5c;
}

/* ---------- Hero ---------- */
.hero {
    padding: 4.5rem 2rem 3rem;
}

.hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    gap: 3rem;
    align-items: center;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 1.1rem;
}

.titleblock h1 {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin-bottom: 1.3rem;
}

.highlight {
    color: var(--accent);
}

.description {
    max-width: 46ch;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-deep);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(69, 224, 216, 0.22);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--line-mid);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Title-block stamp */
.stamp {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 0;
    border-top: 1px solid var(--line-mid);
    max-width: 460px;
}

.stamp > div {
    padding: 0.7rem 1.1rem 0.7rem 0;
    border-right: 1px solid var(--line-mid);
}

.stamp > div:last-child {
    border-right: none;
}

.stamp dt {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stamp dd {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
}

.stamp--stacked {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
    margin-bottom: 1.25rem;
}

.stamp--stacked > div {
    padding: 0.6rem 0.8rem 0.6rem 0;
}

.stamp--stacked > div:nth-child(odd) {
    border-right: 1px solid var(--line-mid);
}

.stamp--stacked > div:nth-child(2),
.stamp--stacked > div:nth-child(4) {
    padding-left: 0.9rem;
}

/* Schematic diagram */
.schematic {
    width: 100%;
    height: auto;
    justify-self: center;
}

.wire {
    fill: none;
    stroke: var(--line-mid);
    stroke-width: 1.5;
}

.wire-label {
    font-family: var(--font-mono);
    font-size: 9px;
    fill: var(--text-muted);
}

.node {
    fill: var(--bg-panel);
    stroke: var(--line-mid);
    stroke-width: 1.5;
}

.node--hub {
    stroke: var(--accent);
    fill: var(--bg-panel);
}

.node--active {
    stroke: var(--accent);
    fill: var(--accent-dim);
}

.node--pending {
    stroke: var(--text-muted);
    fill: transparent;
}

.node-label {
    font-family: var(--font-mono);
    font-size: 12px;
    fill: var(--text);
    letter-spacing: 0.03em;
}

.node-label--hub {
    fill: var(--accent);
    font-weight: 500;
}

.node-label--active {
    fill: var(--accent);
}

.node-label--pending {
    fill: var(--text-muted);
}

.node-dot {
    fill: var(--line);
}

.node-dot--hub,
.node-dot--active {
    fill: var(--accent);
}

.node-dot--pending {
    fill: var(--text-muted);
}

/* ---------- Focus strip ---------- */
.focus-strip {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 6rem;
}

.eyebrow--center {
    text-align: center;
}

.chip-row {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.chip {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    background-color: var(--bg-panel);
    border: 1px solid var(--line-mid);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border-top: 1px solid var(--line-faint);
}

/* ---------- Resume page ---------- */
.resume-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

.page-header {
    padding: 3.5rem 0 1rem;
}

.header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 2.5rem;
    align-items: center;
}

.resume-name {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.resume-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.contact-row {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--line-faint);
}

.contact-row li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.contact-row i {
    color: var(--accent);
    width: 1em;
    text-align: center;
}

.contact-row a {
    text-decoration: none;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: color 0.2s ease;
}

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

.page-header .cta-buttons {
    margin-bottom: 0;
}

.header-side {
    background-color: var(--bg-panel);
    border: 1px solid var(--line-mid);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.header-side .schematic {
    display: block;
}

.section {
    margin-top: 3rem;
}

.info-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--line-mid);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    padding: 1.6rem 1.85rem;
}

.info-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.info-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}

.info-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.info-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
}

.bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.bullet-list li {
    position: relative;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent);
}

/* Collapsible experience / project items */
.exp-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--line-mid);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.exp-item:hover {
    border-color: rgba(69, 224, 216, 0.4);
}

.exp-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.15rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    background-color: rgba(69, 224, 216, 0.04);
    transition: background-color 0.2s ease;
}

.exp-item summary::-webkit-details-marker {
    display: none;
}

.exp-item summary::marker {
    content: '';
}

.exp-item summary:hover {
    background-color: var(--accent-dim);
}

.exp-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line-mid);
    color: var(--accent);
    font-size: 0.8rem;
    transition: transform 0.25s ease, background-color 0.2s ease;
}

.exp-item summary:hover .exp-toggle {
    background-color: var(--accent);
    color: var(--bg-deep);
}

.exp-item[open] .exp-toggle {
    transform: rotate(180deg);
}

.exp-item[open] summary {
    background-color: var(--accent-dim);
    border-bottom: 1px solid var(--line-mid);
}

.exp-role-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.exp-meta {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--accent);
}

.exp-body {
    padding: 1.2rem 1.5rem 1.4rem;
}

.chip-row--left {
    justify-content: flex-start;
}

.chip--cert {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Focus states ---------- */
a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .schematic {
        max-width: 420px;
    }

    .stamp {
        grid-template-columns: repeat(2, auto);
    }

    .stamp > div:nth-child(2) {
        border-right: none;
    }

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

    .header-side {
        order: -1;
        max-width: 340px;
    }
}

@media (max-width: 560px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-tag {
        display: none;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .chip {
        transition: none;
    }
}