/* ============================================================
   ANITA — PORTFOLIO 2026
   Single source of truth for all styles.
   Structure:
     1. Design tokens
     2. Reset & base
     3. Shared components (nav, transitions, typography)
     4. Index page
     5. Work page
     6. Project detail page
     7. About page
     8. Playground page
     9. Responsive overrides (tablet → mobile)
   ============================================================ */


/* -----------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------- */
:root {
    --font-sans:  'Geist Sans',  -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:  'Geist Mono',  monospace;

    --color-black:      #000;
    --color-white:      #fff;
    --color-muted:      #767676; /* min contrast 4.5:1 on white for small text */
    --color-surface:    #f5f5f5;
    --color-pink:       #ffc2eb;
    --color-dark-green: #1a472a;
    --color-blue:       #0070f3;

    --border:        1px solid var(--color-black);
    --border-stroke: 1px solid var(--color-black);

    --radius-card: 14px;
    --shadow-card: 0 12px 40px rgba(0,0,0,0.13);

    /* Card stack dimensions — change here to resize everywhere */
    --card-w: 400px;
    --card-h: 520px;
    --card-w-tablet: 340px;
    --card-h-tablet: 440px;
    --card-w-mobile: 300px;
    --card-h-mobile: 390px;

    --transition-page:  0.4s cubic-bezier(0.76, 0, 0.24, 1);
    --transition-hover: 0.25s ease;
}


/* -----------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--color-white);
    color: var(--color-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    animation: fadeIn 0.3s ease 0.05s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Accessibility: visible focus for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-black);
    outline-offset: 3px;
    border-radius: 2px;
}
/* Remove focus ring for mouse users (browser default for :focus-visible handles this) */
:focus:not(:focus-visible) { outline: none; }


/* -----------------------------------------------------------
   3. SHARED COMPONENTS
   ----------------------------------------------------------- */

/* Page transition overlay */
/* Exit overlay — black panel slides UP to cover screen before navigating away */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-black);
    z-index: 9999;
    transform: translateY(100%);
    pointer-events: none;
}
.page-transition.exit { animation: slideUp var(--transition-page) forwards; }
@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0%);   }
}

/* Load screen — blue panel covers screen on arrival, then pulls up to reveal page */
.page-load {
    position: fixed;
    inset: 0;
    background: #0075EE;
    z-index: 9998;
    transform: translateY(0%);
    pointer-events: none;
    animation: loadPullUp 0.55s cubic-bezier(0.76, 0, 0.24, 1) 0.05s forwards;
}
@keyframes loadPullUp {
    from { transform: translateY(0%); }
    to   { transform: translateY(-100%); }
}

/* Floating bottom nav */
.site-nav {
    position: fixed;
    bottom: 1.5rem;
    z-index: 1000;
    pointer-events: auto;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    border: var(--border);
    background: var(--color-white);
    z-index: 1000;
    overflow: hidden;
}
.site-nav a {
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: var(--color-black);
    border-right: var(--border);
    transition: background var(--transition-hover);
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.site-nav a:last-child { border-right: none; }
.site-nav a:hover,
.site-nav a.active { background: var(--color-black); color: var(--color-white); }

/* Typography utilities */
.label-mono {
    font-family: var(--font-mono);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    display: block;
}

.muted { color: var(--color-muted); }

.btn-link {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-black);
    border-bottom: 1px dashed var(--color-black);
    padding-bottom: 2px;
    display: inline-block;
    transition: opacity var(--transition-hover);
    cursor: pointer;
}
.btn-link:hover { opacity: 0.55; }

.underlined { border-bottom: 1px dashed var(--color-black); padding-bottom: 4px; }
.label-link { text-decoration: none; color: inherit; cursor: pointer; }


/* -----------------------------------------------------------
   4. INDEX PAGE
   ----------------------------------------------------------- */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    overflow: hidden;
}

.panel-left {
    display: flex;
    flex-direction: column;
    border-right: var(--border);
    position: relative;
    height: 100vh;
    overflow: hidden;
}

/* ── Built-with drawer ── */
.bw-drawer {
    position: absolute;
    top: 40%;
    right: -1px; /* sits on the border */
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    pointer-events: none;
    z-index: 50;
}

