/* ===========================================
   Portfolio Design System
   Deep Sea Terminal — Gold Accents
   WCAG AA Compliant

   Structure:
   1. Variables & Reset
   2. Accessibility
   3. Hero Section
   4. Navigation
   5. Shape Navigation
   6. Typography
   7. Main Layout & Grids
   8. Content Cards
   9. Components (video, image, badges)
   10. Footer
   11. Animations
   12. Responsive Breakpoints
=========================================== */

/* ===========================================
   1. VARIABLES & RESET
=========================================== */
:root {
    /* Deep Sea Palette */
    --sea-deep: #020a12;
    --sea-mid: #051018;
    --sea-panel: rgba(0, 20, 40, 0.08);

    --cyan: #7dd8f7;
    --cyan-dim: #4dc9f6;
    --cyan-glow: rgba(77, 201, 246, 0.4);
    --gold: #d4af37;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --green: #b6ffba;

    --text-primary: #8cb8cc;
    --text-bright: #b8dced;
    --text-heading: #7dd8f7;
    --text-subhead: #e8f4ff;

    /* Semantic tokens */
    --accent: var(--cyan);
    --accent-hover: var(--gold);
    --muted: #7a9aaa;
    --muted-light: #8aabb8;
    --border: rgba(77, 201, 246, 0.2);
    --shadow: rgba(77, 201, 246, 0.15);
    --focus: var(--cyan);

    /* Typography Scale */
    --text-xs: 0.8rem;
    --text-sm: 0.9rem;
    --text-base: 1.05rem;
    --text-lg: 1.2rem;
    --text-xl: 1.35rem;
    --text-2xl: 1.55rem;
    --text-3xl: 2.5rem;

    /* Spacing Scale */
    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 1.75rem;
    --space-xl: 2.5rem;
    --space-2xl: 4rem;
}

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

html { scroll-behavior: smooth; font-size: 100%; }

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

body {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--sea-deep);
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Cursor Spotlight */
#cursorSpotlight {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(600px circle at 50% 50%, rgba(77, 201, 246, 0.12), rgba(212, 175, 55, 0.06) 40%, transparent 70%);
}
#cursorSpotlight.active { opacity: 1; }

/* ===========================================
   2. ACCESSIBILITY
=========================================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sea-mid);
    color: var(--text-bright);
    padding: var(--space-sm) var(--space-md);
    font-weight: 500;
    z-index: 9999;
}
.skip-link:focus { top: 0; }

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

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================
   3. HERO SECTION
=========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: clamp(5rem, 10vh, 8rem) var(--space-sm) 0;
    position: relative;
    overflow: hidden;
    background: var(--sea-deep);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent 0%, var(--sea-deep) 100%);
    z-index: 3;
    pointer-events: none;
}

#heroCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    cursor: crosshair;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}
.hero-content * { pointer-events: none; }

.hero h1 {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(3.25rem, 10vw, 6rem);
    font-weight: 200;
    letter-spacing: 0.15em;
    line-height: 1;
    margin-bottom: var(--space-sm);
    color: var(--text-heading);
    text-shadow: 0 0 40px var(--cyan-glow), 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero h1 .meta {
    background: linear-gradient(180deg, var(--cyan) 0%, var(--text-subhead) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px var(--gold-glow));
    animation: shimmer 8s ease-in-out infinite;
    vertical-align: top;
}

.hero h1 .jh-sig {
    display: inline-block;
    vertical-align: top;
    position: relative;
}
.hero h1 .jh-sig img {
    height: 1.2em;
    width: auto;
    vertical-align: top;
    filter: brightness(1.2) drop-shadow(0 0 15px var(--cyan-glow));
    margin-right: 0.01em;
}

/* Hero tagline/subtitle/byline */
.hero .tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--cyan);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 15px var(--cyan-glow);
}

.hero .subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 200;
    color: var(--text-bright);
    max-width: 600px;
    margin: 0 auto var(--space-sm);
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero .byline {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 400;
}
.hero .byline .role {
    color: var(--muted);
    font-weight: 400;
    margin-left: 0.25em;
}

