/* ===== Design tokens — premium dark + single blue accent ===== */
:root {
    --color-accent: #3b82f6;
    --color-accent-hover: #60a5fa;
    --color-accent-strong: #2563eb;
    --color-accent-soft: rgba(59, 130, 246, 0.14);
    --color-accent-border: rgba(59, 130, 246, 0.45);
    --color-accent-glow: rgba(59, 130, 246, 0.35);
    --color-line: rgba(255, 255, 255, 0.1);
    --color-blue: #7dd3fc;
    --color-blue-soft: rgba(125, 211, 252, 0.08);
    --bg-base: #09090b;
    --bg-raised: #0c0c0f;
    --bg-card: #131316;
    --bg-card-hover: #1c1c21;
    --bg-muted: #0e0e11;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);
    --accent: var(--color-accent);
    --accent-muted: var(--color-accent-soft);
    --accent-foreground: #ffffff;
    --ring: rgba(59, 130, 246, 0.45);
    --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.48);
    --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(59, 130, 246, 0.14);
    /* Strong glow reserved for primary CTA + featured project only */
    --glow-accent-soft: 0 0 28px rgba(59, 130, 246, 0.07);
    --glow-accent-medium: 0 0 44px rgba(59, 130, 246, 0.2);
    --glow-featured: 0 0 72px rgba(59, 130, 246, 0.09), 0 0 1px rgba(59, 130, 246, 0.32);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --container: 1140px;
    --nav-height: 72px;
    --transition: 0.25s ease;
    --transition-fast: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition), border-color var(--transition), opacity var(--transition);
}

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

ul {
    list-style: none;
}

section[id],
header[id],
article[id] {
    scroll-margin-top: calc(var(--nav-height) + 16px);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 28px);
}

.page-main {
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: clamp(48px, 8vw, 96px);
}

.section-block {
    position: relative;
    padding: clamp(88px, 12vw, 128px) 0;
}

/* Gradient section dividers (main content only) */
main > .section-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - clamp(32px, 8vw, 56px)), var(--container));
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(59, 130, 246, 0.12) 18%,
        rgba(59, 130, 246, 0.32) 50%,
        rgba(59, 130, 246, 0.12) 82%,
        transparent 100%
    );
    opacity: 0.9;
    pointer-events: none;
}

.section-block--tight {
    padding: clamp(64px, 9vw, 104px) 0;
}

/* ===== Section headers ===== */
.section-header {
    max-width: 640px;
    margin: 0 auto clamp(40px, 5vw, 56px);
    text-align: center;
}

.section-header--left {
    margin-left: 0;
    margin-bottom: clamp(40px, 5vw, 56px);
    text-align: left;
    max-width: 720px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.375rem);
    font-weight: 700;
    letter-spacing: -0.028em;
    color: var(--text-primary);
    line-height: 1.18;
    margin-bottom: 16px;
}

.section-lede {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 56ch;
}

.section-header:not(.section-header--left) .section-lede {
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin-top: 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    opacity: 0.85;
}

.section-header:not(.section-header--left) .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* ===== Surfaces ===== */
.surface-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: clamp(22px, 3vw, 28px);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition),
        background var(--transition);
}

.surface-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(59, 130, 246, 0.18);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.surface-card--accent-top {
    border-top: 2px solid var(--border-strong);
}

.surface-card--highlight {
    border-color: var(--border-strong);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0%, var(--bg-card) 48%);
}

.surface-muted {
    background: var(--bg-muted);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: clamp(20px, 3vw, 28px);
}