.bw-tab {
    pointer-events: auto;
    position: relative;
    top: 2rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    background: var(--color-pink);
    border: var(--border);
    border-right: none;
    padding: 1rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    white-space: nowrap;
    color: var(--color-black);
    transition: background 0.2s;
    translate: 100% 0; /* sticks out to the right of panel-left */
}
.bw-tab:hover { background: #f0c0d0; }

.bw-tab-text { display: block; }

.bw-panel {
    pointer-events: auto;
    position: absolute;
    top: 2rem;
    right: 0;
    width: 220px;
    background: var(--color-pink);
    border: var(--border);
    padding: 1.25rem;
    transform: translateX(100%) translateX(36px); /* hidden: tab width ~36px */
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.25s ease;
}

.bw-drawer.bw-open .bw-panel {
    transform: translateX(calc(100% + 36px));
    opacity: 1;
}

.bw-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    opacity: 0.65;
    margin: 0 0 0.6rem;
}
.bw-body {
    font-size: 1rem;
    line-height: 1.55;
    font-weight: 500;
    margin: 0;
}

.section-intro {
    padding: 2.5rem 3rem;
    border-bottom: var(--border);
    flex-grow: 2;
    overflow: hidden;
}

.section-contact { padding: 2rem 3rem; flex-grow: 1; overflow: hidden; }

.hero-text {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 1.5rem;
    max-width: 540px;
}

.availability-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.panel-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* --- Slideshow (replaces card stack) --- */
.slideshow-container {
    position: absolute;
    inset: 0;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-black);
}

.slide-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.active { opacity: 1; pointer-events: auto; }

/* slide transitions */
@keyframes slideInRight  { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft   { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutLeft  { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

.slide.enter-right { animation: slideInRight 0.45s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
.slide.enter-left  { animation: slideInLeft  0.45s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
.slide.exit-left   { animation: slideOutLeft  0.45s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
.slide.exit-right  { animation: slideOutRight 0.45s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }

/* overlay info */
.slide-top {
    position: absolute;
    top: 1rem; left: 1rem;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: calc(100% - 2rem);
}

.slide-info {
    color: var(--color-white);
    pointer-events: none;
}
.slide-info-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.slide-info h2 { font-size: 1.4rem; font-weight: 600; margin: 0; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.slide-info p  { font-family: var(--font-mono); font-size: 1rem; opacity: 0.65; margin: 0.2rem 0 0; }

.slide-tags {
    display: flex; gap: 6px; flex-wrap: wrap;
    pointer-events: none;
}
.slide-tags span {
    font-family: var(--font-mono);
    font-size: 1rem;
    border: 1px solid rgba(255,255,255,0.7);
    color: var(--color-white);
    padding: 2px 8px;
    border-radius: 2px;
    background: rgba(0,0,0,0.25);
}

/* Award badge — used on work cards (tags row) and slideshow (title row) */
.award-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: var(--color-pink);
    color: var(--color-black);
    padding: 3px 14px 3px 8px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    white-space: nowrap;
    pointer-events: none;
    line-height: 1.4;
}
.award-badge .award-star { font-size: 1rem; }

/* keep .tags for work page */
.tags, .card-tags { display: flex; gap: 6px; margin-bottom: 1rem; flex-wrap: wrap; }
.tags span, .card-tags span {
    font-family: var(--font-mono);
    font-size: 1rem;
    border: 1px solid var(--color-white);
    padding: 2px 8px;
    border-radius: 2px;
}

.card-image-wrapper,
.card-image-container {
    flex-grow: 1;
    overflow: hidden;
    border-radius: 4px;
    background: #222;
}
.card-image-wrapper img,
.card-image-container img { width: 100%; height: 100%; object-fit: cover; }

.card-footer, .card-info { margin-top: 0.9rem; }
.card-footer h2, .card-info h2 { font-size: 1.5rem; font-weight: 600; }
.card-footer p,  .card-info p  { font-family: var(--font-mono); font-size: 1rem; opacity: 0.6; margin-top: 0.2rem; }

.gallery-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    z-index: 30;
    pointer-events: none;
}
.gallery-footer > * { pointer-events: auto; }

.counter { font-family: var(--font-mono); font-size: 1rem; color: rgba(255,255,255,0.75); }

.nav-btns { display: flex; gap: 10px; }

.nav-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--color-white);
    width: 44px; height: 44px;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-mono);
    border-radius: 2px;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.nav-btn:hover  { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.7); }
.nav-btn:active { background: rgba(255,255,255,0.9); color: var(--color-black); }

/* "CASE STUDIES +" label overlaid top-right */
.slideshow-label {
    position: absolute;
    top: 1.25rem; right: 1.5rem;
    z-index: 30;
    text-decoration: none;
    color: var(--color-white);
}


/* -----------------------------------------------------------
   5. WORK PAGE
   ----------------------------------------------------------- */
.work-page .grid-container {
    grid-template-columns: 25% 75%;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    padding: 2rem;
    border-right: var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.sidebar-title { font-size: 2.5rem; font-weight: 700; line-height: 1.15; margin-top: 0.5rem; }

.project-feed {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}
.project-feed::-webkit-scrollbar { display: none; }

.work-card {
    position: relative;
    width: 100%;
    border-bottom: var(--border);
    scroll-snap-align: start;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

.work-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.work-card:hover .work-img { transform: scale(1.03); }

.placeholder-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.3s;
}
.work-card:hover .placeholder-img { opacity: 0.85; }
.placeholder-label { font-family: var(--font-mono); font-size: 1rem; opacity: 0.55; }

.work-tags-overlay {
    position: absolute; top: 20px; left: 20px; z-index: 5;
    display: flex; gap: 5px; flex-wrap: wrap;
    transition: transform 0.3s ease;
}
.work-card:hover .work-tags-overlay { transform: translateY(-4px); }
.work-tags-overlay span:not(.award-badge) {
    background: rgba(255,255,255,0.92);
    border: var(--border);
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-black);
}

.work-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem 1.5rem 1.8rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
    color: var(--color-white);
}
.work-card:hover .work-card-info { transform: translateY(0); }
.work-card-info h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.25rem; }
.work-card-info p  { font-family: var(--font-mono); font-size: 1rem; opacity: 0.75; }

