/* =====================================================================
   Meladze Vazha — Portfolio
   Strict monochrome dark design system. No hues, no saturation.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Monochrome palette (only these values are used) */
    --black: #000000;
    --grey-900: #0d0d0d;
    --grey-800: #1a1a1a;
    --grey-700: #262626;
    --grey-500: #404040;
    --grey-300: #808080;
    --white: #ffffff;

    /* Semantic roles */
    --bg: var(--black);
    --bg-section: var(--grey-900);
    --surface: var(--grey-900);
    --border: var(--grey-800);
    --border-hover: var(--grey-700);
    --accent: var(--grey-500);
    --text: var(--white);
    --text-muted: var(--grey-300);

    /* Typography */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    /* Technological display fonts (used for headings & abstract labels) */
    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-tech: "Orbitron", "Space Grotesk", system-ui, sans-serif;

    /* Shape & layout */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --maxw: 1200px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --section-pad: clamp(5.5rem, 11vw, 10rem);

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.7s;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
ul {
    list-style: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px;
    border-radius: 6px;
}
.mono {
    font-family: var(--font-mono);
    letter-spacing: 0;
}

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.section {
    padding-block: var(--section-pad);
    position: relative;
}
.section-alt {
    background-color: var(--bg-section);
    border-block: 1px solid var(--border);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--white);
    z-index: 1200;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* ---------- Grain overlay (greyscale only) ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--surface);
    color: var(--white);
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: color-mix(in srgb, var(--black) 72%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(0);
    backdrop-filter: blur(14px) saturate(0);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header.scrolled {
    border-bottom-color: var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    min-width: 0;
    overflow: hidden;
}
.brand-name {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}
/* "Code being written": Meladze stays, second word types/erases */
.brand-dyn {
    display: inline-flex;
    align-items: baseline;
}
.brand-word {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.92em;
    color: var(--white);
}
.brand-caret {
    display: inline-block;
    width: 1px;
    height: 1em;
    margin-left: 2px;
    background-color: var(--white);
    transform: translateY(0.12em);
    animation: blink 1.05s steps(1) infinite;
}
.logo-mark {
    display: inline-flex;
    line-height: 0;
    flex-shrink: 0;
    transition: transform 0.4s var(--ease);
}
.brand:hover .logo-mark {
    transform: rotate(-6deg) scale(1.05);
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.site-nav a {
    color: var(--text-muted);
    font-size: 0.92rem;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-sm);
    transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-nav a:hover {
    color: var(--white);
    background-color: var(--grey-900);
}
.site-nav .nav-cta {
    color: var(--white);
    border: 1px solid var(--border);
}
.site-nav .nav-cta:hover {
    border-color: var(--border-hover);
    background-color: var(--grey-900);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-left: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    margin-inline: auto;
    background-color: var(--white);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}
.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 0.5rem var(--gutter) 1.25rem;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
}
.mobile-nav a {
    padding: 0.95rem 0.5rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}
.mobile-nav a:last-child {
    border-bottom: none;
}
.mobile-nav a:hover {
    color: var(--white);
    padding-left: 0.85rem;
}
.mobile-nav.open {
    display: flex;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-block: clamp(5rem, 14vh, 9rem) var(--section-pad);
    overflow: hidden;
}
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.55;
    pointer-events: none;
}
.hero-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.07), transparent 45%),
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.04), transparent 55%);
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Avatar with rotating scan ring */
.avatar-wrap {
    position: relative;
    width: 210px;
    height: 210px;
    margin-bottom: 2.5rem;
}
/* Soft monochrome glow behind the avatar */
.avatar-wrap::before {
    content: "";
    position: absolute;
    inset: -28px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.06) 45%,
        transparent 70%
    );
    filter: blur(14px);
    z-index: -1;
    animation: glowPulse 5s var(--ease) infinite;
}
@keyframes glowPulse {
    0%,
    100% {
        opacity: 0.65;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}
.avatar-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 250deg,
        var(--grey-500) 320deg,
        var(--white) 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    animation: spin 6s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.avatar {
    position: relative;
    z-index: 1;
    width: 210px;
    height: 210px;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid var(--border);
    background-color: var(--grey-900);
    /* Full-color photo + subtle white glow */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 12px 50px rgba(255, 255, 255, 0.14);
    transition: opacity 0.5s var(--ease), box-shadow 0.4s var(--ease),
        transform 0.4s var(--ease);
}
.avatar:hover {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
        0 16px 60px rgba(255, 255, 255, 0.22);
    transform: translateY(-3px);
}

/* Pixel "decode from code" loading canvas */
.avatar-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    border: 1px solid var(--border);
    background-color: var(--black);
    display: none;
    image-rendering: pixelated;
}
/* During load: hide real img, show decoding canvas */
.avatar-wrap.is-loading .avatar {
    opacity: 0;
}
.avatar-wrap.is-loading .avatar-canvas {
    display: block;
}

