


:root {
    --color-1: #A288E3;

    --color-4: #FFD600; /* Updated to bright yellow */
    --color-3: #FFD600;
     --infoTop: 120px;
}



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

html, body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      font-family: 'Space Grotesk', sans-serif;
      background-attachment: fixed;
      color: #333333;
      background-color: #fcfcfc;
      
    }

@keyframes gradientSlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-left, .nav-right {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.nav-links-column {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 12rem;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.nav-links-column a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
 /*   text-shadow: yellow; */
    white-space: nowrap;
}

.nav-links-column a:hover {
    background-color: rgba(0,0,0, .1);
    transform: scale(1.05);

}

.nav-links {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 2rem;
}



header {
 
    color: var(--color-4); 
    margin-top: 0;
    top: 0;
    width: 100%;
   /* height:4rem; */

}

header h1 {
    text-align: center;
    font-size: 2.4rem;
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 16px;
    text-shadow: 0px 0px 10px rgba(255,255,255,0.9), 2px 2px 12px rgba(255,255,255,0.6);
}

nav {
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* ── Universal Premium Dropdown ── */
.nav-dropdown { position: relative; }
.nav-dropdown > a { position: relative; }
.nav-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    
    /* Glassmorphism base */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    
    border-radius: 12px;
    padding: 10px 0;
    list-style: none;
    z-index: 2000;
    
    /* Dynamically fit long titles without 2 lines */
    min-width: max-content;
    white-space: nowrap;
    
    /* Smooth entrance animation */
    transform-origin: top center;
    animation: dropdownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFade {
    0% { opacity: 0; transform: translateY(-10px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nav-dropdown .dropdown li { padding: 0; margin: 0; }
.nav-dropdown .dropdown li a { 
    display: block; 
    padding: 12px 24px; 
    color: #4195DE; /* Site Blue */
    text-decoration: none; 
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.nav-dropdown .dropdown li a:hover { 
    background: rgba(210, 59, 114, 0.08); /* Faint pink tint */
    color: #D23B72; /* Site Pink */
    padding-left: 30px; /* Sleek hover nudge */
}

.nav-dropdown:hover .dropdown,
.nav-dropdown .dropdown:hover { display: block; }

/* ── Dark Theme Overrides for Games/Apps/Photos ── */
body.comments-page .nav-dropdown .dropdown,
body.brickbreaker-page .nav-dropdown .dropdown,
body.photo-page .nav-dropdown .dropdown {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 214, 0, 0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

body.comments-page .nav-dropdown .dropdown li a,
body.brickbreaker-page .nav-dropdown .dropdown li a,
body.photo-page .nav-dropdown .dropdown li a {
    color: rgba(255,255,255,0.85); 
}

body.comments-page .nav-dropdown .dropdown li a:hover,
body.brickbreaker-page .nav-dropdown .dropdown li a:hover,
body.photo-page .nav-dropdown .dropdown li a:hover {
    background: rgba(255, 214, 0, 0.12);
    color: #FFD600; /* Yellow */
}


/* ── I-a Homepage Layout ──────────────────────────────────────────────── */
body.home nav {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none; /* re-enabled per child */
}

/* Full-screen flex container */
.home-layout {
    display: flex;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Left: name block */
.home-name {
    width: 55%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: 5vw;
    padding-bottom: 4vh;
    pointer-events: none;
    user-select: none;
}

.name-first,
.name-last {
    font-family: 'Russo One', sans-serif;
    font-weight: 400; /* Russo One is single-weight */
    font-size: clamp(4rem, 10.5vw, 11rem);
    color: #FFD600;
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-shadow: 2px 4px 16px rgba(0,0,0,0.35);
}

/* Yellow vertical divider */
.home-divider {
    width: 2px;
    background: #FFD600;
    flex-shrink: 0;
    align-self: stretch;
    margin: 6vh 0;
    opacity: 0.9;
    box-shadow: 0 0 10px rgba(255, 214, 0, 0.4);
}

/* Right: links block */
.home-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 8vw; /* push links rightward, away from divider */
    pointer-events: auto;
}

.home-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.home-nav-list > li > a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 2.8vw, 2.8rem);
    font-weight: 500;
    color: white;
    text-decoration: none;
    letter-spacing: 0.01em;
    text-shadow: 1px 2px 8px rgba(0,0,0,0.5);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.25); /* Elastic bounce */
    display: inline-block;
    transform-origin: left center; /* Grow outward securely */
}

.home-nav-list > li > a:hover {
    color: #FFD600;
    transform: scale(1.08);
}

/* Dropdown positioning under home-nav-list items */
body.home .home-nav-list .nav-dropdown {
    position: relative;
}

body.home .home-nav-list .dropdown {
    display: none;
    position: absolute;
    left: 110%;          /* expands to the RIGHT, never covers links below */
    top: 0;
    min-width: 240px;
    list-style: none;
    padding: 0.4rem 0 0.4rem 1.2rem;
    margin: 0;
    z-index: 2001;
    border-left: 2px solid #FFD600;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

body.home .home-nav-list .nav-dropdown:hover .dropdown {
    display: block;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

body.home .home-nav-list .dropdown li a {
    display: block;
    padding: 0.35rem 0;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.4rem);
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.15s ease;
}

body.home .home-nav-list .dropdown li a:hover {
    color: #FFD600;
}

/* Override global link colors inside home nav */
body.home .home-nav-list a:link,
body.home .home-nav-list a:visited {
    color: white;
}
body.home .home-nav-list a:hover {
    color: #FFD600;
}


/* Keep navigation at top for all other pages - not floating */
body:not(.home) nav {
    position: static;
    transform: none;
    width: 100%;
}

/* Homepage-specific link colors — scoped to home-nav-list */
body.home a:visited {
    color: rgb(255,255,255);
}

body.home a:active {
    color: white;
}

/* Catch-Fall game page specific styling */
body.catchfall-game {
    background-color: #fcfcfc;
    color: #333333;
}

body.catchfall-game nav {
    background-color: #fafafa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.catchfall-game nav .nav-links a.active {
    color: #111111;
    text-decoration: underline;
    text-decoration-color: #FFD600;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

body.catchfall-game nav .nav-links a:hover {
    color: #111111;
}

/* Comments page specific styling */
body.comments-page {
    background-color: #333333;
      background-color: #fcfcfc;
    color: white;
}

body.comments-page nav {
    background-color: rgba(0, 0, 0, 0.8);
}

body.comments-page h1 {
    color: white;
}

/* Spikes page specific styling */
body.spikes-page nav {
    position: static;
    background-color: #333333;
    padding: 1rem 2rem;
}

body.spikes-page .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.spikes-page .nav-links {
    display: flex;
    gap: 2rem;
    margin: 0;
}

/* Spikes page specific styling */
body.spikes-page nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #333333;
    padding: 1rem 2rem;
    z-index: 1000;
}

body.spikes-page .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.spikes-page .nav-links {
    display: flex;
    gap: 2rem;
    margin: 0;
}

body.spikes-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#instructions-overlay {
    position: fixed;
    top: 100px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.secret-link {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--color-4);
    opacity: 60%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#audioButton {
    padding: 10px 20px;
    font-size: 14px;
    font-family: 'Space Grotesk', sans-serif;
    background-color: maroon;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 20px;
    transition: background-color 0.3s ease;
}

#audioButton:hover {
    background-color: white;
}




.footer {
  position: sticky;
  left: 0;
  bottom: 0;
  width: 100%;
  color: white;
  text-align: center;
}

a:link {
  color: #4195DE;
}

/* visited link */
a:visited {
  color: #D23B72;
}

/* mouse over link */
a:hover {
  color: white;
}

/* selected link */
a:active {
  color: white;
}


/* ── Ising model background canvas ─────────────────────────────────── */
#ising-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#bezier-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ── Floating temperature pill (homepage only) ──────────────────────── */
#ising-ctrl {
    display: none; /* hidden on non-home pages */
}

body.home #ising-ctrl {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: fixed;
    bottom: 48px;   /* just above the visitor counter pill */
    right: 18px;
    z-index: 2000;
    pointer-events: auto;

    /* frosted glass pill */
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);

    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    color: #ffffff; /* Swapped to white for vital legibility */
    white-space: nowrap;

    /* fade in after a second so it doesn't immediately distract */
    opacity: 0;
    animation: ising-ctrl-fadein 0.6s ease 1.2s forwards;
}