.work-card-arrow {
    position: absolute; top: 20px; right: 20px; z-index: 5;
    width: 36px; height: 36px;
    border: 1px solid rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.85);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    opacity: 0; transform: translate(4px,-4px);
    transition: opacity 0.25s, transform 0.25s;
}
.work-card:hover .work-card-arrow { opacity: 1; transform: translate(0,0); }


/* -----------------------------------------------------------
   6. PROJECT DETAIL PAGE
   ----------------------------------------------------------- */
.project-page .grid-container { grid-template-columns: 350px 1fr; align-items: start; }

/* prevent fixed bottom nav from covering long project text */
.koto-main,
.project-page .koto-main,
.project-page .koto-wrap,
.project-page .grid-container {
    padding-bottom: 6rem;
}

.sidebar-sticky {
    position: sticky; top: 0;
    height: 100vh; padding: 2.5rem;
    border-right: var(--border-stroke);
    display: flex; flex-direction: column;
}

.sidebar-inner { display: flex; flex-direction: column; height: 100%; }
.nav-links { margin-bottom: 2rem; }
.project-meta { margin-bottom: auto; }

.project-title { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0; font-weight: 700; }
.award-text    { font-size: 1rem; font-weight: 600; margin-bottom: 3rem; }

.description-section { margin-top: auto; padding-top: 2rem; border-top: var(--border-stroke); }
.body-text { font-size: 1rem; margin-top: 1rem; max-width: 280px; line-height: 1.5; }

.sidebar-footer { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.sidebar-footer-nav { display: flex; gap: 1rem; }
.sidebar-footer-nav .btn-link { font-size: 1rem; }

/* Built-with tab — pinned to bottom of sidebar */
.built-with-tab {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    margin: 0 2rem;
    background: var(--color-pink);
    padding: 1rem 1.25rem;
    border: var(--border);
}
.built-with-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.6rem;
    opacity: 0.7;
}
.built-with-body {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    margin: 0;
}

.project-visuals { width: 100%; }
.visual-item { width: 100%; position: relative; }
.full-img { width: 100%; height: auto; display: block; }

.overlay-tags { position: absolute; top: 20px; left: 20px; display: flex; gap: 10px; }
.overlay-tags span {
    background: var(--color-white); border: var(--border);
    padding: 3px 10px; font-family: var(--font-mono); font-size: 1rem;
}