.hero-hint {
    position: absolute;
    bottom: 15rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(125, 216, 247, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: opacity 0.3s;
    pointer-events: none;
}
.hero-hint .hint-icon {
    font-size: 1rem;
    animation: pencil-wiggle 4s ease-in-out infinite;
}
.hero.drawing .hero-hint { opacity: 0; }

.hero-sig-inline {
    height: 11rem;
    opacity: 0.8;
    margin-top: var(--space-xs);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.scroll-indicator {
    position: absolute;
    bottom: 11rem;
    z-index: 4;
    animation: bounce 2s infinite;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.scroll-indicator svg {
    width: 35px;
    height: 35px;
    stroke-width: 2.5;
    animation: strokeGlow 0.8s ease-in-out infinite alternate;
}
.scroll-indicator .scroll-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.6;
}

/* ===========================================
   4. NAVIGATION
=========================================== */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(2, 10, 18, 0.92);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(77, 201, 246, 0.12);
    transform: translateY(-100%);
    transition: transform 0.25s ease;
    height: 40px;
    overflow: visible;
}
nav.visible { transform: translateY(0); }

.nav-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.6rem var(--space-md) 0;
    height: 100%;
}

/* Left side: shapes + name */
.nav-left {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    overflow: visible;
}

.nav-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-bright);
    text-decoration: none;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-left: 0.5rem;
}
.nav-title:hover { color: var(--gold); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: -0.5rem;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.95);
    margin: 4px 0;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Right side: section links */
.nav-right {
    display: flex;
    align-items: flex-start;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-right li {
    display: flex;
    align-items: flex-start;
    margin: 0;
}

.nav-right a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 0.625rem;
    transition: color 0.2s;
}
.nav-right a:hover, .nav-right a:focus { color: var(--gold); }

.nav-separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    padding: 0 0.5rem;
    pointer-events: none;
}

/* ===========================================
   5. SHAPE NAVIGATION
=========================================== */

/* --- Hero shape-nav (centered pill in hero) --- */
.shape-nav {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    width: fit-content;
    gap: 0;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem 0.5rem;
    border-radius: 2rem;
}

/* --- Shared shape-link base (hero) --- */
.shape-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    opacity: 0.4;
    transition: opacity 0.3s;
    text-decoration: none;
    width: 44px;
    height: 28px;
    overflow: hidden;
}
.shape-link:hover { opacity: 0.8; }
.shape-link.active { opacity: 1; }

.shape-link .shape {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    fill: none;
    stroke: var(--cyan);
    stroke-width: 2;
    transition: all 0.2s ease;
}
.shape-link.active .shape {
    fill: rgba(77, 201, 246, 0.15);
    filter: drop-shadow(0 0 8px var(--cyan-glow));
}

/* --- Shape labels (in flow, not absolute) --- */
.shape-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    font-weight: 500;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-top: 0.15rem;
}
.shape-label-img {
    height: 0.6rem;
    width: auto;
    filter: brightness(1.2);
    opacity: 0;
    transition: opacity 0.15s ease;
    margin-top: 0.1rem;
}

/* Hero: on hover, shrink shapes to top, show labels */
.shape-nav .shape-link:hover .shape,
.shape-nav:hover .shape-link .shape {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
}
.shape-nav .shape-link:hover .shape-label,
.shape-nav .shape-link:hover .shape-label-img,
.shape-nav:hover .shape-link .shape-label,
.shape-nav:hover .shape-link .shape-label-img {
    opacity: 1;
}

/* --- Navbar shape overrides (compact) --- */
.nav-left .shape-link {
    width: 26px;
    height: 24px;
    opacity: 0.5;
    padding: 0 0.1rem;
    box-sizing: border-box;
}
.nav-left .shape-link:hover { opacity: 0.85; }
.nav-left .shape-link.active { opacity: 1; }
.nav-left .shape-link .shape {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
}
.nav-left .shape-link.active .shape {
    filter: drop-shadow(0 0 4px var(--cyan-glow));
}
/* Navbar: shrink shapes on hover to fit labels inside nav height */
.nav-left .shape-link:hover .shape {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
}
.nav-left .shape-label {
    font-size: 0.4rem;
    margin-top: 0.1rem;
}
.nav-left .shape-label-img {
    height: 0.45rem;
    margin-top: 0.08rem;
}
.nav-left .shape-link:hover .shape-label,
.nav-left .shape-link:hover .shape-label-img {
    opacity: 1;
}

/* ===========================================
   6. TYPOGRAPHY
=========================================== */
h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-base);
    font-weight: 500;
    margin-bottom: var(--space-md);
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text-heading);
    text-shadow: 0 0 10px var(--cyan-glow);
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
h2::before {
    content: '\203A\0020';
    opacity: 0.5;
    flex-shrink: 0;
}
h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(77, 201, 246, 0.4), rgba(77, 201, 246, 0.05));
}

h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-lg);
    font-weight: 500;
    margin: var(--space-md) 0 var(--space-sm);
    line-height: 1.25;
    color: var(--text-heading);
    cursor: default;
}

