/* =========================================================
   Design tokens
   ========================================================= */
:root {
    --bg-primary: #0B1929;
    --bg-surface: #111F30;
    --bg-surface-2: #16263A;
    --grid-line: rgba(255, 255, 255, 0.05);
    --grid-line-strong: rgba(255, 255, 255, 0.10);
    --border: #1E3146;

    --text-primary: #EAF2FA;
    --text-secondary: #8FA3B8;
    --text-muted: #5A6B7D;

    --accent: #FFB454;
    --accent-soft: rgba(255, 180, 84, 0.12);
    --accent-cool: #5ED1C2;

    --radius: 4px;
    --max-width: 1040px;

    --font-display: "Space Grotesk", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Consolas", monospace;
}

/* =========================================================
   Reset & base
   ========================================================= */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    margin: 0;
    color: var(--text-primary);
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* =========================================================
   Signature element: blueprint corner-bracket frame
   ========================================================= */
.blueprint-frame {
    position: relative;
}

.blueprint-frame::before,
.blueprint-frame::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    pointer-events: none;
    opacity: 0.7;
}

.blueprint-frame::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.blueprint-frame::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

/* =========================================================
   Layout helpers
   ========================================================= */
.section {
    padding: 96px 24px;
}

.section-alt {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-heading {
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 600;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

/* =========================================================
   Top navigation
   ========================================================= */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(11, 25, 41, 0.72);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--grid-line-strong);
}

.nav-mark {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    padding: 6px 10px;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

@media (max-width: 640px) {
    .nav-links {
        gap: 16px;
    }
    .nav-links a {
        font-size: 11px;
    }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 75%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    text-align: center;
    padding: 56px 40px;
    background: rgba(17, 31, 48, 0.55);
    border: 1px solid var(--grid-line-strong);
    border-radius: var(--radius);
}

.hero-content .eyebrow {
    display: inline-block;
}

.hero-name {
    font-size: clamp(36px, 6vw, 60px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--accent-cool);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.hero-tagline {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.scroll-cue-line {
    width: 1px;
    height: 28px;
    background: var(--text-muted);
    animation: scroll-pulse 1.8s ease-in-out infinite;
}

.scroll-cue-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: #1A1206;
    font-weight: 500;
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: #ffc377;
}

.btn-outline {
    border-color: var(--border);
    color: var(--text-primary);
    background: var(--bg-surface-2);
}

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

/* =========================================================
   About
   ========================================================= */
.about-card {
    max-width: 720px;
    font-size: 17px;
    color: var(--text-secondary);
}

.about-card p {
    color: var(--text-secondary);
}

/* =========================================================
   Tools / Stack
   ========================================================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.tools-card-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-cool);
    margin-bottom: 16px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 6px 12px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-primary);
}

.chip-list-sm {
    margin-top: 16px;
}

.chip-sm {
    font-size: 11.5px;
    padding: 4px 9px;
    color: var(--text-secondary);
}

/* =========================================================
   Experience timeline
   ========================================================= */
.timeline {
    position: relative;
    padding-left: 28px;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -33px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: var(--bg-primary);
    border: 2px solid var(--text-muted);
    border-radius: 50%;
}

.timeline-item.is-current .timeline-marker {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.timeline-period {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-cool);
}

.timeline-duration {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.timeline-current-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 2px 8px;
    border-radius: 2px;
}

.timeline-role {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-company {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.timeline-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-highlights li {
    position: relative;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 15px;
}

.timeline-highlights li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* =========================================================
   CV section
   ========================================================= */
.cv-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 720px;
}

.cv-file {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cv-icon {
    color: var(--accent);
    flex-shrink: 0;
}

.cv-filename {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text-primary);
}

.cv-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =========================================================
   Connect / footer
   ========================================================= */
.connect {
    text-align: center;
}

.connect-sub {
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 32px;
}

.connect-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 24px 48px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.footer-back {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-back:hover {
    color: var(--accent);
}

/* =========================================================
   Error page
   ========================================================= */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.error-card {
    text-align: center;
    max-width: 440px;
    padding: 40px 32px;
}

.error-card h1 {
    font-size: 26px;
    margin-bottom: 10px;
}

.error-sub {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.error-id {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 640px) {
    .section {
        padding: 72px 20px;
    }
    .hero-content {
        padding: 40px 24px;
    }
    .cv-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