.text-block { padding: 4rem 2.5rem; border-bottom: var(--border-stroke); }
.caption { font-size: 1.2rem; margin-top: 0.5rem; line-height: 1.4; }

.image-grid-two { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--border-stroke); }
.grid-placeholder { aspect-ratio: 1/1; background: var(--color-surface); border-right: var(--border-stroke); }
.grid-placeholder.large { aspect-ratio: 16/9; }


/* -----------------------------------------------------------
   7. ABOUT PAGE
   ----------------------------------------------------------- */
.about-page .bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr 2fr;
    height: 100vh; width: 100vw; overflow: hidden;
}

.tile { padding: 1.5rem; position: relative; overflow: hidden; border: 1px solid rgba(0,0,0,0.08); }
.span-row-2 { grid-row: span 2; }

.tile-grey       { background: #dbdbdb; }
.tile-white      { background: var(--color-white); }
.tile-black      { background: #1a1a1a; color: var(--color-white); }
.tile-dark-green { background: var(--color-dark-green); color: var(--color-white); }
.tile-mid-grey   { background: #939393; }
.tile-pink       { background: var(--color-pink); }
.tile-blue       { background: var(--color-blue); color: var(--color-white); }

.tile-interactive { cursor: pointer; transition: filter 0.2s; }
.tile-interactive:hover { filter: brightness(0.93); }

.flex-center { display: flex; align-items: center; justify-content: center; text-align: center; }
.large-text  { font-size: 2.5rem; font-weight: 600; text-decoration: underline; }

.green-link { color: var(--color-dark-green); transition: opacity 0.2s; }
.green-link:hover { opacity: 0.7; }
.white-link { color: var(--color-white); transition: opacity 0.2s; }
.white-link:hover { opacity: 0.7; }

.window-container { width: 85%; height: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2)); }
.mockup-img { width: 100%; height: auto; display: block; border-radius: 8px; }

.tile-playground { text-decoration: none; color: var(--color-black); display: block; }
.playground-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.playground-overlay img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.tile-playground .label-mono { position: relative; z-index: 1; }


/* -----------------------------------------------------------
   8. PLAYGROUND PAGE
   ----------------------------------------------------------- */
.playground-page .grid-container {
    grid-template-columns: 25% 75%;
    height: 100vh; overflow: hidden;
}

.playground-page .sidebar {
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 0; height: 100%; border-right: var(--border);
}

.sidebar-top    { padding: 2rem; }
.sidebar-middle { padding: 2rem; flex-grow: 1; border-top: var(--border-stroke); }

.sidebar-bottom-pink {
    background: var(--color-pink); padding: 2rem;
    height: 40%; display: flex; align-items: flex-end;
}

.playground-canvas {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}

.floating-cards { position: relative; width: 820px; height: 560px; }

.p-card {
    position: absolute;
    width: 220px; height: 350px;
    background: var(--color-white);
    border: 0.5px solid var(--color-black);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
}
.p-card:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.15); z-index: 10; }

.card-1 { top: 0;     left: 0;   z-index: 1; }
.card-2 { top: 60px;  left: 120px; z-index: 4; }
.card-3 { top: -40px; left: 280px; transform: rotate(12deg); z-index: 2; }
.card-4 { top: 100px; left: 420px; transform: rotate(8deg);  z-index: 3; }
.card-5 { top: 20px;  left: 560px; transform: rotate(-6deg); z-index: 5; }
.card-6 { top: 160px; left: 200px; transform: rotate(-4deg); z-index: 6; }
.card-7 { top: 150px; left: 620px; transform: rotate(5deg);  z-index: 7; }

.card-1:hover { transform: rotate(0deg)  translateY(-12px); }
.card-2:hover { transform: rotate(0deg)  translateY(-12px); }
.card-3:hover { transform: rotate(6deg)  translateY(-12px); }
.card-4:hover { transform: rotate(3deg)  translateY(-12px); }
.card-5:hover { transform: rotate(-3deg) translateY(-12px); }
.card-6:hover { transform: rotate(-2deg) translateY(-12px); }
.card-7:hover { transform: rotate(2deg)  translateY(-12px); }


