/* ==========================================================================
   ramansaini.in — shared styles
   ========================================================================== */

:root {
    --bg: #06080b;
    --bg-raised: #0b0f14;
    --surface: #0f141b;
    --surface-2: #141b24;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #e8edf2;
    --muted: #94a0ad;
    --dim: #5f6b78;
    --accent: #00ff87;
    --accent-2: #00d4ff;
    --accent-soft: rgba(0, 255, 135, 0.12);
    --accent-line: rgba(0, 255, 135, 0.35);
    --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --nav-h: 72px;
    --font-sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

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

::selection {
    background: var(--accent);
    color: #000;
}

a {
    color: inherit;
}

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

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

.mono {
    font-family: var(--font-mono);
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Backdrop
   -------------------------------------------------------------------------- */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.backdrop canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.backdrop .grid {
    position: absolute;
    inset: -2px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.backdrop .glow {
    position: absolute;
    width: 820px;
    height: 820px;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.22;
}

.backdrop .glow.g1 {
    top: -360px;
    left: -220px;
    background: var(--accent);
    opacity: 0.12;
}

.backdrop .glow.g2 {
    top: 30vh;
    right: -380px;
    background: var(--accent-2);
    opacity: 0.1;
}

.backdrop .noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Scroll progress + cursor
   -------------------------------------------------------------------------- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: var(--grad);
    z-index: 1001;
    box-shadow: 0 0 12px var(--accent);
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s ease, border-color 0.25s ease;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: var(--accent);
}

.cursor-ring {
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px solid var(--accent-line);
}

.has-cursor .cursor-dot,
.has-cursor .cursor-ring {
    opacity: 1;
}

.cursor-ring.is-hover {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    background: rgba(0, 255, 135, 0.06);
    border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
    background: rgba(6, 8, 11, 0.72);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom-color: var(--line);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    letter-spacing: -0.3px;
}

.logo .br {
    color: var(--accent);
}

.logo .caret {
    display: inline-block;
    width: 8px;
    height: 17px;
    margin-left: 4px;
    background: var(--accent);
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

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

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a .idx {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    opacity: 0.8;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.status-pill:hover {
    border-color: var(--accent-line);
    color: var(--text);
}

.pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

.pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    animation: ping 1.8s var(--ease) infinite;
}

@keyframes ping {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(2.8); opacity: 0; }
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    position: relative;
    transition: transform 0.3s var(--ease), background 0.3s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Buttons, chips
   -------------------------------------------------------------------------- */

.btn {
    --mx: 50%;
    --my: 50%;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: -0.1px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    overflow: hidden;
    isolation: isolate;
}

.btn .arrow {
    transition: transform 0.3s var(--ease);
}

.btn:hover .arrow {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--accent);
    color: #001a0d;
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.4), 0 8px 30px -8px rgba(0, 255, 135, 0.55);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(160px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.55), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.6), 0 16px 40px -10px rgba(0, 255, 135, 0.7);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.chip svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
    flex: none;
}

a.chip:hover {
    border-color: var(--accent-line);
    color: var(--text);
    background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

main {
    position: relative;
    z-index: 2;
}

.section {
    padding: 130px 0;
    position: relative;
}

.section.alt {
    background: linear-gradient(180deg, transparent, rgba(11, 15, 20, 0.85) 12%, rgba(11, 15, 20, 0.85) 88%, transparent);
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 64px;
    max-width: 820px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.eyebrow .num {
    color: var(--dim);
}

.eyebrow::after {
    content: '';
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-line), transparent);
}

.section-title {
    font-size: clamp(34px, 4.6vw, 56px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.section-title .muted {
    color: var(--dim);
}

/* --------------------------------------------------------------------------
   Cards (shared spotlight surface)
   -------------------------------------------------------------------------- */

.card {
    --mx: -500px;
    --my: -500px;
    position: relative;
    background: linear-gradient(180deg, var(--surface), var(--bg-raised));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.4s var(--ease);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 255, 135, 0.08), transparent 45%);
    z-index: 0;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    background: radial-gradient(300px circle at var(--mx) var(--my), rgba(0, 255, 135, 0.55), transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.card > * {
    position: relative;
    z-index: 1;
}

.card:hover {
    border-color: var(--line-strong);
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.015);
}

.window-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2a323d;
}

.window-bar i:nth-child(1) { background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }

.window-bar .file {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
}

/* --------------------------------------------------------------------------
   Reveal
   -------------------------------------------------------------------------- */

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--d, 0s);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 60px) 0 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 72px;
    align-items: center;
}

.prompt {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 28px;
}

.prompt .tag {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
}

.hero-title {
    font-size: clamp(54px, 8.4vw, 112px);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.055em;
    margin-bottom: 26px;
}