.avatar-fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    border: 1px solid var(--border);
    background-color: var(--grey-900);
}
.avatar-wrap.no-photo .avatar {
    display: none;
}
.avatar-wrap.no-photo .avatar-fallback {
    display: flex;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--grey-900) 80%, transparent);
    margin-bottom: 2rem;
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--white);
    animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Apple-style hero wordmark: refined weight, tight tracking,
   subtle monochrome gradient and a soft blur-in reveal. */
.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(3.1rem, 9.5vw, 7rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.055em;
    margin-bottom: 1.25rem;
    background: linear-gradient(180deg, #ffffff 38%, #808080 135%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
/* Blur-in reveal for the wordmark (Apple-like entrance) */
.hero-title.reveal {
    filter: blur(14px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
        filter var(--dur) var(--ease);
}
.hero-title.reveal.visible {
    filter: blur(0);
}
.hero-subline {
    font-size: clamp(0.85rem, 2.4vw, 1.05rem);
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 1.4rem;
}
.hero-statement {
    max-width: 40ch;
    font-size: clamp(1.05rem, 2.7vw, 1.3rem);
    color: var(--text);
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-tech);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.scroll-hint-line {
    width: 1px;
    height: 42px;
    background: linear-gradient(to bottom, var(--white), transparent);
    animation: scrollLine 2s var(--ease) infinite;
    transform-origin: top;
}
@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    40% {
        transform: scaleY(1);
        opacity: 1;
    }
    100% {
        transform: scaleY(1) translateY(42px);
        opacity: 0;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
        color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active {
    transform: translateY(1px);
}
.btn-icon {
    display: inline-flex;
    line-height: 0;
    transition: transform 0.25s var(--ease);
}
.btn-icon svg {
    width: 18px;
    height: 18px;
}
.btn-primary {
    background-color: var(--white);
    color: var(--black);
}
.btn-primary:hover {
    background-color: var(--grey-300);
}
.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}
.btn-ghost {
    border-color: var(--border);
    color: var(--white);
    background-color: transparent;
}
.btn-ghost:hover {
    border-color: var(--border-hover);
    background-color: var(--grey-900);
}

/* ---------- Section heads ---------- */
.section-head {
    max-width: 680px;
    margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.eyebrow {
    display: inline-block;
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
}
.section-sub {
    color: var(--text-muted);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    max-width: 54ch;
}

/* ---------- Expertise cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}
@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    position: relative;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
        background-color 0.3s var(--ease);
    height: 100%;
    overflow: hidden;
}
/* Mouse-tracking spotlight (greyscale) */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, 0.08),
        transparent 60%
    );
    transition: opacity 0.35s var(--ease);
}
.card:hover {
    border-color: var(--border-hover);
    background-color: #101010;
    transform: translateY(-4px);
}
.card:hover::before {
    opacity: 1;
}
.card-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.4rem;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
        background-color 0.3s var(--ease);
}
.card:hover .card-icon {
    border-color: var(--border-hover);
    background-color: var(--black);
    transform: translateY(-2px);
}
.card-icon svg {
    width: 26px;
    height: 26px;
}
.card-title {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.7rem;
}
.card-text {
    position: relative;
    color: var(--text-muted);
    font-size: 0.97rem;
}

/* Terminal card (thematic) */
.card-terminal {
    padding: 0;
    background-color: var(--black);
    display: flex;
    flex-direction: column;
}
.card-terminal:hover {
    transform: translateY(-4px);
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}
.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--grey-500);
    background-color: var(--grey-900);
}
.terminal-title {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.terminal-body {
    padding: 1.25rem 1.1rem;
    font-size: 0.82rem;
    line-height: 1.85;
    color: var(--white);
    white-space: pre-wrap;
    word-break: break-word;
}
.t-line {
    display: block;
}
.t-prompt {
    color: var(--grey-300);
    margin-right: 0.5rem;
}
.t-out {
    color: var(--grey-300);
}
.cursor-blink {
    color: var(--white);
    animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ---------- Toolbox ---------- */
.toolbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem 2rem;
}
@media (min-width: 600px) {
    .toolbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .toolbox-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.tool-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--white);
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--black);
    transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease),
        transform 0.25s var(--ease);
    cursor: default;
}
.tag:hover {
    border-color: var(--border-hover);
    background-color: var(--grey-900);
    transform: translateY(-2px);
}

/* ---------- Philosophy ---------- */
.philosophy-inner {
    text-align: center;
    max-width: 820px;
    margin-inline: auto;
}
.philosophy .eyebrow {
    margin-bottom: 1.75rem;
}
.philosophy-statement {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: 1.75rem;
}
.philosophy-accent {
    color: var(--grey-300);
    transition: color 0.4s var(--ease);
}
.philosophy-inner:hover .philosophy-accent {
    color: var(--white);
}
.philosophy-sub {
    color: var(--text-muted);
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    max-width: 48ch;
    margin-inline: auto;
}

