:root {
    --ink: #0B1220;
    --panel: #101A2E;
    --panel-2: #0D1626;
    --line: #25324A;
    --line-soft: #1A2438;
    --accent: #4703FF;
    --accent-rgb: 71, 3, 255;
    --teal: #5EEAD4;
    --text: #E7ECF5;
    --muted: #8C97AC;
    --muted-2: #5C6883;
    --radius: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--ink);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.01em;
}

::selection {
    background: var(--accent);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

/* background grid texture */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* NAV */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(11, 18, 32, 0.75);
    border-bottom: 1px solid var(--line-soft);
}

nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.navlinks {
    display: flex;
    gap: 28px;
    font-size: 0.88rem;
    color: var(--muted);
}

.navlinks a:hover {
    color: var(--text);
}

.navlinks {
    display: none;
}

@media(min-width:760px) {
    .navlinks {
        display: flex;
    }
}

.nav-cta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 6px;
    color: var(--teal);
    transition: border-color 0.2s, color 0.2s;
}

.nav-cta:hover {
    border-color: var(--teal);
}

/* HERO */
header.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 88px;
}

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--teal);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--teal);
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    max-width: 820px;
}

.hero h1 span {
    color: var(--accent);
}

.hero .role {
    margin-top: 18px;
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 620px;
    font-weight: 500;
}

.hero .role .sep {
    color: var(--muted-2);
    margin: 0 6px;
}

.hero p.lead {
    margin-top: 22px;
    max-width: 600px;
    color: var(--muted);
    font-size: 1rem;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    padding: 13px 22px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 500;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--line-soft);
    max-width: 640px;
}

.stat b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    display: block;
    color: var(--text);
}

.stat span {
    font-size: 0.8rem;
    color: var(--muted-2);
    font-family: 'JetBrains Mono', monospace;
}

/* schema constellation svg */
.schema-svg {
    position: absolute;
    top: 0;
    right: -60px;
    width: 520px;
    height: 520px;
    opacity: 0.9;
    pointer-events: none;
}

@media(max-width:900px) {
    .schema-svg {
        display: none;
    }
}

.schema-svg circle.node {
    fill: var(--panel);
    stroke: var(--line);
    stroke-width: 1.4;
}

.schema-svg circle.node.hot {
    stroke: var(--accent);
}

.schema-svg circle.node.cool {
    stroke: var(--teal);
}

.schema-svg line {
    stroke: var(--line);
    stroke-width: 1;
}

.schema-svg .pulse {
    stroke: var(--teal);
    stroke-width: 1.2;
    stroke-dasharray: 4 8;
    animation: flow 3.5s linear infinite;
}

.schema-svg .pulse.accent {
    stroke: var(--accent);
    animation-duration: 4.5s;
}

@keyframes flow {
    to {
        stroke-dashoffset: -120;
    }
}

@media (prefers-reduced-motion: reduce) {
    .schema-svg .pulse {
        animation: none;
    }
}

/* SECTION LABEL */
.section {
    padding: 88px 0;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--teal);
    margin-bottom: 14px;
}

.section h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 600;
    max-width: 640px;
}

.section-intro {
    color: var(--muted);
    max-width: 600px;
    margin-top: 14px;
    font-size: 0.98rem;
}

/* ABOUT */
#about {
    border-top: 1px solid var(--line-soft);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media(min-width:800px) {
    .about-grid {
        grid-template-columns: 1.3fr 1fr;
    }
}

.about-text p {
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 0.98rem;
}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

.fact-panel {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 24px;
}

.fact-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.88rem;
}

.fact-row:last-child {
    border-bottom: none;
}

.fact-row .k {
    color: var(--muted-2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.fact-row .v {
    color: var(--text);
    text-align: right;
}

/* STACK */
#stack {
    border-top: 1px solid var(--line-soft);
    background: var(--panel-2);
}

.stack-cats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 44px;
}

@media(min-width:700px) {
    .stack-cats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stack-cat h3 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 600;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 6px 11px;
    border-radius: 5px;
    background: var(--ink);
}

/* EXPERIENCE */
#experience {
    border-top: 1px solid var(--line-soft);
}

.timeline {
    margin-top: 44px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--line);
}