.layout-grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.layout-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stack-heading {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.stack-copy {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.prose-list {
    margin: 12px 0 0;
    padding-left: 18px;
    list-style: disc;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.prose-list li {
    margin-bottom: 6px;
}

.prose-list li::marker {
    color: var(--text-muted);
}

.skills-block h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.skills-panel {
    margin-top: 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(9, 9, 11, 0.78);
    backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}

.navbar.is-scrolled {
    background: rgba(9, 9, 11, 0.88);
    border-color: var(--border-strong);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 28px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1rem;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
    box-shadow: var(--shadow-sm);
}

.logo:hover {
    border-color: rgba(59, 130, 246, 0.22);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.logo-mark {
    font-family: var(--font-sans);
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 1px;
    background: var(--color-accent);
    opacity: 0;
    transform: scaleX(0);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a:hover::after {
    opacity: 0.7;
    transform: scaleX(1);
}

.nav-links a.active {
    color: var(--text-primary);
    font-weight: 600;
    background: var(--color-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.nav-links a.active::after {
    opacity: 0;
}

/* ===== Hero ===== */
@keyframes hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    min-height: calc(100dvh - var(--nav-height));
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + clamp(56px, 12vw, 120px)) 0 clamp(88px, 14vw, 140px);
    position: relative;
    background:
        radial-gradient(ellipse 90% 70% at 15% -10%, rgba(59, 130, 246, 0.09), transparent 52%),
        radial-gradient(ellipse 75% 55% at 95% 15%, rgba(255, 255, 255, 0.04), transparent 48%),
        var(--bg-base);
}

.hero-inner {
    width: 100%;
}

.hero-content {
    max-width: 42rem;
}

/* Homepage hero — large type, readable measure */
.hero--home .hero-content--intro {
    max-width: 40rem;
}

@media (prefers-reduced-motion: no-preference) {
    .hero--home .hero-content--intro > * {
        opacity: 0;
        animation: hero-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .hero--home .hero-content--intro .hero-headline {
        animation-delay: 0.06s;
    }

    .hero--home .hero-content--intro .hero-subhead {
        animation-delay: 0.12s;
    }

    .hero--home .hero-content--intro .hero-proof-line {
        animation-delay: 0.18s;
    }

    .hero--home .hero-content--intro .hero-proof-strip {
        animation-delay: 0.22s;
    }

    .hero--home .hero-content--intro .hero-cta {
        animation-delay: 0.28s;
    }

    .hero--home .hero-content--intro .hero-badge {
        animation-delay: 0.34s;
    }

    .hero--home .hero-content--intro .hero-footnote {
        animation-delay: 0.4s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero--home .hero-content--intro > * {
        opacity: 1;
    }
}

.hero-headline {
    font-size: clamp(2.65rem, 7.25vw, 4.375rem);
    font-weight: 800;
    letter-spacing: -0.044em;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 1.35rem;
}

/* Single accent: subtle gradient on key hero word only */
.text-gradient {
    background: linear-gradient(
        100deg,
        #bfdbfe 0%,
        var(--color-accent) 42%,
        var(--color-accent-strong) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

@media (prefers-contrast: more) {
    .text-gradient {
        background: none;
        -webkit-text-fill-color: unset;
        color: var(--color-accent-hover);
    }
}

.hero-subhead {
    font-size: clamp(1.0625rem, 2.1vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.55;
    max-width: 36rem;
    margin-bottom: 1rem;
}

.hero-proof-line {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.55;
    max-width: 36rem;
    margin-bottom: 1.125rem;
}

.hero-proof-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    max-width: 38rem;
}

.hero-proof-strip li {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
}

.hero-footnote {
    margin-top: 1.25rem;
    font-size: 0.875rem;
}

.hero-footnote-link {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-strong);
}

.hero-footnote-link:hover {
    color: var(--color-accent-hover);
    text-decoration-color: rgba(96, 165, 250, 0.55);
}

/* Subpages (e.g. hackathon) */
.greeting {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.name {
    font-size: clamp(2rem, 5.2vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.tagline {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.65;
    max-width: 52ch;
    margin-bottom: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(19, 19, 22, 0.92);
    margin-bottom: 1.25rem;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

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

.btn-primary {
    background: var(--color-accent-strong);
    color: var(--accent-foreground);
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(59, 130, 246, 0.28), 0 2px 6px rgba(0, 0, 0, 0.28);
}

.btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 32px rgba(59, 130, 246, 0.38), var(--glow-accent-medium), 0 4px 12px rgba(0, 0, 0, 0.32);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
    padding-left: 14px;
    padding-right: 14px;
}

.btn-ghost:hover {
    color: var(--text-primary);
}

/* ===== Badges & tags ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.badge--accent {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.badge--blue {
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--color-accent-hover);
    background: var(--color-accent-soft);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color var(--transition), color var(--transition);
}

.tag:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== Capabilities ===== */
.section-capabilities {
    background: var(--bg-muted);
    border-top: none;
}

.section-about {
    background: var(--bg-muted);
    border-top: 1px solid var(--border);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.cap-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.cap-copy {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.about-intro p,
.about-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.about-intro p + p {
    margin-top: 14px;
}

.pull-quote {
    border-left: 2px solid rgba(59, 130, 246, 0.35);
    padding: 14px 16px;
    margin-top: 8px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(59, 130, 246, 0.05);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.98rem;
    line-height: 1.65;
}

/* ===== Experience snapshot ===== */
.experience-snapshot {
    max-width: 720px;
    margin: 0 auto;
}

.snapshot-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.snapshot-meta {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.snapshot-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.snapshot-list li {
    margin-bottom: 0.65rem;
}

.snapshot-list li::marker {
    color: var(--text-muted);
}

.snapshot-footnote {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ===== Timeline (legacy / other pages) ===== */
.section-experience {
    background: var(--bg-base);
}

.education {
    background: var(--bg-base);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    --timeline-track-x: 18px;
    --timeline-dot-size: 18px;
    --timeline-content-gap: 16px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: var(--timeline-track-x);
    transform: translateX(-50%);
    top: 28px;
    bottom: 28px;
    width: 1px;
    background: linear-gradient(to bottom, var(--border-strong), var(--border) 45%, var(--border) 55%, var(--border-strong));
    border-radius: 999px;
    z-index: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: calc(var(--timeline-track-x) - (var(--timeline-dot-size) / 2));
    top: 50%;
    transform: translateY(-50%);
    width: var(--timeline-dot-size);
    height: var(--timeline-dot-size);
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--text-muted);
    box-shadow: 0 0 0 4px rgba(9, 9, 11, 0.9);
    z-index: 2;
}

.timeline-dot.achievement {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-soft);
}

.timeline-item .timeline-content {
    margin-left: calc(var(--timeline-track-x) + (var(--timeline-dot-size) / 2) + var(--timeline-content-gap));
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: clamp(20px, 3vw, 26px);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.timeline-content:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.timeline-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.timeline-subtitle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 12px;
}

.timeline-metrics {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.timeline-metrics li {
    margin-bottom: 6px;
}

.timeline-metrics li::marker {
    color: var(--text-muted);
}

/* ===== Projects / case cards ===== */
.section-projects {
    background: var(--bg-muted);
    border-top: none;
}

/* ===== Featured case study (budy.study) ===== */
.case-study {
    margin-bottom: clamp(52px, 8vw, 88px);
    margin-top: clamp(8px, 2vw, 20px);
    border-radius: calc(var(--radius-lg) + 8px);
    border: 1px solid rgba(59, 130, 246, 0.22);
    background:
        linear-gradient(145deg, rgba(59, 130, 246, 0.14) 0%, transparent 44%),
        linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, transparent 100px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 120px),
        var(--bg-card);
    box-shadow:
        var(--glow-featured),
        0 32px 96px rgba(0, 0, 0, 0.48),
        var(--shadow-sm);
    overflow: hidden;
}

.case-study-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 36%);
    gap: clamp(24px, 4vw, 44px);
    padding: clamp(32px, 5vw, 52px) clamp(22px, 4vw, 44px);
    border-bottom: 1px solid var(--border);
    align-items: stretch;
}

.case-study-hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.case-study-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-hover);
    margin-bottom: 14px;
}

.case-study-title {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.038em;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.case-study-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.case-study-lede {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 38rem;
    margin-bottom: 24px;
}

.case-study-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.case-study-hero-visual {
    border-radius: var(--radius-md);
    min-height: clamp(180px, 22vw, 260px);
    background:
        radial-gradient(ellipse 80% 70% at 70% 30%, rgba(59, 130, 246, 0.35) 0%, transparent 55%),
        linear-gradient(155deg, #1a1f2e 0%, var(--bg-base) 100%);
    border: 1px solid rgba(59, 130, 246, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.case-study-hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.case-study-visual-mark {
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(244, 244, 245, 0.88);
    text-align: center;
    padding: 20px;
    text-shadow: 0 0 28px rgba(59, 130, 246, 0.22);
}

.case-study-body {
    padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 44px) clamp(32px, 5vw, 48px);
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 4vw, 40px);
}

.case-study-section {
    margin: 0;
}

.case-study-h {
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.case-study-prose {
    font-size: 1.0625rem;
    line-height: 1.68;
    color: var(--text-secondary);
    max-width: 65ch;
}

.case-study-prose--tight {
    margin: 0;
    font-size: 1rem;
}

.case-built-grid {
    list-style: none;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.case-built-grid li {
    position: relative;
    padding: 16px 18px 16px 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.case-built-grid li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 1.15em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--color-accent);
}

.case-highlight-grid {
    list-style: none;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.case-highlight-tile {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    line-height: 1.4;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.case-highlight-tile:hover {
    border-color: rgba(59, 130, 246, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.case-role-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.case-role-list li {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.challenge-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.challenge-card {
    padding: 20px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-raised);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.challenge-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.challenge-kicker,
.solution-kicker {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.solution-kicker {
    margin-top: 16px;
    margin-bottom: 6px;
    color: var(--color-accent-hover);
}

.challenge-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 0;
}

.solution-copy {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.case-outcome-panel {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    border-left: 3px solid var(--color-accent);
    padding: clamp(18px, 3vw, 24px) clamp(20px, 3vw, 28px);
    background: rgba(59, 130, 246, 0.06);
}

.case-study-section--stack {
    padding-top: 4px;
}

.case-stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.case-stack-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.projects-more-label {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    margin-top: clamp(12px, 2.5vw, 24px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(24px, 3vw, 32px);
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(59, 130, 246, 0.22);
}

.project-image {
    height: 160px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(145deg, #1a1a1e 0%, var(--bg-base) 100%);
}

.project-content {
    padding: clamp(20px, 3vw, 24px);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 14px;
}

.case-kicker {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.project-title {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.28;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.case-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.case-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.case-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.case-outcomes {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.case-outcomes li {
    margin-bottom: 4px;
}

.case-outcomes li::marker {
    color: var(--text-muted);
}

.project-summary {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    max-width: 62ch;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tech .badge {
    font-size: 0.625rem;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
}

.project-link:hover {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.06);
    transform: translateY(-1px);
}

.project-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.project-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== Tech stack ===== */
.section-stack {
    background: var(--bg-base);
    border-top: 1px solid var(--border);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tech-col-title {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.tech-list li {
    position: relative;
    padding-left: 14px;
}

.tech-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--text-muted);
    opacity: 0.7;
}

/* ===== Contact ===== */
.contact {
    background: var(--bg-muted);
    border-top: none;
}

.contact .section-header {
    margin-bottom: 28px;
}

.contact-text {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

.contact-cta {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.contact-note {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.65;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    min-width: 260px;
    max-width: 100%;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.contact-item:hover {
    border-color: rgba(59, 130, 246, 0.24);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* ===== Hackathon page ===== */
.hackathon-photos {
    background: var(--bg-base);
    padding: clamp(64px, 10vw, 112px) 0;
}

.photos-description {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.65;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}

.photo-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.photo-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hackathon-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.photo-caption {
    padding: 16px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.photo-caption p {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.photo-placeholder {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    background: var(--bg-muted);
    padding: 24px;
    text-align: center;
}

.back-to-portfolio {
    text-align: center;
    margin-top: 40px;
}

/* ===== Footer ===== */
.footer {
    padding: 44px 24px 32px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-raised);
}

.footer-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.footer-social a:hover {
    border-color: rgba(59, 130, 246, 0.28);
    color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* ===== Skip link ===== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--accent-foreground);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    z-index: 10000;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 12px;
}

/* ===== Mobile menu ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Scroll to top ===== */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    background: var(--color-accent);
    color: var(--accent-foreground);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition), box-shadow var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#contact.section-block,
section#contact {
    padding: clamp(72px, 11vw, 120px) 0;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 88vw);
        height: 100vh;
        padding: calc(var(--nav-height) + 20px) 18px 24px;
        background: var(--bg-raised);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border-left: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        border-radius: var(--radius-sm);
        padding: 12px 14px;
    }

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

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

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

    .case-study-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn {
        width: 100%;
    }

    .timeline {
        --timeline-track-x: 14px;
        --timeline-dot-size: 16px;
        --timeline-content-gap: 12px;
    }

    .timeline::before {
        top: 22px;
        bottom: 22px;
    }

    .contact-item {
        min-width: 100%;
        justify-content: center;
    }

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

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

    .btn,
    .project-card,
    .timeline-content,
    .surface-card,
    .contact-item,
    .photo-card,
    .scroll-to-top,
    .project-link,
    .logo {
        transition: none;
    }

    .btn-primary:hover,
    .btn-secondary:hover,
    .project-card:hover,
    .timeline-content:hover,
    .scroll-to-top:hover,
    .project-link:hover,
    .logo:hover,
    .case-highlight-tile:hover,
    .challenge-card:hover,
    .surface-card:hover {
        transform: none;
    }
}