/* -----------------------------------------------------------
   9. RESPONSIVE OVERRIDES
   ----------------------------------------------------------- */

/* ── Tablet ≤1100px ── */
@media (max-width: 1100px) {
    .hero-text { font-size: 1.55rem; }

    .work-page .grid-container { grid-template-columns: 30% 70%; }

    .project-page .grid-container { grid-template-columns: 280px 1fr; }

    .about-page .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        height: auto;
    }
    .span-row-2 { grid-row: span 1; }
}

/* ── Mobile ≤768px ── */
@media (max-width: 768px) {

    .grid-container { grid-template-columns: 1fr; height: auto; }

    .panel-left { border-right: none; }

    .section-intro  { padding: 4.5rem 1.5rem 2rem; }
    .section-contact { order: 3; padding: 2rem 1.5rem; border-top: var(--border); }

    .panel-right {
        order: 2;
        border-top: var(--border);
        padding: 0;
        height: 70vw;
        min-height: 320px;
    }

    .hero-text { font-size: 1.35rem; max-width: 100%; }
    .availability-text { font-size: 1.1rem; }

    .gallery-footer { padding: 0.75rem 1rem; }

    .site-nav a { padding: 0.6rem 0.8rem; font-size: 1rem; }
    .site-nav.nav-top { bottom: auto; top: 1rem; }

    /* Work */
    .work-page .grid-container { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .sidebar { height: auto; border-right: none; border-bottom: var(--border); padding: 2.5rem 1.5rem; }
    .project-feed { height: auto; overflow-y: visible; scroll-snap-type: none; }
    .work-card { aspect-ratio: 4/3; }
    .work-page .built-with-tab { position: static; bottom: auto; left: auto; right: auto; margin: 1.25rem 0 0; }
    .work-card-info { transform: translateY(0); }

    /* Project detail */
    .project-page .grid-container { grid-template-columns: 1fr; }
    .sidebar-sticky { position: relative; height: auto; border-right: none; border-bottom: var(--border-stroke); }
    .body-text { max-width: 100%; }

    /* About */
    .about-page .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto; overflow-y: auto;
    }
    .tile { height: auto; min-height: 180px; }
    .span-row-2 { grid-row: span 1; }
    .large-text { font-size: 1.8rem; }

    /* Playground */
    .playground-page .grid-container { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .playground-page .sidebar { height: auto; border-right: none; border-bottom: var(--border); }
    .sidebar-bottom-pink { height: 130px; }

    .playground-canvas { min-height: unset; padding: 1.5rem; overflow: visible; }

    .floating-cards {
        position: static;
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        transform: none;
    }

    .p-card {
        position: static;
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 3;
        transform: none !important;
    }

    .p-card:hover { transform: translateY(-6px) !important; }

    .card-1, .card-2, .card-3,
    .card-4, .card-5, .card-6 {
        top: auto; left: auto;
    }
}

/* ── Small mobile ≤400px ── */
@media (max-width: 400px) {
    .hero-text { font-size: 1.15rem; }
}

/* -----------------------------------------------------------
   ABOUT PAGE — Extra tile content styles
   ----------------------------------------------------------- */
.award-item { margin-bottom: 0.75rem; }
.award-item .award-title { font-size: 1rem; font-weight: 600; color: var(--color-white); }
.award-item .award-sub   { font-family: var(--font-mono); font-size: 1rem; opacity: 0.6; color: var(--color-white); }

.current-item { margin-bottom: 0.5rem; }
.current-item p    { font-size: 1rem; color: var(--color-white); }
.current-item span { font-family: var(--font-mono); font-size: 1rem; opacity: 0.55; color: var(--color-white); }

.social-links { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.social-links a {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-black);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-black);
    padding-bottom: 2px;
    width: fit-content;
    transition: opacity 0.2s;
}
.social-links a:hover { opacity: 0.6; }

.edu-item { margin-bottom: 0.75rem; }
.edu-title { font-size: 1rem; font-weight: 600; }
.edu-sub   { font-family: var(--font-mono); font-size: 1rem; opacity: 0.6; }

.bento-link { text-decoration: none; display: block; }