.tl-item {
    position: relative;
    padding-left: 36px;
    padding-bottom: 40px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--line);
}

.tl-item.current::before {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.tl-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--teal);
    margin-bottom: 4px;
}

.tl-role {
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
}

.tl-org {
    color: var(--muted-2);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.tl-desc {
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 640px;
}

/* PROJECTS */
#projects {
    border-top: 1px solid var(--line-soft);
    background: var(--panel-2);
}

.proj-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 44px;
}

@media(min-width:720px) {
    .proj-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.proj-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.proj-card:hover {
    border-color: var(--line);
}

.proj-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.proj-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
}

.proj-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 4px 9px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid var(--line);
}

.proj-status.live {
    color: var(--teal);
    border-color: rgba(94, 234, 212, 0.35);
}

.proj-status.soon {
    color: var(--muted-2);
}

.proj-desc {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 14px 0 16px;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.proj-tags .tag {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.proj-links {
    display: flex;
    gap: 16px;
    margin-top: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.proj-links a {
    color: var(--muted-2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.proj-links a.active {
    color: var(--accent);
}

.proj-links a.active:hover {
    color: var(--teal);
}

/* REVIEWS */
#reviews {
    border-top: 1px solid var(--line-soft);
}

#testimonials .stat-row {
    border-top: none;
    padding-top: 0;
    max-width: none;
}

.review-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--muted-2);
    max-width: 600px;
}

/* CONTACT */
#contact {
    border-top: 1px solid var(--line-soft);
    background: var(--panel-2);
    padding-bottom: 70px;
}

.contact-cta {
    margin-top: 22px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
}

@media(min-width:700px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contact-card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--panel);
}

.contact-card .ck {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted-2);
    display: block;
    margin-bottom: 4px;
}

.contact-card .cv {
    font-size: 0.95rem;
}

.contact-card a.cv:hover {
    color: var(--teal);
}

footer {
    padding: 34px 0;
    text-align: center;
    color: var(--muted-2);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

/* PROJECT THUMBNAILS */
.proj-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 7px;
    margin-bottom: 16px;
    border: 1px solid var(--line-soft);
    background: var(--panel-2);
}

.portfolio-more {
    margin-top: 40px;
    text-align: center;
}

/* BRAND STRIP */
.brand-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    margin-top: 44px;
    padding-top: 32px;
    border-top: 1px solid var(--line-soft);
}

.brand-strip span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--muted-2);
    width: 100%;
    margin-bottom: 4px;
}

.brand-strip img {
    height: 22px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(1) brightness(1.6);
    transition: opacity 0.2s;
}

.brand-strip img:hover {
    opacity: 1;
}

/* PAGE HEADER (non-hero pages) */
.page-header {
    padding: 64px 0 40px;
    border-bottom: 1px solid var(--line-soft);
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    max-width: 700px;
}

.page-header p {
    color: var(--muted);
    max-width: 600px;
    margin-top: 14px;
}

/* GALLERY */
.gallery-section {
    padding: 56px 0 96px;
}

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.gtab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--panel);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.gtab:hover {
    color: var(--text);
    border-color: var(--muted-2);
}

.gtab.active {
    color: var(--accent);
    border-color: var(--accent);
}

.gtab .gcount {
    color: var(--muted-2);
    margin-left: 4px;
}

.gtab.active .gcount {
    color: var(--accent);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

@media(min-width:640px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(min-width:980px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.gallery-item:hover {
    border-color: var(--line);
}

.gallery-item[hidden] {
    display: none;
}

.gthumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    cursor: pointer;
    background: var(--panel-2);
}

.gallery-item[data-cat="brands"] .gthumb {
    object-fit: contain;
    padding: 18px;
    background: #fff;
}

.gplay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(11, 18, 32, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gcap {
    padding: 10px 12px;
    font-size: 0.74rem;
    color: var(--muted-2);
    border-top: 1px solid var(--line-soft);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(6, 10, 18, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lb-content {
    max-width: min(920px, 100%);
    max-height: 100%;
}

.lb-content img,
.lb-content video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    border: 1px solid var(--line-soft);
}

.lb-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 2rem;
    line-height: 1;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
}

.lb-close:hover {
    color: var(--accent);
}