.hero-title .line {
    display: block;
}

.hero-roles {
    font-family: var(--font-mono);
    font-size: clamp(16px, 1.7vw, 20px);
    color: var(--muted);
    margin-bottom: 18px;
    min-height: 1.6em;
}

.hero-roles .sym {
    color: var(--accent);
    margin-right: 8px;
}

.hero-roles .typed {
    color: var(--text);
}

.hero-roles .cursor-bar {
    display: inline-block;
    width: 9px;
    height: 1.1em;
    vertical-align: -0.15em;
    margin-left: 2px;
    background: var(--accent);
    animation: blink 1s steps(1) infinite;
}

.hero-lede {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 32px;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

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

.hero-visual {
    position: relative;
}

.portrait {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    transform-style: preserve-3d;
    transition: transform 0.5s var(--ease);
}

.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.05);
    transition: filter 0.6s ease, transform 0.8s var(--ease);
}

.portrait:hover img {
    filter: grayscale(0%) contrast(1.05);
    transform: scale(1.03);
}

.portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(6, 8, 11, 0.85) 0%, transparent 45%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

.portrait .scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 135, 0.12), transparent);
    animation: scan 5s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes scan {
    0% { top: -120px; }
    100% { top: 100%; }
}

.portrait .meta {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

.portrait .meta strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--accent);
    border-style: solid;
    border-width: 0;
    z-index: 3;
}

.corner.tl { top: -8px; left: -8px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: -8px; right: -8px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: -8px; left: -8px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: -8px; right: -8px; border-bottom-width: 2px; border-right-width: 2px; }