@keyframes ising-ctrl-fadein {
    to { opacity: 1; }
}

#ising-ctrl label {
    cursor: default;
    user-select: none;
    font-family: 'Space Grotesk', sans-serif;
    font-style: italic;
    min-width: 3.8rem;
}

#ising-ctrl input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 3px;
    background: rgba(255, 214, 0, 0.4); /* subtle yellow tracking */
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#ising-ctrl input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    transition: transform 0.1s, background 0.2s;
}
#ising-ctrl input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #FFD600; /* Yellow interaction */
}
#ising-ctrl input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}
#ising-ctrl input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #FFD600;
}

#ising-reset-home {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.1rem;
    transition: transform 0.25s ease, color 0.15s;
}
#ising-reset-home:hover {
    color: #FFD600; /* Yellow interaction */
    transform: rotate(-180deg);
}

/* Legacy vanta placeholder – keep rule so old references don't break */
#vanta-bg {
    display: none;
}




section p {
    font-size: 1.1rem;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.7;
    color: #333333;
}

.about-header h1 {
    font-size: 2.5rem;
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #333333;
}

.content, header, main, .footer {
  position: relative;
  z-index: 1;
}

/* Sketch container */
#sketch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    min-height: 400px;
    font-family: 'Space Grotesk', sans-serif;
}

/* Make p5.js canvas responsive */
#sketch-container canvas {
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

}


/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-left, .nav-right, .nav-center {
        flex: none;
        width: 100%;
    }
    
    .nav-links-column {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links-column a {
        font-size: 1.2rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 1rem;
    }
    
    #sketch-container {
        min-height: 300px;
    }
}

/* About Page Styles */
.about-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.about-text {
    flex: 1;
    font-size: 1.2rem;
    line-height: 1.6;
}

.about-image {
    flex: 0 0 300px; /* Fixed width for image container */
}

.headshot {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.headshot:hover {
    transform: scale(1.05);
}

/* Responsive design for about page */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        flex: none;
        align-self: center;
    }
    
    .headshot {
        max-width: 250px;
    }
}

/* General link styling */
a {
    font-weight: bold;
}

/* Sketchpad instructions styling */
.instructions {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: left;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    color: #333333;
      background-color: #fcfcfc;
    display: flex;
    gap: 6rem;
    justify-content: space-between;
}

.info-ui {
  position: fixed;
  inset: 0;           /* lets children position from edges */
  pointer-events: none; /* buttons/panels re-enable their own */
  z-index: 3000;      /* above canvas (yours is 0 or 2000 during fractal) */
}

/* Toggle buttons */
.info-toggle {
  position: fixed;
  top: 12px;
  padding: 16px 24px;
  font: 800 24px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  border: none;
    letter-spacing: .1em;
    text-transform: uppercase;
  border-radius: 999px;
  background: rgba(0,0,0,.75);
  color: white;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .15s ease, background .15s ease;
    top: var(--infoTop);
}
.info-toggle:hover { transform: translateY(-1px); background: rgba(0,0,0,.85); }
.info-toggle.left  { left: 12px; }
.info-toggle.right { right: 12px; }

/* Panels */
.info-panel {
  position: fixed;
  top: 52px; /* sits under the buttons */
  width: min(360px, 86vw);
  max-height: 60vh;
  overflow: auto;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(4px);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  padding: 12px 14px 14px;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform .22s ease, opacity .22s ease;
  opacity: 0;
  visibility: hidden;
    top: calc(var(--infoTop)+40px);
}
.info-panel.left  { left: 12px; transform: translateX(-10px); }
.info-panel.right { right: 12px; transform: translateX(10px); }