/* Scratch canvas tile */
.scratch-wrapper { position: relative; width: 100%; height: 100%; cursor: crosshair; }
.scratch-reveal {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem;
}
.scratch-reveal p    { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.scratch-reveal span { font-family: var(--font-mono); font-size: 1rem; opacity: 0.65; margin-top: 0.5rem; display: block; }
#scratchCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.scratch-hint {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-family: var(--font-mono); font-size: 1rem; text-align: center;
    pointer-events: none; transition: opacity 0.5s; line-height: 1.6;
}
.scratch-hint.hidden { opacity: 0; }
.tile-playground:hover .playground-overlay img { opacity: 0.6; }

/* -----------------------------------------------------------
   LIGHTBOX
   ----------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.35s ease;
}
.lightbox.open {
    background: rgba(0, 0, 0, 0.92);
    pointer-events: all;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.lightbox.open .lightbox-img {
    opacity: 1;
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    opacity: 0;
    transition: opacity 0.35s ease 0.1s, background 0.2s, border-color 0.2s;
}
.lightbox.open .lightbox-close {
    opacity: 1;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
}

/* cursor hint on cards */
.p-card { cursor: zoom-in; }


.changeA{
    font: #000;
}

/* ============================================================
   PROJECT DETAIL — KOTO-STYLE LAYOUT
   White sidebar · Geist · black borders · site tokens
   ============================================================ */

.koto-layout {
    overflow: hidden;
    height: 100vh;
}

.koto-wrap {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    overflow: visible;
    position: relative;
}

/* ── LEFT SIDEBAR ── */
.koto-sidebar {
    background: var(--color-white);
    color: var(--color-black);
    height: 100vh;
    overflow: visible;
    border-right: var(--border);
    position: relative;
}
/* Inner wrapper handles the actual scrolling */
.koto-sidebar-inner {
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 2.5rem;
}
.koto-sidebar-inner::-webkit-scrollbar { display: none; }

/* ── BACK LINK ── */
.koto-back {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 3rem;
    text-decoration: underline dashed var(--color-black);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color var(--transition-hover);
    position: relative;
}
.koto-back::before {
    content: '←';
    display: inline-block;
    margin-right: 0.6rem;
    vertical-align: middle;
    opacity: 0.7;
    text-decoration: none;
}
.koto-back:hover { color: var(--color-black); }

/* ── PROJECT META ── */
.koto-project-meta {
    margin-bottom: 3rem;
}

.koto-project-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-black);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.koto-project-sub {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}




.koto-project-tags {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    text-transform: uppercase;
}

/* ── SECTION NAV ── */
.koto-section-nav {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 2rem;
}

.koto-nav-item {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-muted);
    text-decoration: none;
    padding: 0.65rem 0;
    transition: color var(--transition-hover);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.koto-nav-item::before {
    content: '·';
    font-size: 1rem;
    color: var(--color-black);
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.2s;
    line-height: 1;
}
.koto-nav-item:hover { color: var(--color-black); }
.koto-nav-item.active { color: var(--color-black); font-weight: 500; }
.koto-nav-item.active::before { opacity: 1; }

/* ── SIDEBAR FOOTER ── */
.koto-sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
}