/* ---------- Contact ---------- */
.contact .section-head {
    text-align: center;
    margin-inline: auto;
}
.contact-card {
    position: relative;
    max-width: 520px;
    margin-inline: auto;
    text-align: center;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(2.25rem, 5vw, 3.5rem);
    transition: border-color 0.3s var(--ease);
    overflow: hidden;
}
.contact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 60%);
}
.contact-card:hover {
    border-color: var(--border-hover);
}
.contact-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: var(--white);
    border: 1px solid var(--border);
    border-radius: 50%;
    margin-bottom: 1.4rem;
}
.contact-icon svg {
    width: 24px;
    height: 24px;
}
.contact-label {
    position: relative;
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}
.contact-phone {
    position: relative;
    display: inline-block;
    font-size: clamp(1.9rem, 7.5vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--white);
    transition: color 0.25s var(--ease), letter-spacing 0.3s var(--ease);
}
.contact-phone:hover {
    color: var(--text-muted);
    letter-spacing: 0.03em;
}
.contact-intl {
    position: relative;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.6rem;
    margin-bottom: 2rem;
}
.copy-btn {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.84rem;
}
.copy-icon {
    display: inline-flex;
    line-height: 0;
}
.copy-btn.copied {
    border-color: var(--white);
    color: var(--white);
}

/* Contact — "void" / offline state */
.void-card {
    text-align: center;
}
.void-card .contact-icon {
    color: var(--text-muted);
    opacity: 0.9;
}
.void-terminal {
    position: relative;
    text-align: left;
    background-color: var(--black);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin: 0 auto 1.75rem;
    max-width: 360px;
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--white);
    white-space: pre-wrap;
    word-break: break-word;
}
.void-text {
    position: relative;
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 40ch;
    margin: 0 auto 1.75rem;
}
.void-statement {
    position: relative;
    font-family: var(--font-mono);
    font-size: clamp(1.05rem, 3.5vw, 1.4rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--white);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding-block: 2.5rem;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    text-align: center;
}
.footer-copy {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}
.card-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.card-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.card-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.card-grid .reveal:nth-child(6) { transition-delay: 0.30s; }
.toolbox-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.toolbox-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.toolbox-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.toolbox-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.toolbox-grid .reveal:nth-child(6) { transition-delay: 0.30s; }

/* ---------- Responsive: header ---------- */
@media (max-width: 768px) {
    .site-nav {
        display: none;
    }
    .nav-toggle {
        display: flex;
    }
}

/* ---------- Responsive: tablet ---------- */
@media (max-width: 768px) {
    :root {
        --section-pad: clamp(4rem, 12vw, 6rem);
    }
    .header-inner {
        height: 64px;
    }
    .hero {
        padding-block: clamp(3rem, 9vh, 5rem) var(--section-pad);
    }
    .card {
        padding: 1.6rem;
    }
    .section-head {
        margin-bottom: 2.5rem;
    }
}

/* ---------- Responsive: phone ---------- */
@media (max-width: 540px) {
    body {
        font-size: 16px;
    }

    /* Avatar scales down + tighter glow */
    .avatar-wrap {
        width: 160px;
        height: 160px;
        margin-bottom: 2rem;
    }
    .avatar,
    .avatar-canvas,
    .avatar-fallback {
        width: 160px;
        height: 160px;
        border-radius: 26px;
    }
    .avatar-wrap::before {
        inset: -18px;
    }
    .avatar-fallback svg {
        width: 64px;
        height: 64px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 13vw, 3.5rem);
    }
    .hero-statement {
        font-size: 1.05rem;
    }
    .hero-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.7rem;
        margin-bottom: 3rem;
    }
    .hero-actions .btn {
        width: 100%;
    }

    .status-pill {
        font-size: 0.72rem;
    }

    /* Cards & icons a touch smaller */
    .card {
        padding: 1.4rem;
        border-radius: 14px;
    }
    .card-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 1.1rem;
    }
    .card-icon svg {
        width: 23px;
        height: 23px;
    }
    .card-title {
        font-size: 1.08rem;
    }

    /* Terminal card readability */
    .terminal-body,
    .void-terminal {
        font-size: 0.74rem;
        line-height: 1.75;
    }
    .void-terminal {
        max-width: 100%;
        padding: 0.85rem 0.9rem;
    }

    /* Toolbox spacing */
    .toolbox-grid {
        gap: 1.4rem;
    }
    .tag {
        font-size: 0.76rem;
    }

    /* Philosophy fits small screens */
    .philosophy-statement {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    /* Contact card padding */
    .contact-card {
        padding: 1.75rem 1.25rem;
    }
    .void-statement {
        font-size: 1.1rem;
    }

    /* Eyebrow / tech labels tighten so they never overflow */
    .eyebrow {
        letter-spacing: 0.12em;
        font-size: 0.68rem;
    }
}

/* ---------- Very small phones ---------- */
@media (max-width: 360px) {
    :root {
        --gutter: 1.1rem;
    }
    .brand-name {
        font-size: 0.95rem;
    }
    .hero-title {
        font-size: 2.3rem;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .hero-canvas {
        display: none;
    }
}