.term {
    position: absolute;
    left: -64px;
    bottom: 56px;
    width: 330px;
    z-index: 4;
    background: rgba(11, 15, 20, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    animation: floaty 7s ease-in-out infinite;
}

.term pre {
    padding: 14px 16px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.75;
    color: var(--muted);
    white-space: pre;
    overflow: hidden;
}

.term .k { color: #7ee0ff; }
.term .s { color: var(--accent); }
.term .p { color: var(--dim); }
.term .n { color: #ffcf6e; }

.badge-float {
    position: absolute;
    top: 40px;
    right: -26px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(11, 15, 20, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    animation: floaty 6s ease-in-out -2s infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 72px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(11, 15, 20, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}

.stat {
    padding: 26px 28px;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat .val {
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.stat .lbl {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(11, 15, 20, 0.7);
    overflow: hidden;
    padding: 18px 0;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 48px;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track span {
    display: inline-flex;
    align-items: center;
    gap: 48px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}

.marquee-track span::after {
    content: '/';
    color: var(--accent);
    opacity: 0.6;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.about-text p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.about-text p:first-child {
    color: var(--text);
    font-size: 19px;
}

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

.service {
    padding: 30px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.service:hover {
    transform: translateY(-4px);
}

.service .ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    margin-bottom: auto;
}

.service .ico svg {
    width: 22px;
    height: 22px;
}

.service .no {
    position: absolute;
    top: 26px;
    right: 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
}

.service h3 {
    margin-top: 36px;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.service p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Skill meters (home)
   -------------------------------------------------------------------------- */

.meters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.meter {
    padding: 22px 22px 20px;
}

.meter:hover {
    transform: translateY(-4px);
}

.meter .top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 26px;
}

.meter .name {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.meter .pct {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
}

.meter .bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 12px;
}

.meter .bar i {
    display: block;
    height: 100%;
    width: var(--v, 0%);
    border-radius: inherit;
    background: var(--grad);
    box-shadow: 0 0 12px rgba(0, 255, 135, 0.6);
    transform-origin: 0 50%;
    transform: scaleX(0);
    transition: transform 1.4s var(--ease);
}

.meter.in .bar i,
.no-js .meter .bar i {
    transform: scaleX(1);
}

.meter .lvl {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dim);
}

.meter .lvl.expert {
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Timeline (home)
   -------------------------------------------------------------------------- */

.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 179px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, var(--accent), var(--line-strong) 30%, transparent);
}

.t-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 58px;
    align-items: start;
    position: relative;
}

.t-when {
    padding-top: 26px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.t-item::before {
    content: '';
    position: absolute;
    left: 174px;
    top: 30px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--dim);
    z-index: 2;
}

.t-item.current::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(0, 255, 135, 0.15), 0 0 18px var(--accent);
}

.t-card {
    padding: 24px 28px;
}

.t-card:hover {
    transform: translateX(4px);
}

.t-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 6px;
}

.t-company {
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.head-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    color: var(--accent);
}

.t-role {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-2);
    margin-bottom: 12px;
}

.t-desc {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
    padding: 72px 56px;
    text-align: center;
    border-radius: 24px;
}

.cta-band::before {
    background:
        radial-gradient(600px circle at 50% 0%, rgba(0, 255, 135, 0.14), transparent 60%),
        radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 212, 255, 0.1), transparent 50%);
}

.cta-band .eyebrow {
    justify-content: center;
}

.cta-band .eyebrow::after {
    display: none;
}

.cta-title {
    margin: 18px auto 14px;
    font-size: clamp(38px, 6vw, 76px);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.cta-sub {
    color: var(--muted);
    font-size: 18px;
    margin-bottom: 34px;
}

.cta-band .hero-actions {
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
    position: relative;
    z-index: 2;
    padding: 90px 0 36px;
    border-top: 1px solid var(--line);
    background: rgba(6, 8, 11, 0.9);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.footer-tagline {
    color: var(--muted);
    font-size: 15px;
    max-width: 380px;
    margin-bottom: 26px;
}

.socials {
    display: flex;
    gap: 10px;
}

.social {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    transition: all 0.25s var(--ease);
}

.social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social:hover {
    color: #001a0d;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.footer h4 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--dim);
}

.footer-bottom .mono {
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   Easter egg
   -------------------------------------------------------------------------- */

.text-explosion {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
    text-shadow: 0 0 14px rgba(0, 255, 135, 0.8);
    animation: textExplode 1.4s var(--ease) forwards;
}

@keyframes textExplode {
    0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rotation)) scale(1); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Portfolio page
   -------------------------------------------------------------------------- */

.page-hero {
    padding: calc(var(--nav-h) + 110px) 0 60px;
}

.page-hero .hero-title {
    font-size: clamp(56px, 10vw, 140px);
}

.page-hero .hero-lede {
    max-width: 640px;
    font-size: 19px;
}

.breadcrumb {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--dim);
    margin-bottom: 26px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

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

.breadcrumb .here {
    color: var(--accent);
}

.page-hero .stats {
    margin-top: 56px;
}

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

.stack {
    display: flex;
    flex-direction: column;
}

.stack.wide {
    grid-column: span 2;
}

.stack-body {
    padding: 22px 22px 24px;
}

.stack-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.stack-title .count {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--dim);
}

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

.pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
    transition: all 0.2s ease;
    cursor: default;
}

.pill:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

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

.search {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(11, 15, 20, 0.7);
    font-family: var(--font-mono);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search:focus-within {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 4px rgba(0, 255, 135, 0.08);
}

.search .ps {
    color: var(--accent);
    white-space: nowrap;
}

.search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.search input::placeholder {
    color: var(--dim);
}

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

.filter {
    height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.filter.active {
    color: #001a0d;
    background: var(--accent);
    border-color: var(--accent);
}

.result-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    margin-bottom: 18px;
}

.result-count b {
    color: var(--accent);
    font-weight: 500;
}

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

.project {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.project.is-hidden {
    display: none;
}

.project:hover {
    transform: translateY(-4px);
}

.project.featured {
    border-color: var(--accent-line);
}

.project.featured::before {
    background:
        radial-gradient(500px circle at 100% 0%, rgba(0, 255, 135, 0.08), transparent 55%),
        radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 255, 135, 0.08), transparent 45%);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
}

.project-top .feat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.project-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.project-role {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-2);
    margin-bottom: 18px;
}

.project-description {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 22px;
}

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

.tech-badge {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.07);
    border: 1px solid rgba(0, 212, 255, 0.16);
    color: #8fe6ff;
    font-family: var(--font-mono);
    font-size: 12px;
}

.project-links {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px dashed var(--line-strong);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.project-link svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.project-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.project-links .na {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dim);
    padding: 8px 0;
}