h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-base);
    font-weight: 500;
    margin: var(--space-sm) 0 var(--space-xs);
    color: var(--text-subhead);
    cursor: default;
}

p {
    margin-bottom: var(--space-sm);
    max-width: max-content;
    color: var(--text-primary);
    cursor: default;
}

strong {
    font-weight: 500;
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
}
em {
    font-style: italic;
    color: var(--text-bright);
}

.muted {
    color: var(--muted);
    font-size: var(--text-sm);
}

a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(212, 175, 55, 0.5);
    transition: all 0.3s ease;
    position: relative;
}
a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}

/* External link icon */
a[target="_blank"]::after {
    content: "\2197";
    display: inline-block;
    font-size: 0.55em;
    margin-left: 0.25em;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
a[target="_blank"]:hover::after { opacity: 1; }

ul, ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-md);
}
li {
    margin-bottom: var(--space-xs);
    line-height: 1.65;
    color: var(--text-primary);
    cursor: default;
}

/* ===========================================
   7. MAIN LAYOUT & GRIDS
=========================================== */
main {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    position: relative;
    z-index: 1;
    
}

section {
    margin-bottom: var(--space-xl);
    scroll-margin-top: 4rem;
}

/* Grid Layouts */
.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}
.grid-1 > .content-card { margin: 0; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}
.grid-2 > .content-card { margin: 0; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}
.grid-3 > .content-card { margin: 0; }

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}
.grid-4 > .content-card { margin: 0; }

/* Card grid - auto-responsive: 2 cols default, 3 cols on widescreen */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}
.card-grid > .content-card { margin: 0; }

/* Widescreen split - two sections side by side */
.widescreen-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.span-full { grid-column: 1 / -1; }

/* ===========================================
   8. CONTENT CARDS
=========================================== */
.content-card {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 20, 40, 0.08);
    border-radius: 4px;
    border: none;
    padding: var(--space-md);
    padding-left: calc(var(--space-md) + 1px);
    margin: var(--space-sm) 0;
    position: relative;
    overflow: hidden;
}
.content-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, rgba(77, 201, 246, 0.4), rgba(77, 201, 246, 0.05));
    transition: width 0.3s ease;
}
.content-card:hover::after {
    width: 2px;
}

.content-card h4 {
    margin-top: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-subhead);
}
.content-card p {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
}
.content-card p:last-child { margin-bottom: 0; }

/* Watermark number (optional) */
.content-card::before {
    content: attr(data-num);
    position: absolute;
    top: 10px;
    right: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 500;
    color: rgba(77, 201, 246, 0.05);
    line-height: 1;
    pointer-events: none;
}

/* About card - large intro text */
.content-card.about p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.7;
    color: var(--text-bright);
    font-weight: 400;
}
.content-card.about strong {
    color: var(--cyan);
    font-weight: 500;
    text-shadow: 0 0 8px var(--cyan-glow);
}

/* Endorsement card */
.content-card.endorsement {
    font-size: var(--text-base);
    font-weight: 400;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-bright);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.content-card.endorsement.short {
    font-size: var(--text-lg);
}
.content-card.endorsement cite {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-style: normal;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--muted);
    margin-top: var(--space-sm);
}
.content-card.endorsement cite em { font-style: italic; }
.content-card.endorsement a:hover {
    text-shadow: none;
}

/* Masonry-style columns layout (for endorsements, etc.) */
.columns-2 {
    column-count: 2;
    column-gap: var(--space-lg);
    column-fill: balance;
}
.columns-2 > * {
    break-inside: avoid;
    margin-bottom: var(--space-md);
}

/* Sections within widescreen-split have tighter margins */
.widescreen-split section {
    margin-bottom: 0;
}

/* Card hierarchy */
.card-featured {
    background: rgba(0, 20, 40, 0.1);
    border: none;
    border-radius: 4px;
    padding: var(--space-lg);
    position: relative;
}
.card-featured::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, rgba(77, 201, 246, 0.5), rgba(77, 201, 246, 0.05));
}

.card-standard {
    background: var(--sea-panel);
    border: none;
    border-radius: 4px;
    padding: var(--space-md);
    position: relative;
}
.card-standard::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(77, 201, 246, 0.3), rgba(77, 201, 246, 0.05));
}

/* Logo-left card layout */
.card-logo-left {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-md);
    align-items: start;
}
.card-logo-left .project-logo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 4px;
}
.card-logo-left .project-content { flex-grow: 1; }