.koto-thanks {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Pink vertical tab drawer — top-right of koto-sidebar */
.koto-recognition-drawer {
    position: absolute;
    top: 0;
    right: -1px; /* sits on the sidebar's right border */
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    z-index: 100;
    pointer-events: none;
}

.koto-recognition-tab {
    pointer-events: auto;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    background: var(--color-pink);
    border: var(--border);
    border-right: none;
    padding: 1rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    white-space: nowrap;
    color: var(--color-black);
    transition: background 0.2s;
    flex-shrink: 0;
    position: relative;
    top: 2rem;
    translate: 100% 0; /* sticks out to the right */
}
.koto-recognition-tab:hover { background: #f0c0d0; }

.koto-recognition-panel {
    pointer-events: auto;
    background: var(--color-pink);
    border: var(--border);
    border-left: none;
    padding: 1.25rem;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width 0.35s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.25s ease, padding 0.3s ease;
    padding-left: 0;
    padding-right: 0;
    position: absolute;
    top: 2rem;
    left: calc(100% + 36px); /* opens to the right, past the tab */
}
.koto-recognition-drawer.open .koto-recognition-panel {
    max-width: 260px;
    opacity: 1;
    padding: 1.25rem;
}
.koto-recognition-panel p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    color: var(--color-black);
    white-space: normal;
    min-width: 200px;
}

@media (max-width: 768px) {
    /* Mobile: recognition drawer should sit below the project sub/title */
    .koto-recognition-drawer {
        position: static;
        top: auto;
        right: auto;
        margin: 0 0 1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }


    .koto-recognition-tab {
        width: 100%;
        text-align: left;
        writing-mode: horizontal-tb;
    }

    .koto-recognition-panel {
        /* closed state should not reserve height */
        max-height: 0;
        padding: 0;
        border-top: none;
        overflow: hidden;
        opacity: 0;
        margin-top: 0;
    }

    .koto-recognition-drawer.open .koto-recognition-panel {
        max-height: 500px;
        opacity: 1;
        padding: 1.25rem;
        margin-top: 0;
    }

    .koto-recognition-tab {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        transform: none;
        background: var(--color-pink);
        border: var(--border);
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        top: 0;
        translate: none;
        text-align: left;
    }
    .koto-recognition-panel {
        position: static;
        max-width: 100%;
        border: var(--border);
        border-top: none;
        left: 0;
        padding: 0;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }
    .koto-recognition-drawer.open .koto-recognition-panel {
        max-height: 500px;
        opacity: 1;
        padding: 1.25rem;
    }
}

.koto-prev-next {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
}

.koto-pn {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-muted);
    padding-bottom: 2px;
    transition: color var(--transition-hover), border-color var(--transition-hover);
    position: relative;
}
.koto-pn::after {
    content: '→';
    display: inline-block;
    margin-left: 0.5rem;
    opacity: 0.7;
}
.koto-pn:hover { color: var(--color-black); border-color: var(--color-black); }


/* ── RIGHT SCROLL PANEL ── */
.koto-main {
    position: relative;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 6rem;
    background: var(--color-white);
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

/* --- Project-specific iframe helpers (Barterfolk) --- */
.bf-iframe-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: var(--border);
}

.bf-iframe-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 3.5rem 3.5rem;
    border-bottom: var(--border);
}

.bf-iframe-pair .bf-iframe-wrap:first-child {
    border-right: var(--border);
}

.bf-iframe {
    width: min(960px, 100%);
    aspect-ratio: 16 / 9;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}

@media (max-width: 768px) {
    .bf-iframe-pair {
        grid-template-columns: 1fr;
    }
    .bf-iframe-pair .bf-iframe-wrap:first-child {
        border-right: none;
    }
    .bf-iframe-wrap { padding: 2rem 1.5rem; }
}


.next-project-snippet {
    position: static;
    margin: 1.5rem 2rem 3rem auto;
    width: 260px;
    background: #b8d9b8;
    border: var(--border);
    padding: 1rem 1.2rem;
    color: var(--color-black);
    font-family: var(--font-mono);
}
.next-project-snippet h3 {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.next-project-snippet p {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.95;
}
.next-project-snippet a {
    color: var(--color-black);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-black);
    padding-bottom: 2px;
    font-weight: 600;
}
.next-project-snippet a:hover {
    opacity: 0.8;
}
@media (max-width: 768px) {
    .next-project-snippet {
        position: static;
        width: auto;
        margin: 2rem auto 4rem auto;
        right: auto;
        bottom: auto;
    }
}

/* ── HERO BLOCK ── */
.koto-hero-block { width: 100%; }

.koto-hero-color {
    width: 100%;
    min-height: 56vh;
    display: flex;
    align-items: flex-end;
    padding: 3.5rem;
}

.koto-hero-text { max-width: 680px; }

.koto-eyebrow {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    display: block;
    margin-bottom: 1rem;
}

.koto-hero-text h2 {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* ── EDITORIAL SECTION ── */
.koto-section-label {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 3rem;
    padding: 3.5rem;
    border-bottom: var(--border);
}

.koto-label-col {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding-top: 0.3rem;
}

.koto-body-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.koto-body-col p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-black);
    max-width: 600px;
}

/* ── MEDIA BLOCKS ── */
.koto-media-full { width: 100%; }

/* ── STATS ── */
.koto-stat-trio {
    display: flex;
    gap: 4rem;
    padding: 4rem 3.5rem;
    flex-wrap: wrap;
    border-bottom: var(--border);
}