.empty-state {
    display: none;
    padding: 60px 20px;
    text-align: center;
    font-family: var(--font-mono);
    color: var(--dim);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.empty-state.show {
    display: block;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .meters { grid-template-columns: repeat(4, 1fr); }
    .term { left: -24px; }
    .badge-float { right: -12px; }
}

@media (max-width: 980px) {
    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .hero-visual {
        max-width: 460px;
        width: 100%;
        margin: 0 auto;
    }

    .about-text {
        position: static;
    }

    .meters { grid-template-columns: repeat(3, 1fr); }

    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .stack.wide { grid-column: span 2; }

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

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    :root { --nav-h: 64px; }

    .menu-toggle { display: inline-flex; }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px;
        background: rgba(6, 8, 11, 0.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s var(--ease);
    }

    .nav-open .nav-links {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-open .nav {
        background: rgba(6, 8, 11, 0.96);
        border-bottom-color: var(--line);
    }

    .nav-links a {
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 16px;
    }

    .status-pill .txt { display: none; }
    .status-pill { padding: 10px; }

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

    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

    .timeline::before { left: 5px; }

    .t-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding-left: 32px;
    }

    .t-item::before {
        left: 0;
        top: 5px;
    }

    .t-when {
        text-align: left;
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }

    .section { padding: 90px 0; }

    .section-head { margin-bottom: 44px; }

    .hero { padding-top: calc(var(--nav-h) + 40px); }

    .hero-lede { font-size: 16px; }

    .services { grid-template-columns: 1fr; }
    .service { min-height: 0; }

    .meters { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .meter { padding: 18px 16px; }
    .meter .name { font-size: 15px; }

    .term {
        position: relative;
        left: auto;
        bottom: auto;
        width: 100%;
        margin-top: 14px;
        animation: none;
    }

    .badge-float { right: 8px; top: 12px; }

    .corner { display: none; }

    .stack-grid { grid-template-columns: 1fr; }
    .stack.wide { grid-column: auto; }

    .project { padding: 22px; }
    .project-title { font-size: 22px; }

    .cta-band { padding: 52px 22px; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

    .btn { padding: 13px 20px; }

    .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

    .chip { font-size: 12px; }

    .stat { padding: 20px; }
}

@media (hover: none), (pointer: coarse) {
    .cursor-dot,
    .cursor-ring { display: none; }
}

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

    .js .reveal {
        opacity: 1;
        transform: none;
    }

    .marquee-track { animation: none; }
    .portrait .scan { display: none; }
}

/* --------------------------------------------------------------------------
   Now / Grasphin + own products
   -------------------------------------------------------------------------- */

.now-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    align-items: start;
}

.now-main {
    border-color: var(--accent-line);
}

.now-main::before {
    background:
        radial-gradient(600px circle at 0% 0%, rgba(0, 255, 135, 0.1), transparent 55%),
        radial-gradient(420px circle at var(--mx) var(--my), rgba(0, 255, 135, 0.08), transparent 45%);
}

.now-body {
    padding: 30px 32px 32px;
}

.now-title {
    font-size: clamp(34px, 4vw, 50px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
    margin-bottom: 18px;
}

.now-lede {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 14px;
}

.now-text {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 22px;
}

.now-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.now-note {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--dim);
    padding: 4px 2px 6px;
}

.now-note::before {
    content: '// ';
    color: var(--accent);
}

.product {
    display: block;
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
}

a.product:hover {
    transform: translateY(-3px);
}

.product-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.product-head h4 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.product-head .mono {
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
}

.product p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product.sm h4 {
    font-size: 16px;
}

.product.building {
    border-style: dashed;
    border-color: var(--line-strong);
}

.product.building .product-head .mono {
    color: var(--dim);
}

/* --------------------------------------------------------------------------
   Daily stack
   -------------------------------------------------------------------------- */

.daily {
    margin-top: 16px;
}

.daily-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.daily-list > div {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}

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

.daily-list > div:nth-last-child(-n+2) {
    border-bottom: 0;
}

.daily-list dt {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 2px;
}

.daily-list dd {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Timeline wins
   -------------------------------------------------------------------------- */

.t-wins {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t-wins li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.t-wins li::before {
    content: '+';
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-mono);
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Principles / how I work
   -------------------------------------------------------------------------- */

.principles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.principle {
    padding: 30px;
}

.principle p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.p-label {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 16px;
}

.how-list {
    list-style: none;
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 14px;
}

.how-list li {
    padding: 10px 24px;
    color: var(--muted);
    line-height: 1.6;
}

.how-list li::before {
    content: '- ';
    color: var(--dim);
}

.how-list b {
    color: #7ee0ff;
    font-weight: 500;
}

.inline-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-line);
}

.inline-link:hover {
    border-bottom-color: var(--accent);
}

@media (max-width: 1100px) and (min-width: 821px) {
    .nav-links a { padding: 8px 10px; }
    .nav-links a .idx { display: none; }
    .status-pill .txt { display: none; }
    .status-pill { padding: 10px; }
}

@media (max-width: 980px) {
    .now-grid,
    .principles { grid-template-columns: 1fr; }
    .daily-list { grid-template-columns: 1fr; }
    .daily-list > div:nth-child(odd) { border-right: 0; }
    .daily-list > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
    .now-body { padding: 22px; }
    .product-row { grid-template-columns: 1fr; }
    .daily-list > div { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
    .principle { padding: 22px; }
    .how-list { font-size: 13px; }
    .how-list li { padding: 8px 18px; }
}

.project .t-wins {
    margin: -8px 0 22px;
}