.info-panel[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.info-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.info-panel__header h3 { margin: 0; font-size: 16px; }
.info-panel .close {
  background: transparent; border: none; font-size: 22px; line-height: 1;
  cursor: pointer; color: #333; padding: 2px 6px; border-radius: 6px;
}
.info-panel .close:hover { background: rgba(0,0,0,.06); }

/* Color swatches */
.color-red{color:#e53935}.color-orange{color:#fb8c00}.color-yellow{color:#fbc02d}
.color-green{color:#43a047}.color-blue{color:#1e88e5}.color-purple{color:#8e24aa}
.color-black{color:#000}

/* small screens: keep tidy */
@media (max-width: 720px){
  .info-toggle{ top: 8px; padding:8px 12px; font-size:13px }
  .info-panel{ top: 48px; max-height: 55vh; }
}

.instructions-column {
    flex: 1;
    margin-right: 4rem;
}

.color-keys-column {
    flex: 1;
    margin-left: 4rem;
}

#fractalCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 12000;       /* above everything */
  pointer-events: none; /* clicks pass through */
  display: none;        /* shown only during animation */
}

/* Sketchpad page specific header styling */
body.sketchpad-page header {
    position: static;
    background-color: white;
    padding: 1rem;
}

body.sketchpad-page h1 {
    color: #333333;
      background-color: #fcfcfc;
    font-style: italic;
}

.instructions p {
    margin: 0.3rem 0;
}

.color-keys {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.color-keys span {
    white-space: nowrap;
}

/* Color key styling - each color displays in its actual color */
.color-r, .color-red { 
    color: red; 
    font-size: 1.1rem;
}
.color-o, .color-orange { 
    color: orange; 
    font-size: 1.1rem;
}
.color-y, .color-yellow { 
    color: gold; 
    font-size: 1.1rem;
}
.color-g, .color-green { 
    color: green; 
    font-size: 1.1rem;
}
.color-b, .color-blue { 
    color: blue; 
    font-size: 1.1rem;
}
.color-p, .color-purple { 
    color: purple; 
    font-size: 1.1rem;
}
.color-0, .color-black { 
    color: #333333;
      background-color: #fcfcfc; 
    font-size: 1.1rem;
}

/* Mobile: stacked dropdowns and homepage layout adjustments */
@media (max-width: 740px) {
    /* Make dropdowns stack vertically and fill the available width */
    .nav-dropdown .dropdown {
        position: static !important; /* flow with document */
        display: none;               /* shown when parent hovered / opened */
        width: 100%;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        background: rgba(255,255,255,0.98);
    }

    /* show as a vertical list when parent is hovered or has .open */
    .nav-dropdown:hover .dropdown,
    .nav-dropdown.open .dropdown {
        display: flex;
        flex-direction: column;
    }

    .nav-dropdown .dropdown li a {
        padding: 14px 18px;
        font-size: 1rem;
        white-space: normal; /* allow wrapping inside each item */
        display: block;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .nav-dropdown .dropdown li:last-child a { border-bottom: none; }

    /* Homepage: revert the big fixed, absolute-row layout to a normal stacked layout */
    body.home nav {
        /* keep it positioned so z-index works, but leave it in flow */
        position: relative;
        height: auto;
        pointer-events: auto;
        z-index: 99999; /* ensure nav sits above backgrounds/overlays on mobile */
    }
    body.home .nav-container {
        height: auto;
        pointer-events: auto;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    body.home .nav-row {
        position: static;
        top: auto;
        margin: 8px 0;
    }
    body.home .home-welcome {
        position: static;
        transform: none;
        margin: 6px 0;
        font-size: 1.05rem;
    }
    /* Stack homepage nav links into a single column on small screens */
    body.home .nav-row .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    body.home .nav-row .nav-links a {
        font-size: 1.6rem;
        letter-spacing: 0.12em;
        padding: 12px 18px;
        display: inline-block;
    }
        /* Arrange welcome text above the combined button column and make both rows flow consecutively */
        body.home .home-welcome { order: 0; }
        body.home .nav-row.top-row { order: 1; }
        body.home .nav-row.bottom-row { order: 2; }
        /* Make spacing consistent between all buttons across both rows */
        body.home .nav-row .nav-links { gap: 0.75rem; }
        /* Make spacing uniform between ALL buttons (li elements), even across the two ul groups */
        body.home .nav-row .nav-links { margin: 0; padding: 0; }
        body.home .nav-row .nav-links li { margin: 0 0 0.75rem 0; list-style: none; }
        /* Remove default list spacing on the ULs so groups appear continuous */
        body.home .nav-row { margin: 0; padding: 0; }
}


/* Global pink links */
a { color: #D23B72; transition: color 0.15s ease; }
a:hover { color: #FFD600; text-decoration: none; }

/* ── Portfolio rework: shared navigation, case-study pages, and responsive layout ── */
:root {
    --ink: #17233b;
    --paper: #f7f5ef;
    --paper-blue: #e7f2fa;
    --blue: #1f5fc4;
    --yellow: #ffd600;
    --pink: #d23b72;
    --line: rgba(23, 35, 59, 0.18);
    --shadow-hard: 7px 7px 0 var(--ink);
}

html { scroll-behavior: smooth; }

body.site-page {
    --nav-tab-fill: #e6bd00;
    --nav-active-fill: var(--paper);
    --nav-bar-fill: var(--yellow);
    color: var(--ink);
    background: var(--paper);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.5;
}

body.site-page * { box-sizing: border-box; }

body.site-page a { color: inherit; }

body.site-page .site-nav {
    position: sticky !important;
    inset: 0 auto auto 0 !important;
    width: 100%;
    padding: 0 !important;
    background: var(--nav-bar-fill);
    border-bottom: 2px solid var(--ink);
    backdrop-filter: blur(14px);
    z-index: 1000;
}

body.site-page .site-nav__inner {
    width: min(1180px, calc(100% - 2.5rem));
    min-height: 4.1rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1.2rem;
}

/* Rendered only when the shared navigation script is unavailable. */
body.site-page .site-nav__fallback {
    width: min(1180px, calc(100% - 2.5rem));
    min-height: 4.1rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    padding: .45rem 0;
}

body.site-page .site-nav__fallback a {
    color: var(--ink);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
}

body.site-page .site-nav__fallback a:hover,
body.site-page .site-nav__fallback a:focus-visible {
    color: var(--blue);
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

body.site-page .site-brand {
    align-self: center;
    color: var(--ink);
    font-family: 'Russo One', sans-serif;
    font-size: 1.2rem;
    letter-spacing: .04em;
    text-decoration: none;
}

body.site-page .site-brand span { color: var(--pink); }

body.site-page .site-menu {
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    gap: .38rem;
    padding-top: .5rem;
}

body.site-page .site-menu a {
    color: var(--ink);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
}

body.site-page .site-menu > .site-menu__link,
body.site-page .site-work-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 2.7rem;
    margin: .4rem 0 -2px;
    color: var(--ink);
    background: var(--nav-tab-fill);
    border: 2px solid var(--ink);
    transition: background .15s ease, color .15s ease;
}

body.site-page .site-menu > .site-menu__link {
    padding: .52rem .75rem .62rem;
}

body.site-page .site-menu > .site-menu__link:hover,
body.site-page .site-menu > .site-menu__link:focus-visible,
body.site-page .site-work-menu:hover,
body.site-page .site-work-menu:focus-within {
    color: var(--blue);
    background: var(--nav-tab-fill);
    filter: brightness(1.04);
}

body.site-page .site-menu > .site-menu__link.is-current,
body.site-page .site-work-menu.is-current {
    z-index: 2;
    color: var(--ink);
    background: var(--nav-active-fill);
    border-bottom-color: var(--nav-active-fill);
}

body.site-page .site-menu > .site-menu__link:focus-visible,
body.site-page .site-work-menu:focus-within {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

body.site-page .site-menu__utility,
body.site-page .site-menu__github {
    align-self: center;
    margin-left: .25rem;
    padding: .4rem .58rem;
    color: var(--ink) !important;
    background: #fffefa;
    border: 2px solid var(--ink) !important;
}

body.site-page .site-menu__resume { box-shadow: 2px 2px 0 var(--blue); }
body.site-page .site-menu__github { box-shadow: 2px 2px 0 var(--pink); }

body.site-page .site-menu__utility:hover,
body.site-page .site-menu__utility:focus-visible,
body.site-page .site-menu__github:hover,
body.site-page .site-menu__github:focus-visible {
    background: var(--paper);
    color: var(--blue) !important;
}

body.site-page .site-menu__resume:hover,
body.site-page .site-menu__resume:focus-visible {
    background: var(--blue);
    color: #fff !important;
}

body.site-page .site-menu__github:hover,
body.site-page .site-menu__github:focus-visible {
    background: var(--pink);
    color: #fff !important;
}

body.site-page .site-work-menu {
    padding: 0;
}

body.site-page .site-work-menu__all {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: .52rem .5rem .62rem .75rem;
}

body.site-page .site-work-menu__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-width: 1.7rem;
    margin: 0;
    padding: 0 .42rem .18rem;
    color: inherit;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--ink);
    cursor: pointer;
}

body.site-page .site-work-menu__toggle:hover,
body.site-page .site-work-menu__toggle:focus-visible { color: var(--blue); }

body.site-page .site-menu-button:focus-visible,
body.site-page .site-work-menu__toggle:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

body.site-home .site-menu-button:focus-visible,
body.site-home .site-work-menu__toggle:focus-visible { outline-color: var(--yellow); }

body.site-page .site-work-menu__chevron {
    width: .52rem;
    height: .52rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-.12rem) rotate(45deg);
    transition: transform .15s ease;
}

body.site-page .site-work-menu__toggle[aria-expanded="true"] .site-work-menu__chevron { transform: translateY(.12rem) rotate(225deg); }

body.site-page .site-work-dropdown {
    position: absolute;
    top: calc(100% + .15rem);
    right: 0;
    z-index: 1001;
    display: none;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 1.15rem;
    width: min(700px, calc(100vw - 3rem));
    padding: 1.1rem;
    color: var(--ink);
    background: #fffefa;
    border: 2px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
}

body.site-page .site-work-menu.is-open .site-work-dropdown { display: grid; }

body.site-page .site-work-dropdown__title {
    display: block;
    color: var(--blue) !important;
    border-bottom: 1px solid var(--line) !important;
    font-size: .76rem !important;
    font-weight: 700;
    letter-spacing: .07em;
    line-height: 1.25;
    padding: 0 0 .5rem !important;
    text-transform: uppercase;
}

body.site-page .site-work-dropdown__title:hover,
body.site-page .site-work-dropdown__title:focus-visible { border-bottom-color: var(--yellow) !important; }

body.site-page .site-work-dropdown__links { display: grid; gap: .42rem; margin-top: .65rem; }

body.site-page .site-work-dropdown__link {
    display: block;
    color: var(--ink) !important;
    border-bottom: 0 !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    line-height: 1.25;
    padding: 0 !important;
}

body.site-page .site-work-dropdown__link:hover,
body.site-page .site-work-dropdown__link:focus-visible { color: var(--blue) !important; }

@media (min-width: 761px) {
    body.site-page .site-work-menu:hover .site-work-dropdown,
    body.site-page .site-work-menu:focus-within .site-work-dropdown { display: grid; }
}

body.site-page .site-menu-button {
    display: none;
    color: var(--ink);
    background: transparent;
    border: 0;
    font: 700 .85rem/1 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
}

body.site-page .site-menu-button__bars {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    margin-left: .5rem;
    vertical-align: middle;
}

body.site-page .site-menu-button__bars i {
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
}

body.site-page .site-shell {
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 6.5rem) 0;
}

body.site-page .eyebrow {
    color: var(--blue);
    font: 700 .78rem/1.25 'Space Grotesk', sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.site-page .page-heading {
    max-width: 18ch;
    margin: .7rem 0 1rem;
    color: var(--ink);
    font: 400 clamp(2.7rem, 6vw, 5.6rem)/.95 'Russo One', sans-serif;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

body.site-page .page-lede {
    max-width: 68ch;
    margin: 0;
    font-size: clamp(1.08rem, 1.8vw, 1.32rem);
    line-height: 1.55;
}

body.site-page .selected-work-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 960px);
    margin: 1.35rem auto;
    border: 2px solid var(--ink);
    background: #fffefa;
    box-shadow: 4px 4px 0 var(--ink);
}

body.site-page .selected-work-header > .page-heading {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

body.site-page .selected-work-nav a {
    display: flex;
    min-width: 0;
    min-height: 2.8rem;
    align-items: center;
    justify-content: center;
    padding: .55rem .72rem;
    color: var(--ink);
    border-right: 1px solid var(--ink);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background .15s ease, color .15s ease;
}

body.site-page .selected-work-nav a:last-child { border-right: 0; }
body.site-page .selected-work-nav a:hover,
body.site-page .selected-work-nav a:focus-visible { color: var(--ink); background: var(--yellow); }
body.site-page .selected-work-nav a:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

body.site-page .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 2rem;
}

body.site-page .button-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--ink);
    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-weight: 700;
    padding: .78rem 1rem;
    text-decoration: none;
}

body.site-page .button-link:hover,
body.site-page .button-link:focus-visible {
    color: var(--ink);
    background: var(--pink);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--ink);
}

body.site-page .button-link--quiet { background: transparent; }

@keyframes project-launch-attention {
    0%, 100% { transform: translate(0, 0); box-shadow: 5px 5px 0 var(--pink); }
    50% { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--pink); }
}

body.site-page .button-link--launch {
    color: var(--ink);
    background: var(--blue);
    box-shadow: 5px 5px 0 var(--pink);
    animation: project-launch-attention 3.4s ease-in-out infinite;
}

body.site-page .button-link--launch:hover,
body.site-page .button-link--launch:focus-visible {
    color: var(--ink);
    background: #5ba7e8;
    box-shadow: 2px 2px 0 var(--pink);
    transform: translate(3px, 3px);
    animation: none;
}

body.site-page .button-link--launch:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

body.site-page .section-heading {
    margin: 0 0 1.1rem;
    font: 400 clamp(1.8rem, 3vw, 2.7rem)/1 'Russo One', sans-serif;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

body.site-page .section-intro {
    max-width: 66ch;
    margin: 0 0 2rem;
    font-size: 1.05rem;
}

body.site-page .work-section { margin-top: clamp(4rem, 9vw, 7rem); scroll-margin-top: 5.5rem; }

body.site-page .work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (min-width: 961px) {
    body.site-page .work-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

body.site-page .work-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    border: 2px solid var(--ink);
    background: #fffefa;
    box-shadow: 5px 5px 0 rgba(23, 35, 59, .92);
}

body.site-page .work-card__visual {
    min-height: 145px;
    padding: 1.05rem;
    display: flex;
    align-items: flex-end;
    color: var(--ink);
    background: linear-gradient(135deg, var(--blue) 0 48%, var(--yellow) 48% 72%, var(--pink) 72%);
    border-bottom: 2px solid var(--ink);
}

body.site-page .work-card__visual--memory { background: linear-gradient(135deg, #f8e66b, #f8e66b 31%, #1f5fc4 31% 62%, #ed6b9b 62%); }
body.site-page .work-card__visual--joint { background: #fff; }
body.site-page .work-card__visual--photo.work-card__visual--joint img { object-fit: cover; object-position: center 18%; padding: 0; background: #fff; }
body.site-page .work-card__visual--ledger { background: linear-gradient(135deg, #19243c, #19243c 50%, #00c840 50% 54%, #f7f5ef 54%); color: #fff; }
body.site-page .work-card__visual--scatter { display: block; min-width: 0; min-height: 0; padding: 0; overflow: hidden; background: #fff; }
body.site-page .work-card__visual--scatter img { display: block; width: 100%; max-width: 100%; height: auto; min-width: 0; }
body.site-page .work-card__visual--wearab { background: linear-gradient(135deg, #2d1948, #2d1948 53%, #ffd600 53% 57%, #e86f9a 57%); color: #fff; }
body.site-page .work-card__visual--nemoh { background: radial-gradient(circle, #ffd600 0 6%, transparent 7%) 0 0 / 44px 44px, #1d4a8d; color: #fff; }
body.site-page .work-card__visual--other { background: linear-gradient(135deg, #d23b72, #d23b72 33%, #ffd600 33% 66%, #4195de 66%); }
body.site-page .work-card__visual--photo { padding: 0; overflow: hidden; background: #17233b; }
body.site-page .work-card__visual--photo img { width: 100%; height: 100%; min-height: 145px; object-fit: cover; object-position: center; }
body.site-page .work-card__visual--jacket img { object-position: center 38%; }
body.site-page .work-card__visual--pixel img { object-fit: cover; object-position: center 58%; padding: 0; background: #f7f7f5; }
body.site-page .work-card__visual--chart { background: #fff; }
body.site-page .work-card__visual--chart img { object-fit: contain; padding: .25rem; background: #fff; }
body.site-page .work-card__visual--rmp { min-height: 0; height: clamp(210px, 23vw, 290px); }
body.site-page .work-card__visual--rmp img { min-height: 0; height: 100%; object-fit: contain; padding: .25rem; background: #fff; }
body.site-page .work-card__visual--vat { background: #080c0a; }
body.site-page .work-card__visual--vat img { object-fit: contain; padding: .45rem; background: #080c0a; }
body.site-page .work-card__visual--photography { background: #090909; }
body.site-page .work-card__visual--photography img { object-fit: contain; padding: .35rem; background: #090909; }
body.site-page .work-card__visual--poetry { background: #09090d; }
body.site-page .work-card__visual--poetry img { object-fit: contain; padding: .35rem; background: #09090d; }

body.site-page .work-card__mark {
    display: inline-block;
    padding: .42rem .55rem;
    background: rgba(255,255,255,.88);
    border: 2px solid currentColor;
    color: var(--ink);
    font: 400 1.3rem/1 'Russo One', sans-serif;
    letter-spacing: .04em;
}

body.site-page .work-card__body {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem;
}

body.site-page .work-card__meta {
    color: var(--blue);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

body.site-page .work-card h3 {
    margin: .55rem 0 .7rem;
    font: 400 clamp(1.38rem, 2.7vw, 2rem)/1.04 'Russo One', sans-serif;
    letter-spacing: -.02em;
}

body.site-page .work-card p { margin: 0; font-size: .98rem; }

body.site-page .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 1rem 0 1.15rem;
    padding: 0;
    list-style: none;
}

body.site-page .tag-list li {
    border: 1px solid var(--ink);
    background: var(--paper-blue);
    font-size: .75rem;
    font-weight: 700;
    padding: .24rem .42rem;
}

body.site-page .work-card__link {
    display: inline-flex;
    margin-top: auto;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

body.site-page .work-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.1rem;
    margin-top: auto;
}

body.site-page .work-card__links .work-card__link { margin-top: 0; }

body.site-page .work-card__footer {
    display: flex;
    align-items: flex-end;
    gap: .85rem;
    margin-top: auto;
}

body.site-page .work-card__footer .work-card__link { margin-top: 0; }
body.site-page .work-card__footer .work-card__links { flex: 1; margin-top: 0; }

body.site-page .work-card__github {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: auto;
    width: 1.75rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    border-radius: .28rem;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
}

body.site-page .work-card__github img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.site-page .work-card__live {
    display: inline-flex;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: .28rem;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
}

body.site-page .work-card__live img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.site-page .work-card__footer > .work-card__live:last-child { margin-left: auto; }
body.site-page .work-card__live + .work-card__github { margin-left: 0; }
body.site-page .work-card__live:hover { filter: brightness(1.08); transform: translate(1px, 1px); }
body.site-page .work-card__live:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

body.site-page .work-card__github:hover { filter: brightness(1.2); transform: translate(1px, 1px); }
body.site-page .work-card__github:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

body.site-page .work-card__link:hover { color: var(--pink); }

body.site-page .note-box {
    border-left: 4px solid var(--yellow);
    max-width: 72ch;
    margin-top: 1.4rem;
    padding: .85rem 1rem;
    background: rgba(255, 214, 0, .18);
    font-size: .93rem;
}

body.site-page .site-footer {
    border-top: 2px solid var(--ink);
    margin-top: 5rem;
    padding: 2rem 0 2.8rem;
    background: var(--yellow);
}

body.site-page .site-footer__inner {
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem;
    font-size: .9rem;
}

body.site-page .site-footer a { font-weight: 700; }

/* Homepage keeps the mathematical simulation but puts the career pitch in front of it. */
body.site-home {
    --nav-tab-fill: #203252;
    --nav-active-fill: #1f5fc4;
    --nav-bar-fill: rgba(23, 35, 59, .78);
    background: #1f5fc4;
}

body.site-home .site-nav {
    position: absolute !important;
    background: var(--nav-bar-fill);
    border-bottom-color: rgba(255,255,255,.8);
}

body.site-home .site-brand,
body.site-home .site-menu a { color: #fff; }
body.site-home .site-menu > .site-menu__link,
body.site-home .site-work-menu { color: #fff; background: var(--nav-tab-fill); border-color: rgba(255,255,255,.8); }
body.site-home .site-menu > .site-menu__link:hover,
body.site-home .site-menu > .site-menu__link:focus-visible,
body.site-home .site-work-menu:hover,
body.site-home .site-work-menu:focus-within { color: var(--yellow); background: var(--nav-tab-fill); }
body.site-home .site-work-menu:hover .site-work-menu__all,
body.site-home .site-work-menu:focus-within .site-work-menu__all { color: var(--yellow); }
body.site-home .site-menu > .site-menu__link.is-current,
body.site-home .site-work-menu.is-current { color: #fff; background: var(--nav-active-fill); border-bottom-color: var(--nav-active-fill); }
body.site-home .site-menu__utility,
body.site-home .site-menu__github { border-color: #fff !important; }
body.site-home .site-work-menu__toggle { color: #fff; border-left-color: rgba(255,255,255,.8); }
body.site-home .site-work-dropdown a { color: var(--ink); }

body.site-home #ising-bg,
body.site-home #bezier-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

body.site-home #bezier-bg { pointer-events: none; }

body.site-home .home-main {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
    min-height: 100svh;
    padding: clamp(6rem, 10vw, 8rem) 0 clamp(2rem, 5vw, 4rem);
}

body.site-home .home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 340px);
    grid-template-areas:
        "identity evidence"
        "proof proof"
        "hint hint"
        "actions actions";
    column-gap: clamp(2rem, 6vw, 5rem);
    max-width: 1040px;
    color: #fff;
}

body.site-home .home-hero__identity { grid-area: identity; }
body.site-home .home-hero .eyebrow { color: var(--yellow); }

body.site-home .home-title {
    max-width: 11ch;
    margin: .6rem 0 1.4rem;
    color: var(--yellow);
    font: 400 clamp(4.2rem, 11.5vw, 10rem)/.82 'Russo One', sans-serif;
    letter-spacing: -.055em;
    text-transform: uppercase;
    text-shadow: 4px 4px 0 rgba(23, 35, 59, .52);
    cursor: default;
    user-select: none;
}

body.site-home .home-title__line { display: block; }

body.site-home .home-title__letter {
    display: inline-block;
    transition: transform .15s cubic-bezier(.175, .885, .32, 1.25), color .25s ease;
    will-change: transform;
}

body.site-home .home-lede {
    max-width: 54ch;
    font-size: clamp(1.18rem, 2.5vw, 1.65rem);
    line-height: 1.36;
}

body.site-home .home-proof {
    grid-area: proof;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1040px;
    margin: 2rem 0 0;
    border: 2px solid #fff;
}

body.site-home .home-proof__topic {
    padding: 1rem;
    position: relative;
    z-index: 0;
    border: 0;
    border-right: 2px solid #fff;
    background: rgba(23, 35, 59, .68);
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background .2s ease, box-shadow .2s ease, filter .2s ease;
}

body.site-home .home-proof__topic:nth-of-type(4) { border-right: 0; }
body.site-home .home-proof__topic:hover,
body.site-home .home-proof__topic.is-active {
    z-index: 1;
    background: rgba(45, 25, 72, .94);
    box-shadow: inset 0 -7px 0 var(--yellow);
    filter: saturate(1.08);
}
body.site-home .home-proof__topic:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
body.site-home .home-proof strong { display: block; color: var(--yellow); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
body.site-home .home-proof span { display: block; margin-top: .35rem; color: #fff; font-size: .95rem; }

body.site-home .home-proof__hint {
    grid-area: hint;
    margin: .7rem 0 1.45rem;
    color: rgba(255, 255, 255, .84);
    font-size: .76rem;
    letter-spacing: .045em;
}
body.site-home .home-proof__hint--mobile { display: none; }

body.site-home .home-evidence {
    background: rgba(210, 59, 114, .97);
    border: 2px solid #fff;
    box-shadow: 6px 6px 0 var(--ink);
    color: #fff;
}
body.site-home .home-evidence--desktop {
    grid-area: evidence;
    align-self: center;
    min-height: 11rem;
    padding: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateX(1.2rem);
    transition: opacity .2s ease, transform .25s ease, visibility .2s ease;
    visibility: hidden;
}
body.site-home .home-evidence--desktop.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}
body.site-home .home-evidence--mobile { display: none; }
body.site-home .home-evidence__eyebrow {
    color: var(--yellow);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}
body.site-home .home-evidence__title {
    margin-top: .2rem;
    color: #fff;
    font: 400 clamp(1.45rem, 2.3vw, 2rem)/1 'Russo One', sans-serif;
    letter-spacing: -.02em;
    text-transform: uppercase;
}
body.site-home .home-evidence__columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 1rem;
    margin-top: .85rem;
}
body.site-home .home-evidence__column + .home-evidence__column { border-left: 1px solid rgba(255, 255, 255, .55); padding-left: 1rem; }
body.site-home .home-evidence__label {
    color: var(--yellow);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
body.site-home .home-evidence__list {
    display: grid;
    gap: .35rem;
    margin: .42rem 0 0;
    padding: 0;
    list-style: none;
}
body.site-home .home-evidence__list li { font-size: .78rem; line-height: 1.25; }
body.site-home .home-evidence__projects a {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    color: #fff;
    font-weight: 700;
    text-decoration-color: rgba(255, 255, 255, .72);
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}
body.site-home .home-evidence__projects a:hover,
body.site-home .home-evidence__projects a:focus-visible { color: var(--yellow); }

body.site-home .home-hero > .button-row { grid-area: actions; }

body.site-home .home-hero > .button-row { margin-top: 0; }

body.site-home .home-featured {
    padding: clamp(2rem, 5vw, 4.2rem);
    background: rgba(247, 245, 239, .97);
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-hard);
}

body.site-home .home-featured .section-heading { max-width: 14ch; }
body.site-home .home-featured .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

body.site-home #ising-ctrl {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    background: rgba(23,35,59,.86);
    border: 1px solid rgba(255,255,255,.7);
    padding: .55rem .7rem;
    font-size: .8rem;
}

body.site-home #ising-ctrl input { accent-color: var(--yellow); }
body.site-home #ising-ctrl button { color: var(--ink); background: var(--yellow); border: 0; cursor: pointer; padding: .15rem .35rem; }

body.site-page .intro-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: clamp(2rem, 7vw, 6rem);
    align-items: start;
}

body.site-page .profile-image {
    width: 100%;
    max-width: 400px;
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-hard);
}

body.site-page .bio-copy p + p { margin-top: 1.1rem; }

body.site-page .contact-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1.25rem;
    margin-top: 2rem;
}

body.site-page .contact-card {
    padding: clamp(1.4rem, 3vw, 2.5rem);
    border: 2px solid var(--ink);
    background: #fffefa;
    box-shadow: 5px 5px 0 var(--ink);
}

body.site-page .contact-list { margin: 1.4rem 0 0; padding: 0; list-style: none; }
body.site-page .contact-list li + li { margin-top: .9rem; }
body.site-page .contact-list strong { display: block; color: var(--blue); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
body.site-page .contact-list a { font-size: 1.08rem; font-weight: 700; }

body.site-page .case-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
    gap: clamp(2rem, 7vw, 6rem);
    align-items: start;
}

body.site-page .case-status {
    padding: 1.3rem;
    background: var(--yellow);
    border: 2px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
}

body.site-page .case-status span { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
body.site-page .case-status strong { display: block; margin-top: .4rem; font: 400 1.35rem/1.1 'Russo One', sans-serif; }

body.site-page .case-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr);
    gap: clamp(2rem, 6vw, 5rem);
    margin-top: clamp(2.25rem, 4.5vw, 4.2rem);
}

body.site-page .case-copy h2 {
    margin: 2.2rem 0 .7rem;
    font: 400 1.6rem/1 'Russo One', sans-serif;
    text-transform: uppercase;
}

body.site-page .case-copy h2:first-child { margin-top: 0; }
body.site-page .case-copy p + p { margin-top: 1rem; }

body.site-page .placeholder-panel {
    min-height: 300px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 2px dashed var(--ink);
    background: linear-gradient(135deg, rgba(31,95,196,.14), rgba(255,214,0,.4));
}

body.site-page .placeholder-panel strong { font: 400 clamp(2rem, 5vw, 4rem)/.9 'Russo One', sans-serif; text-transform: uppercase; }
body.site-page .placeholder-panel p { margin: .8rem 0 0; max-width: 28ch; font-size: .92rem; }

body.site-page .case-facts { padding: 0; list-style: none; }
body.site-page .case-facts li { border-top: 1px solid var(--line); padding: .8rem 0; }
body.site-page .case-facts strong { display: block; color: var(--blue); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
body.site-page .case-facts span { display: block; margin-top: .25rem; }

body.site-page .case-media {
    margin: 0 0 1.4rem;
    border: 2px solid var(--ink);
    background: #17233b;
    box-shadow: 5px 5px 0 var(--ink);
}

body.site-page .case-media img { display: block; width: 100%; max-height: 500px; object-fit: cover; object-position: center; cursor: zoom-in; transition: filter .2s ease; }
body.site-page .case-media--app { background: #080d0c; }
body.site-page .case-media--app img { max-height: 460px; object-fit: contain; }
body.site-page .case-media--scatter { background: #fff; }
body.site-page .case-media--scatter img { object-fit: contain; }
body.site-page .case-media--pixel img { background: #181717; object-fit: contain; }
body.site-page .case-media--sketch { background: #f7f6f1; }
body.site-page .case-media--sketch img { background: #f7f6f1; object-fit: contain; }
body.site-page .case-media--tilt-map { background: #f7f6f1; }
body.site-page .case-media--tilt-map img { background: #f7f6f1; object-fit: contain; }
body.site-page .case-media--vat { background: #080c0a; }
body.site-page .case-media--vat img { max-height: none; object-fit: contain; }
body.site-page .case-media figcaption { padding: .7rem .85rem; color: #fff; font-size: .8rem; line-height: 1.35; }
body.site-page .case-media img:hover,
body.site-page .case-media img:focus-visible { filter: brightness(1.12); outline: none; }

body.site-page .case-diagrams {
    max-width: 1180px;
    margin: clamp(3.5rem, 8vw, 6.5rem) auto 0;
}

body.site-page .case-diagrams__intro { max-width: 680px; margin-bottom: 1.5rem; }
body.site-page .case-diagrams__intro p:last-child { margin-top: .75rem; color: var(--ink); }
body.site-page .case-diagrams__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
}
body.site-page .case-diagram {
    min-width: 0;
    margin: 0;
    border: 2px solid var(--ink);
    background: #f5f5f1;
    box-shadow: 5px 5px 0 var(--ink);
}
body.site-page .case-diagram__preview { position: relative; overflow: hidden; }
body.site-page .case-diagram iframe {
    display: block;
    width: 100%;
    border: 0;
    background: #f5f5f1;
    pointer-events: none;
}
body.site-page .case-diagram__preview iframe { height: clamp(420px, 45vw, 560px); }
body.site-page .case-diagram__open {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: .75rem;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: zoom-in;
}
body.site-page .case-diagram__open span {
    padding: .5rem .65rem;
    border: 2px solid var(--ink);
    background: var(--yellow);
    box-shadow: 3px 3px 0 var(--ink);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(.35rem);
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
body.site-page .case-diagram__open:hover span,
body.site-page .case-diagram__open:focus-visible span { opacity: 1; transform: translateY(0); }
body.site-page .case-diagram__open:focus-visible { outline: 3px solid var(--blue); outline-offset: -5px; }
body.site-page .case-diagram figcaption {
    padding: .8rem .95rem;
    border-top: 2px solid var(--ink);
    background: var(--ink);
    color: #fff;
    font-size: .86rem;
    line-height: 1.45;
}

body.site-page .case-demo {
    max-width: 1180px;
    margin: clamp(3.5rem, 8vw, 6.5rem) auto 0;
}
body.site-page .case-demo__intro { max-width: 680px; margin-bottom: 1.5rem; }
body.site-page .case-demo__intro p:last-child { margin-top: .75rem; color: var(--ink); }
body.site-page .case-demo__open {
    margin-top: 1rem;
    padding: .45rem .65rem;
    border: 2px solid var(--ink);
    background: var(--blue);
    box-shadow: 3px 3px 0 var(--ink);
    color: #fff;
    font: 700 .72rem/1 'Space Grotesk', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: zoom-in;
}
body.site-page .case-demo__open:hover,
body.site-page .case-demo__open:focus-visible { background: var(--pink); color: #fff; outline: 2px solid var(--ink); outline-offset: 3px; }
body.site-page .case-demo__frame {
    display: block;
    width: 100%;
    height: min(76vh, 760px);
    min-height: 560px;
    border: 0;
    background: #f5f5f1;
}

body.site-page .case-system-map {
    display: grid;
    gap: .65rem;
    margin: 1.1rem 0 1.55rem;
    padding: 1rem;
    border: 2px solid var(--ink);
    background: var(--paper-blue);
}

body.site-page .case-system-map span {
    position: relative;
    display: block;
    padding: .7rem .8rem;
    border: 2px solid var(--ink);
    background: #fffefa;
    font-weight: 700;
}

body.site-page .case-system-map span + span::before {
    content: '↓';
    position: absolute;
    top: -1.15rem;
    left: .45rem;
    color: var(--pink);
    font-weight: 700;
}

body.site-page .legacy-summary {
    max-width: 880px;
    padding: clamp(1.4rem, 4vw, 3rem);
    border: 2px solid var(--ink);
    background: #fffefa;
    box-shadow: var(--shadow-hard);
}

body.site-page .legacy-summary h2 { margin-bottom: .8rem; font: 400 1.8rem/1 'Russo One', sans-serif; text-transform: uppercase; }
body.site-page .legacy-summary p + p { margin-top: 1rem; }

body.site-page .portal-visual {
    max-width: 980px;
    margin: 3rem auto 0;
    border: 2px solid #c8cbd8;
    background: #0d1117;
    box-shadow: 7px 7px 0 #ffd600;
}

body.site-page .portal-visual img { display: block; width: 100%; height: auto; cursor: zoom-in; transition: filter .2s ease; }
body.site-page .portal-visual figcaption { padding: .72rem .85rem; color: #e8edf0; font-size: .8rem; line-height: 1.35; }
body.site-page .portal-visual img:hover,
body.site-page .portal-visual img:focus-visible { filter: brightness(1.12); outline: none; }

body.site-page .portal-evidence-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 1180px;
    margin: 3rem auto 0;
}

body.site-page .portal-evidence-grid .portal-visual { max-width: none; margin: 0; }

body.has-media-modal { overflow: hidden; }

.media-modal {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(10, 15, 24, .88);
}

.media-modal[hidden] { display: none; }

.media-modal__dialog {
    position: relative;
    width: min(1200px, 100%);
    max-height: 100%;
    outline: none;
}

.media-modal__figure { margin: 0; }

.media-modal__image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 7rem);
    margin: 0 auto;
    border: 2px solid #fff;
    background: #080c0a;
    box-shadow: 7px 7px 0 var(--pink);
    object-fit: contain;
}

.media-modal__caption {
    max-width: min(100%, 840px);
    margin: .8rem auto 0;
    color: #fff;
    font-size: .88rem;
    line-height: 1.4;
    text-align: center;
}

.media-modal__close {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: .35rem;
    margin: 0 0 .7rem auto;
    padding: .45rem .7rem;
    border: 2px solid #fff;
    background: var(--blue);
    color: #fff;
    box-shadow: 4px 4px 0 var(--pink);
    font: 700 .78rem/1 'Space Grotesk', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.media-modal__close:hover,
.media-modal__close:focus-visible { background: var(--pink); outline: 2px solid var(--yellow); outline-offset: 3px; }

body.has-diagram-modal { overflow: hidden; }
.diagram-modal {
    position: fixed;
    z-index: 3001;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(.75rem, 2vw, 1.5rem);
    background: rgba(10, 15, 24, .92);
}
.diagram-modal[hidden] { display: none; }
.diagram-modal__dialog { width: min(1280px, 100%); outline: none; }
.diagram-modal__frame {
    display: block;
    width: 100%;
    height: min(calc(100vh - 6.75rem), 920px);
    border: 2px solid #fff;
    background: #f5f5f1;
}
.diagram-modal__caption { margin: .7rem auto 0; color: #fff; font-size: .88rem; line-height: 1.4; text-align: center; }

@media (max-width: 760px) {
    body.site-page .site-nav__inner { width: min(100% - 1.5rem, 1180px); min-height: 3.9rem; }
    body.site-page .site-nav__fallback {
        width: min(100% - 1.5rem, 1180px);
        min-height: 3.9rem;
        justify-content: center;
        gap: .3rem .7rem;
        padding: .5rem 0;
    }
    body.site-page .site-menu-button { display: inline-flex; align-items: center; }
    body.site-page .site-menu {
        display: none;
        position: absolute;
        inset: 100% .75rem auto;
        padding: .5rem;
        flex-direction: column;
        align-items: stretch;
        background: var(--nav-bar-fill);
        border: 2px solid var(--ink);
        box-shadow: 5px 5px 0 var(--ink);
    }
    body.site-page .site-nav.is-open .site-menu { display: flex; }
    body.site-page .site-menu > .site-menu__link,
    body.site-page .site-work-menu {
        min-height: 0;
        margin: 0;
        background: transparent;
        border: 0;
        border-bottom: 1px solid var(--line);
    }
    body.site-page .site-menu > .site-menu__link { display: block; padding: .68rem .6rem; }
    body.site-page .site-work-menu__all { padding: .68rem .6rem; }
    body.site-page .site-work-menu__toggle { border-left: 0; }
    body.site-page .site-menu > .site-menu__link.is-current,
    body.site-page .site-work-menu.is-current { border-bottom-color: var(--line); }
    body.site-page .site-menu__utility,
    body.site-page .site-menu__github { margin: .4rem 0 0; }
    body.site-page .site-work-menu { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    body.site-page .site-work-menu__all { grid-column: 1; }
    body.site-page .site-work-menu__toggle { grid-column: 2; padding: 0 .45rem; }
    body.site-page .site-work-dropdown {
        position: static;
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 1rem;
        width: auto;
        margin: .2rem .6rem .35rem;
        padding: .9rem;
        box-shadow: none;
    }
    body.site-page .site-work-dropdown__title { padding-bottom: .4rem !important; }
    body.site-home .site-menu { background: rgba(23,35,59,.98); border-color: #fff; box-shadow: 5px 5px 0 var(--yellow); }
    body.site-home .site-menu > .site-menu__link,
    body.site-home .site-work-menu { background: transparent; border-bottom-color: rgba(255,255,255,.5); }
    body.site-home .site-menu-button { color: #fff; }
    body.site-page .site-shell { width: min(100% - 1.5rem, 1180px); padding: 3.2rem 0; }
    body.site-page .page-heading { font-size: clamp(2.55rem, 13vw, 4rem); }
    body.site-page .selected-work-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.site-page .selected-work-nav a { border-right: 0; }
    body.site-page .selected-work-nav a:nth-child(odd) { border-right: 1px solid var(--ink); }
    body.site-page .selected-work-nav a:nth-child(-n + 2) { border-bottom: 1px solid var(--ink); }
    body.site-page .work-grid,
    body.site-home .home-featured .work-grid,
    body.site-page .intro-split,
    body.site-page .contact-grid,
    body.site-page .case-hero,
    body.site-page .case-grid,
    body.site-page .portal-evidence-grid,
    body.site-page .case-diagrams__grid { grid-template-columns: 1fr; }
    body.site-page .case-diagram__preview iframe { height: 440px; }
    body.site-page .case-diagram__open span { opacity: 1; transform: none; }
    body.site-page .case-demo__frame { height: 560px; min-height: 0; }
    .diagram-modal__frame { height: calc(100vh - 6.5rem); }
    .media-modal__image { max-height: calc(100vh - 6.5rem); }
    body.site-home .home-main { width: min(100% - 1.5rem, 1180px); padding-top: 5.5rem; }
    body.site-home .home-hero { display: block; }
    body.site-home .home-title { font-size: clamp(3.65rem, 17vw, 6.2rem); }
    body.site-home .home-proof { grid-template-columns: 1fr; }
    body.site-home .home-proof__topic { border-right: 0; }
    body.site-home .home-proof__topic + .home-proof__topic { border-top: 2px solid #fff; border-left: 0; }
    body.site-home .home-proof__topic:not(:first-child) { border-top: 2px solid #fff; border-left: 0; }
    body.site-home .home-evidence--desktop { display: none; }
    body.site-home .home-evidence--mobile.is-visible {
        display: block;
        grid-column: 1;
        padding: 1rem;
        border-width: 2px 0;
        box-shadow: none;
    }
    body.site-home .home-evidence__columns { grid-template-columns: 1fr; gap: .8rem; }
    body.site-home .home-evidence__column + .home-evidence__column { border-top: 1px solid rgba(255, 255, 255, .55); border-left: 0; padding-top: .8rem; padding-left: 0; }
    body.site-home .home-proof__hint { margin: .7rem 0 1.45rem; }
    body.site-home .home-proof__hint--desktop { display: none; }
    body.site-home .home-proof__hint--mobile { display: inline; }
    body.site-home .home-featured { padding: 1.25rem; box-shadow: 4px 4px 0 var(--ink); }
    body.site-home #ising-ctrl { right: .75rem; bottom: .75rem; }
    body.site-page .site-footer__inner { width: min(100% - 1.5rem, 1180px); }
}

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

/* ── Branch Specific Background Colors ── */
/* Data Science - Very Light Pink (derived from #D23B72) */
body.datascience-page, body.project1-page, body.capstone-page {
    --nav-active-fill: #fbe6ee;
    background-color: #fbe6ee;
}

/* Games - Very Light Blue (derived from #4195DE) */
body.games-page, body.brickbreaker-page, body.catchfall-game {
    --nav-active-fill: #e5eff8;
    background-color: #e5eff8;
}

/* p5.js - Very Light Purple (derived from #A288E3) */
body.p5-page, body.sketchpad-page, body.spikes-page {
    --nav-active-fill: #f2eef8;
    background-color: #f2eef8;
}

/* About / Contact - Very Light Blue (matching Games) */
body.about-page, body.contact-page {
    --nav-active-fill: #e5eff8;
    background-color: #e5eff8;
}

/* Contact Page Layout */
.contact-layout {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}
.contact-info {
    flex: 1;
    min-width: 300px;
    padding-top: 2rem;
}
.contact-info h2 {
    font-size: 2rem;
    font-family: 'Russo One', sans-serif;
    margin-bottom: 1rem;
}
.contact-info p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.contact-info p strong {
    font-weight: 700;
}
.contact-widget {
    flex: 1;
    min-width: 300px;
}
@media (max-width: 768px) {
    .contact-layout {
        flex-direction: column;
    }
}


/* ── Premium Gallery Components ───────────────────────────────────────── */
.projects-gallery {
    max-width: 1000px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 20px;
}

.project-card {
    display: flex;
    gap: 32px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.3s ease;
    text-decoration: none;
    align-items: center;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(65, 149, 222, 0.3); /* Subtle blue glow */
}

.project-card .thumb-wrap {
    flex-shrink: 0;
    width: 280px;
}

.project-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.02);
}

.project-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card h2 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.8rem;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.project-card .course-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: #D23B72;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Method Pills */
.method-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.method-pill {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.02em;
}

/* Color coding: Blue for ML/Tech, Pink for Stats/Analysis */
.method-pill.tech {
    background: rgba(65, 149, 222, 0.1);
    color: #4195DE;
    border: 1px solid rgba(65, 149, 222, 0.2);
}

.method-pill.stats {
    background: rgba(210, 59, 114, 0.1);
    color: #D23B72;
    border: 1px solid rgba(210, 59, 114, 0.2);
}

.method-pill.focus {
    background: rgba(255, 214, 0, 0.15);
    color: #b39b00;
    border: 1px solid rgba(255, 214, 0, 0.3);
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4195DE;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: gap 0.2s ease, opacity 0.2s ease;
}

.btn-detail:hover {
    gap: 12px;
}

.btn-detail span {
    font-size: 1.2rem;
    line-height: 1;
}

/* Mobile adjustments */
@media (max-width: 820px) {
    .project-card {
        flex-direction: column;
        padding: 24px;
    }
    .project-card .thumb-wrap {
        width: 100%;
    }
    .project-card h2 {
        font-size: 1.5rem;
    }
}

/* ── Photography Showcase ────────────────────────────────────────── */

body.photo-page {
    --nav-tab-fill: #151515;
    --nav-active-fill: #0a0a0a;
    --nav-bar-fill: rgba(10, 10, 10, .92);
    background-color: #0a0a0a !important; /* Deep dark for contrast */
    color: #f0f0f0;
    overflow-x: hidden;
}

.photo-page .content header {
    padding: 30px 5vw 10px;
    text-align: center;
}

.photo-intro {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    opacity: 0.6;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Section Labels */
.photo-section-label {
    padding: 0 5vw;
    margin-top: 120px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.photo-section-label h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #FFD600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.photo-section-label h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 214, 0, 0.2);
}

/* ── 1. Film Strip Layout ────────────────────────────────────────── */
.film-strip-outer {
    position: relative;
    width: 100%;
    overflow-x: auto; /* Enable scrolling */
    padding: 40px 0;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.film-strip-outer::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.film-strip-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 0 10vw;
    width: max-content;
    height: 75vh;
}

.film-item {
    flex: 0 0 auto;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.film-item img {
    height: 100%;
    width: auto;
    max-height: 65vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    filter: saturate(0.9);
}

.film-item:nth-child(even) { transform: translateY(-4vh); }
.film-item:nth-child(odd) { transform: translateY(4vh); }

.film-item:hover {
    transform: scale(1.03) translateY(0);
    z-index: 10;
}

.film-item:hover img {
    filter: saturate(1.1);
    border-color: rgba(255, 214, 0, 0.5);
}

.photo-page header h1 {
    text-shadow: none; /* Remove harsh white glow for dark theme */
}

/* ── Overlays ────────────────────────────────────────────────────── */
.film-grain {
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

.bg-bloom {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(65, 149, 222, 0.1) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

/* Animations for scroll hint */
.scroll-hint {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.4;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scroll-hint::after {
    content: "→";
    animation: hintArrow 1.5s infinite;
}

@keyframes hintArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@media (max-width: 768px) {
    .film-strip-inner {
        height: 50vh;
        gap: 30px;
    }
    .film-item img {
        max-height: 45vh;
    }
    .mosaic-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-auto-rows: 150px;
    }
}

.film-strip-wrapper {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.film-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 110; /* Above the strip */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
    opacity: 0;
}

.film-strip-wrapper:hover .film-nav-btn {
    opacity: 1;
}

.film-nav-btn:hover {
    background: rgba(255, 214, 0, 0.8);
    color: #000;
    border-color: #FFD600;
    transform: translateY(-50%) scale(1.1);
}

.film-nav-btn.prev { left: 30px; }
.film-nav-btn.next { right: 30px; }

/* Final page-specific overrides for the shared portfolio shell. */
body.site-page .site-nav { pointer-events: auto; }

body.photo-page.site-page .site-nav {
    background: var(--nav-bar-fill);
    border-bottom-color: rgba(255,255,255,.72);
}

body.photo-page.site-page .site-brand,
body.photo-page.site-page .site-menu a,
body.photo-page.site-page .site-nav__fallback a { color: #f0f0f0; }

body.photo-page.site-page .site-menu > .site-menu__link,
body.photo-page.site-page .site-work-menu {
    color: #f0f0f0;
    background: var(--nav-tab-fill);
    border-color: rgba(255,255,255,.72);
}

body.photo-page.site-page .site-work-menu__toggle { color: #f0f0f0; }

body.photo-page.site-page .site-menu a:hover,
body.photo-page.site-page .site-menu a:focus-visible,
body.photo-page.site-page .site-menu a.is-current { color: var(--yellow); }

body.photo-page.site-page .site-menu__utility,
body.photo-page.site-page .site-menu__github { border-color: #f0f0f0 !important; }

body.site-page .page-lede,
body.site-page .section-intro,
body.site-page .legacy-summary p,
body.site-page .case-copy p,
body.site-page .contact-card p { color: var(--ink) !important; }

body.site-page .case-status,
body.site-page .case-status span,
body.site-page .case-status strong { color: var(--ink) !important; }

body.site-home .home-lede {
    color: var(--ink);
    padding: .85rem 1rem;
    background: rgba(247, 245, 239, .9);
    border-left: 4px solid var(--yellow);
    box-shadow: 4px 4px 0 rgba(23,35,59,.5);
}

@media (max-width: 760px) {
    body.photo-page.site-page .site-menu { background: rgba(10,10,10,.98); border-color: #f0f0f0; box-shadow: 5px 5px 0 var(--yellow); }
    body.photo-page.site-page .site-menu-button { color: #f0f0f0; }
}