/* Featured split layout: info left, interactive right */
.card-featured-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    align-items: center;
}
.card-featured-split .project-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.card-featured-split .project-info .project-logo {
    width: 100px;
    height: 120px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: var(--space-xs);
}
.card-featured-split .project-info h4 {
    margin: 0;
    font-size: var(--text-xl);
}
.card-featured-split .project-info p { margin: 0; }
.card-featured-split .project-interactive {
    display: flex;
    flex-direction: column;
}
.card-featured-split .project-interactive .iframe-seamless {
    width: 100%;
    height: 380px;
    border-radius: 4px;
}

/* Compact variant */
.card-featured-split.compact {
    padding: var(--space-md);
}
.card-featured-split.compact .project-info {
    gap: var(--space-md);
}
.card-featured-split.compact .project-info .project-logo {
    width: 100px;
    height: 100px;
}
.card-featured-split.compact .project-info h4 {
    font-size: var(--text-lg);
}
.card-featured-split.compact .project-info p {
    font-size: var(--text-sm);
}

/* ===========================================
   9. COMPONENTS
=========================================== */

/* Video Embed (16:9 responsive) */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: var(--space-md) 0;
    border-radius: 4px;
    border: 1px solid rgba(77, 201, 246, 0.1);
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Video card (video + info) */
.video-card {
    background: var(--sea-panel);
    border: 1px solid rgba(77, 201, 246, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.video-card .video-embed {
    margin: 0;
    border-radius: 0;
}
.video-card .video-info {
    padding: var(--space-md);
}
.video-card h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-xs);
}
.video-card .platform-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(77, 201, 246, 0.1);
    border-radius: 4px;
    font-size: var(--text-xs);
    color: var(--cyan);
    margin-top: var(--space-xs);
}

/* Image card */
.image-card {
    background: var(--sea-panel);
    border: 1px solid rgba(77, 201, 246, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.image-card img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.image-card .image-info {
    padding: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

/* Umbrella section header */
.umbrella-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(77, 201, 246, 0.1);
}
.umbrella-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--cyan);
    margin-bottom: var(--space-xs);
}
.umbrella-header p {
    color: var(--text-primary);
    font-size: var(--text-base);
}

/* Year badge */
.year-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    font-size: var(--text-xs);
    color: var(--gold);
    margin-left: var(--space-sm);
    font-weight: 500;
}

/* Seed phrase / copyable text */
.seed-phrase {
    display: block;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 10, 20, 0.6);
    border: 1px solid rgba(122, 229, 130, 0.2);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--green);
    white-space: pre-wrap;
    position: relative;
}
.seed-phrase code {
    display: block;
    user-select: all;
    color: inherit;
}
.copy-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 0.25rem 0.75rem;
    background: rgba(77, 201, 246, 0.15);
    border: 1px solid rgba(77, 201, 246, 0.3);
    color: var(--cyan);
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--text-xs);
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s;
}
.copy-btn:hover {
    background: rgba(77, 201, 246, 0.25);
}
.copy-btn.copied {
    background: rgba(122, 229, 130, 0.2);
    border-color: rgba(122, 229, 130, 0.4);
    color: var(--green);
}

/* Iframe seamless */
.iframe-seamless {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 4px;
}

/* Sketchfab embed wrapper */
.sketchfab-embed-wrapper {
    margin: var(--space-md) 0;
}
.sketchfab-embed-wrapper iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 4px;
}

/* Genealogy item - kept for future use */
.genealogy-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    padding: 0;
    align-items: start;
}
.genealogy-item .year {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gold);
    line-height: 1.4;
    padding-top: 2px;
}
.genealogy-item .content h4 { margin-top: 0; font-size: var(--text-lg); line-height: 1.25; }
.genealogy-item .content p { font-size: var(--text-base); line-height: 1.65; }
.genealogy-item .content p:last-of-type { margin-bottom: 0; }

/* ===========================================
   10. FOOTER
=========================================== */
footer {
    background: var(--sea-deep);
    color: var(--text-primary);
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(77, 201, 246, 0.1);
}
.footer-title {
    font-family: 'Raleway', sans-serif;
    font-size: var(--text-lg);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-bright);
    margin-bottom: var(--space-xs);
}
.footer-subtitle {
    font-size: var(--text-xs);
    color: var(--muted);
    margin-bottom: var(--space-md);
}
.footer-copyright {
    font-size: var(--text-xs);
    color: var(--muted);
    margin-bottom: var(--space-xs);
}
footer a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(212, 175, 55, 0.5);
}
footer a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}
footer .version {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--muted);
    opacity: 0.6;
    margin-top: var(--space-sm);
    letter-spacing: 0.05em;
}
.footer-signature img {
    height: 2em;
    opacity: 0.7;
}

/* Utility: Beliefs list */
.beliefs-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.beliefs-list li {
    margin-bottom: 0.5rem;
}