.koto-stat { display: flex; flex-direction: column; gap: 0.4rem; }

.koto-stat-num {
    font-family: var(--font-sans);
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--color-muted);
    max-width: 130px;
    line-height: 1.5;
}

/* ── GRID LAYOUTS ── */
.koto-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    border-bottom: var(--border);
}

.koto-grid-item { border-right: var(--border); }
.koto-grid-item:last-child { border-right: none; }

.koto-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    width: 100%;
    border-bottom: var(--border);
}

.koto-feature-card {
    padding: 2.5rem;
    border-right: var(--border);
}
.koto-feature-card:last-child { border-right: none; }

.koto-feature-num {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--color-muted);
    display: block;
    margin-bottom: 1.25rem;
}

.koto-feature-card h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.koto-feature-card p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    opacity: 0.7;
}

/* ── PULL QUOTE ── */
.koto-pullquote {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -0.01em;
    font-style: normal;
    border: none;
    padding: 0;
    color: var(--color-black);
}
.koto-pullquote.light { color: rgba(255,255,255,0.9); }
.koto-pullquote cite {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.06em;
    opacity: 0.5;
    font-style: normal;
}

.koto-caption-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.koto-insight-text {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 500;
}

/* ── TYPE SPECIMEN ── */
.koto-type-specimen { max-width: 800px; }

.koto-specimen-label {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1.5rem;
}

.koto-specimen-text {
    font-family: var(--font-sans);
    font-size: clamp(1.8rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

/* ── PROJECT NAVIGATION ── */
.koto-next-project {
    padding: 4rem 3.5rem;
    border-bottom: var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.koto-next-project h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.koto-next-project a {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--color-black);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px dashed var(--color-black);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.koto-next-project a:hover {
    opacity: 0.65;
}

@media (max-width: 768px) {
    .koto-next-project {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
    }
}

/* ── CLOSING ── */
.koto-closing-quote {
    font-family: var(--font-sans);
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.koto-closing-credit {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    display: block;
}


/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .koto-wrap { grid-template-columns: 260px 1fr; }
    .koto-project-title { font-size: 1.8rem; }
    .koto-section-label { padding: 3rem; gap: 2rem; }
    .koto-stat-trio { padding: 3rem; }
}

@media (max-width: 768px) {
    .koto-layout { height: auto; overflow: visible; }
    .koto-wrap { grid-template-columns: 1fr; height: auto; }
    .koto-sidebar { height: auto; overflow: visible; border-right: none; border-bottom: var(--border); }
    .koto-sidebar-inner { min-height: auto; }
    .koto-main { height: auto; overflow: visible; }

    /* Mobile: section nav visible, bold, and padded (match desktop styling) */
    .koto-section-nav {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 0.5rem 0;
        align-self: stretch;
        justify-content: center;
    }

    .koto-nav-item {
        padding: 0.75rem 1rem;
        font-weight: 700;
        color: var(--color-black);
        gap: 0.6rem;
        border-top: var(--border);
    }

    .koto-nav-item:first-child { border-top: none; }

    .koto-nav-item::before {
        opacity: 1;
        color: var(--color-black);
    }

    .koto-nav-item.active {
        font-weight: 800;
        background: var(--color-pink);
        color: var(--color-black);
    }

    .koto-project-meta { margin-bottom: 1rem; }
    .koto-sidebar-footer { margin-top: 0; padding-top: 0; transform: translateY(-0.75rem); }
    .koto-section-label { grid-template-columns: 1fr; gap: 1rem; padding: 2rem 1.5rem; }
    .koto-label-col { padding-top: 0; }
    .koto-hero-color { padding: 2rem 1.5rem; min-height: 45vw; }
    .koto-stat-trio { gap: 2rem; padding: 2rem 1.5rem; }
    .koto-grid-two { grid-template-columns: 1fr; }
    .koto-grid-item { border-right: none; border-bottom: var(--border); }
    .koto-grid-three { grid-template-columns: 1fr; }
    .koto-feature-card { border-right: none; border-bottom: var(--border); }
    .koto-media-full { padding: 2rem 1.5rem !important; }
    .koto-grid-item { min-height: 280px !important; }
}