/* Utility: Video embed iframe rounding */
.video-embed iframe {
    border-radius: 4px;
}

/* Utility: Blockquote citation */
.blockquote-citation {
    border-left: 2px solid var(--cyan);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    opacity: 0.9;
}
.citation-author {
    font-size: 0.9em;
    font-style: normal;
}

/* Utility: Image placeholder (for SVG/icon placeholders) */
.image-placeholder {
    aspect-ratio: 4/3;
    background: rgba(0, 20, 40, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.image-placeholder.dashed {
    background: rgba(0, 20, 40, 0.3);
    border: 1px dashed rgba(77, 201, 246, 0.15);
}

/* ===========================================
   11. ANIMATIONS
=========================================== */
@keyframes shimmer {
    0%, 100% {
        filter: drop-shadow(0 0 20px var(--cyan-glow));
        opacity: 0.95;
    }
    50% {
        filter: drop-shadow(0 0 25px var(--gold-glow));
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes strokeGlow {
    0% { stroke: rgba(125, 216, 247, 0.3); }
    100% { stroke: rgba(125, 216, 247, 0.8); }
}

@keyframes pencil-wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ===========================================
   12. RESPONSIVE BREAKPOINTS
=========================================== */

/* Mobile nav */
@media (max-width: 900px) {
    .nav-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }
    .nav-title { display: none; }
    .nav-right {
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        background: rgba(2, 10, 18, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: var(--space-md) 0;
        border-bottom: 1px solid rgba(77, 201, 246, 0.1);
        display: none;
    }
    .nav-right.open { display: flex; }
    .nav-right li { height: auto; }
    .nav-right a {
        padding: .5rem var(--space-md);
        height: auto;
        font-size: 0.85rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--text-primary);
    }
    .nav-right a:hover, .nav-right a:focus { color: var(--gold); }

    /* Grid collapse */
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }

    /* Card layout collapse */
    .card-featured-split {
        grid-template-columns: 1fr;
    }
    .card-featured-split .project-info {
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    :root {
        --text-base: 0.9rem;
        --space-lg: 1.25rem;
        --space-xl: 2rem;
        --space-2xl: 3rem;
    }
    main { padding: var(--space-md) var(--space-md) var(--space-xl); }

    nav { height: 36px; }
    .nav-inner { padding: 0 var(--space-sm); }
    .nav-title { font-size: 0.9375rem; }

    .genealogy-item { grid-template-columns: 1fr; gap: var(--space-xs); }
    .genealogy-item .year { margin-bottom: var(--space-xs); }

    .hero { padding-top: 4rem; padding-left: var(--space-md); padding-right: var(--space-md); }
    .hero-hint { bottom: 7rem; }
}

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4, .card-grid, .widescreen-split {
        grid-template-columns: 1fr;
    }
    .columns-2 {
        column-count: 1;
    }

    .card-logo-left {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .card-logo-left .project-logo {
        width: 150px;
        margin: 0 auto;
    }

    /* Mobile: pad images in image-cards to save vertical space */
    .image-card img {
        padding: var(--space-sm);
        object-fit: contain;
    }

    /* Mobile: reduce placeholder height for stealth/new client cards */
    .image-placeholder {
        aspect-ratio: 3/1;
    }

    /* Featured-split project logos on mobile */
    .card-featured-split .project-info .project-logo {
        width: 80px;
        height: 100px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    nav { height: 34px; }
    .nav-title { font-size: 0.875rem; }
    .hero h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
}

/* Mobile portrait */
@media (max-width: 768px) and (orientation: portrait) {
    .hero {
        min-height: 100svh;
        padding-bottom: 5rem;
    }
    .scroll-indicator { bottom: 2rem; }
}

/* Widescreen breakpoints */
@media (min-width: 900px) {
    main {
        max-width: 900px;
        padding: var(--space-lg) var(--space-xl);
    }

    /* Widescreen split becomes 2 columns */
    .widescreen-split {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    main { max-width: 1100px; }

    /* Card grid goes to 3 columns if there are 3+ items */
    .card-grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1600px) {
    main { max-width: 1300px; }
}

/* Print */
@media print {
    body { font-size: 11pt; line-height: 1.5; }
    nav, .scroll-indicator, #heroCanvas, .hero-hint { display: none; }
    .hero { min-height: auto; padding: 1.5rem 0; background: none; }
    .hero::after { display: none; }
    .hero h1, .hero .subtitle, .hero .tagline, .hero .byline { color: #1a1a2e; }
    .hero h1 .meta { -webkit-text-fill-color: #2a6a7a; }
}
