/* ── Page Transitions — handled entirely by cursor.js ── */

/* ============================================================
   OGG FONT FAMILY — Schick Toikka (self-hosted)
   Ogg: display headings, hero text, pull-quotes
   OggText: section titles, card titles, editorial text
   ============================================================ */


@font-face { font-family:'OggText'; src:url('fonts/oggtext-light.otf') format('opentype'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-lightitalic.otf') format('opentype'); font-weight:300; font-style:italic; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-book.otf') format('opentype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-bookitalic.otf') format('opentype'); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-medium.otf') format('opentype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-mediumitalic.otf') format('opentype'); font-weight:500; font-style:italic; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-bold.otf') format('opentype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-bolditalic.otf') format('opentype'); font-weight:700; font-style:italic; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-extrabold.otf') format('opentype'); font-weight:800; font-style:normal; font-display:swap; }
@font-face { font-family:'OggText'; src:url('fonts/oggtext-extrabolditalic.otf') format('opentype'); font-weight:800; font-style:italic; font-display:swap; }

/* ── Theme variables ── */
:root {
  --bg:          #000000;
  --bg-2:        #0a0a0a;
  --bg-3:        #0d0d0d;
  --bg-card:     #111111;
  --bg-deep:     #1a1a1a;
  --fg:          #f5f5f5;
  --fg-80:       rgba(245,245,245,0.80);
  --fg-65:       rgba(245,245,245,0.65);
  --fg-55:       rgba(245,245,245,0.55);
  --fg-45:       rgba(245,245,245,0.45);
  --fg-35:       rgba(245,245,245,0.35);
  --fg-20:       rgba(245,245,245,0.20);
  --fg-12:       rgba(245,245,245,0.12);
  --fg-08:       rgba(245,245,245,0.08);
  --fg-05:       rgba(245,245,245,0.05);
  --fg-03:       rgba(245,245,245,0.03);
  --overlay:     rgba(0,0,0,0.97);
}

html[data-theme="light"] {
  --bg:          #fafaf8;
  --bg-2:        #f2f0ec;
  --bg-3:        #eceae6;
  --bg-card:     #e5e3df;
  --bg-deep:     #d8d6d2;
  --fg:          #000000;
  --fg-80:       rgba(0,0,0,0.88);
  --fg-65:       rgba(0,0,0,0.75);
  --fg-55:       rgba(0,0,0,0.65);
  --fg-45:       rgba(0,0,0,0.58);
  --fg-35:       rgba(0,0,0,0.48);
  --fg-20:       rgba(0,0,0,0.26);
  --fg-12:       rgba(0,0,0,0.14);
  --fg-08:       rgba(0,0,0,0.10);
  --fg-05:       rgba(0,0,0,0.06);
  --fg-03:       rgba(0,0,0,0.04);
  --overlay:     rgba(250,250,248,0.97);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global image styling */
img {
    border-radius: 0;
    border: none;
    box-sizing: border-box;
}

/* Custom Cursor */
html {
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome/Safari/WebKit */
}

body {
    cursor: none;
    font-family: 'Technor', 'IBM Plex Sans', sans-serif;
    background-color: #000000;
    color: #f5f5f5;
    line-height: 1.4;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Mountain Peak Background — hidden globally */
.mountain-peak-bg {
    display: none !important;
}

.mountain-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Light theme pages (work, subpages) */
.light-page {
    background-color: #FCF8F4;
    color: #111111;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(245, 245, 245, 1);
    border: 2px solid rgba(245, 245, 245, 1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 200000;
    transition: transform 0.1s ease, background 0.15s ease, width 0.15s ease, height 0.15s ease;
    box-shadow: 0 0 15px rgba(245, 245, 245, 0.8);
    opacity: 1 !important;
    visibility: visible !important;
    /* Fix positioning */
    transform: translate(-50%, -50%);
}

/* Cursor on hover of links — ring instead of dot */
.custom-cursor--link {
    background: transparent;
    width: 28px;
    height: 28px;
    box-shadow: none;
}

/* Pentagram Navigation */
.pentagram-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: #000;
    border-bottom: none;
    padding: 14px 0;
}

/* writing-main nav uses global .pentagram-nav defaults */

.nav-container {
    max-width: none;
    width: 95%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-logo {
    font-family: 'OggText', serif;
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    color: #f5f5f5;
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

body:has(.writing-main) .nav-logo {
    color: #f5f5f5;
}

.nav-link {
    color: rgba(245, 245, 245, 0.75);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    text-transform: none;
    letter-spacing: 0.04em;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    cursor: pointer;
}

body:has(.writing-main) .nav-link {
    color: rgba(245, 245, 245, 0.9);
}

/* Hover: underline only */
.nav-link:hover {
    color: #f5f5f5;
    font-family: 'IBM Plex Mono', monospace;
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: rgba(245, 245, 245, 0.85);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

/* Active: OggText italic, NO underline — font-size locked to match default */
.nav-link.active {
    color: #f5f5f5;
    font-family: 'OggText', serif;
    font-style: italic;
    font-size: 17px;
    text-decoration: none;
}

/* .pentagram-nav .nav-link — underline removed for cleaner look */

/* Hero Section */
.pentagram-hero {
    padding: 140px 2rem 80px 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Main Content */
.pentagram-main {
    padding: 0 2rem 80px 2rem; /* add right padding back */
    max-width: 1400px; /* match writing page */
    margin: 0 auto; /* center like writing page */
    width: 100%;
    color: inherit;
}

/* Writing Page */
body:has(.writing-main) {
    background-color: #000000;
}

body:has(.writing-main) .mountain-peak-bg {
    display: none;
}

/* About Page */
body:has(.about-main) {
    background-color: #000000;
}

body:has(.about-main) .pentagram-nav {
    background: #000;
    border-bottom: none;
}

body:has(.about-main) .nav-logo {
    color: #f5f5f5;
}

body:has(.about-main) .nav-link {
    color: rgba(245, 245, 245, 0.9);
}

body:has(.about-main) .nav-link:hover {
    color: #f5f5f5;
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: rgba(245, 245, 245, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

body:has(.about-main) .nav-link.active {
    color: #f5f5f5;
    font-family: 'OggText', serif;
    font-style: italic;
    text-decoration: none;
}

body:has(.about-main) .mountain-peak-bg {
    display: none;
}

.about-main {
    padding: 120px 0 80px;
    width: 95%;
    max-width: none;
    margin: 0 auto;
    color: #f5f5f5;
}

.about-container {
    width: 100%;
}

.about-header {
    margin-bottom: 2rem;
}

.about-title {
    font-family: 'OggText', serif;
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #f5f5f5;
    margin-bottom: 0;
}

.about-content {
    display: flex;
    gap: 5rem;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.about-left {
    flex: 1;
    min-width: 0;
    max-width: 520px;
}

.about-image-col {
    width: 480px;
    flex-shrink: 0;
}

.about-image-placeholder {
    width: 95%;
    margin-left: auto;
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
    border: 1px solid rgba(245, 245, 245, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(245, 245, 245, 0.2);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* Profile photo with wave effect */
.about-photo-wrap {
    width: 95%;
    margin-left: auto;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
}

.about-photo-wrap canvas,
.about-photo-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-photo--default,
.about-photo--hover {
    position: absolute;
    top: 0; left: 0;
    transition: opacity 1s ease;
}

.about-photo--hover {
    opacity: 0;
}

.about-photo-wrap:hover .about-photo--default {
    opacity: 0;
}

.about-photo-wrap:hover .about-photo--hover {
    opacity: 1;
}

.about-photo-credit {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(245,245,245,0.35);
    margin: 10px 0 0;
    width: 95%;
    margin-left: auto;
    letter-spacing: 0.02em;
}

.about-photo-credit-link {
    color: rgba(245,245,245,0.55);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(245,245,245,0.25);
    transition: color 0.2s ease;
}

.about-photo-credit-link:hover {
    color: rgba(245,245,245,0.9);
}

html[data-theme="light"] .about-photo-credit { color: rgba(0,0,0,0.38); }
html[data-theme="light"] .about-photo-credit-link { color: rgba(0,0,0,0.55); text-decoration-color: rgba(0,0,0,0.25); }
html[data-theme="light"] .about-photo-credit-link:hover { color: rgba(0,0,0,0.88); }

.about-text {
    margin-bottom: 3rem;
}

.about-text p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    font-style: normal;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.82);
    letter-spacing: 0.01em;
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Inline links within about bio */
.about-inline-link {
    color: inherit;
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: currentColor;
}
.about-inline-link:hover {
    opacity: 0.6;
}

.about-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.about-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.8);
    text-decoration: underline;
    text-decoration-color: rgba(245, 245, 245, 0.4);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: all 0.3s ease;
}

.about-link:hover {
    color: #f5f5f5;
    text-decoration-color: rgba(245, 245, 245, 0.8);
    text-decoration-thickness: 2px;
}

/* ── Writing Page ── */
.writing-main {
    padding: 120px 0 80px;
    width: 95%;
    margin: 0 auto;
    color: #f5f5f5;
}

.writing-container {
    width: 100%;
}

.writing-header {
    margin-bottom: 40px;
}

.writing-title {
    font-family: 'OggText', serif;
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    color: #f5f5f5;
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

.writing-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    font-style: normal;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.55);
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.5;
    margin-top: 8px;
}

/* Writing grid — 3 columns, uniform cards */
.writing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    width: 100%;
}

/* All cards same width in the 3-col grid */
.writing-card:nth-child(n) { grid-column: span 1; }

.writing-card {
    background: transparent;
    border: none;
    border-top: 1px solid rgba(245, 245, 245, 0.12);
    border-bottom: 1px solid rgba(245, 245, 245, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.writing-card:hover {
    border-top-color: rgba(245, 245, 245, 0.35);
    border-bottom-color: rgba(245, 245, 245, 0.2);
    background: rgba(245, 245, 245, 0.03);
}

/* Make the entire card a clickable link */
a.writing-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.writing-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    text-decoration: none;
    flex-shrink: 0;
}

.writing-card-color {
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a.writing-card:hover .writing-card-color {
    transform: scale(1.03);
}

.writing-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a.writing-card:hover .writing-card-thumb img {
    transform: scale(1.03);
}

.writing-card-body {
    padding: 20px 0 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 400;
    font-style: normal;
    text-transform: none;
    letter-spacing: 0.04em;
    color: rgba(245, 245, 245, 0.35);
    display: block;
    margin-bottom: 12px;
    margin-top: 20px;
}

.post-title {
    font-family: 'OggText', serif;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1.3;
    margin: 0 0 10px;
    /* 1-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.post-title a {
    color: #f5f5f5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.writing-card:hover .post-title a,
a.writing-card:hover .post-title {
    color: rgba(245, 245, 245, 0.75);
}

.post-excerpt {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    font-style: normal;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.45);
    margin: 0 0 auto;
    /* 2-line clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 16px;
}

.post-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    color: rgba(245, 245, 245, 0.28);
    letter-spacing: 0.03em;
    margin-top: 0;
}

.post-read-more {
    display: none; /* Date is enough — full card is clickable */
}

/* Legacy writing-thumb (hidden) */
.writing-thumb {
    display: none;
}

.thumb-image {
    display: none;
}

/* Work (Pentagram-like) */
.work-hero {
    padding: 160px 0 0 0;
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.work-hero-title {
    font-family: 'OggText', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
    text-align: left;
    margin-bottom: 0;
}

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

@media (max-width: 1200px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .work-grid { grid-template-columns: 1fr; } }

.work-card { cursor: pointer; }
.work-card .project-image { height: 260px; background: #111; display: flex; align-items: center; justify-content: center; }
.work-card .project-title { margin-top: 12px; font-size: 16px; font-weight: 700; }
.work-card .project-meta { margin-top: 6px; font-size: 12px; opacity: 0.8; display: flex; gap: 8px; text-transform: none; }

.work-load-more { display: none; }

.main-container {
    width: 100%;
}

/* Projects Section */
/* Portfolio Header */
.portfolio-header {
    text-align: center;
    padding: 2rem 0 3rem 0;
    margin-bottom: 2rem;
}

.portfolio-title {
    font-family: 'OggText', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    color: inherit;
    text-transform: none;
    letter-spacing: 2px;
    margin: 0;
}

.projects-section {
    width: 95%;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 0;
    align-items: start; /* avoid extra vertical whitespace */
}

/* Site Navigation (non-home) */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #FCF8F4;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    z-index: 1200;
}

.site-nav__brand {
    font-family: 'OggText', serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #111111;
    text-decoration: none;
}

.site-nav__links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.site-nav__link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2px;
    text-decoration: none;
    color: #333333;
    padding: 0.35rem 0.15rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav__link:hover {
    color: #000000;
    transform: translateY(-1px);
}

.site-nav__link.active {
    color: #000000;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* Adjust main padding to account for fixed nav */
.light-page .pentagram-main {
    padding-top: 140px;
}



/* Projects Divider - Hidden on mobile for simple vertical flow */
.projects-divider {
    grid-column: 1 / -1;
    text-align: center;
    margin: 6rem 0 4rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgba(245, 245, 245, 0.1);
    border-bottom: 1px solid rgba(245, 245, 245, 0.1);
}

.divider-title {
    font-family: 'OggText', serif;
    font-size: 24px;
    font-weight: 700;
    color: #f5f5f5;
    text-transform: none;
    letter-spacing: 1px;
}

/* Irregular masonry grid - different card sizes */
.project-card {
    background: transparent;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: none;
}

/* Irregular grid sizing using article positions (safe with divider present) */
.projects-grid > article.project-card:nth-of-type(1) {
    grid-column: 1; /* 40% width on left */
}

.projects-grid > article.project-card:nth-of-type(1) .project-image {
    height: 336px;
    width: 100%;
    object-fit: cover;
    border-radius: 0;
}

.projects-grid > article.project-card:nth-of-type(2) {
    grid-column: 2 / 4; /* 60% width on right spanning 2 cols */
}

.projects-grid > article.project-card:nth-of-type(2) .project-image {
    /* Make larger hero tile 16:9 */
    height: 540px;
    width: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
}

/* 3-column row for Dunzo, Eureka Forbes, Porter */
.projects-grid > article.project-card:nth-of-type(3) {
    grid-column: 1;
    grid-row: 2;
}

.projects-grid > article.project-card:nth-of-type(4) {
    grid-column: 2;
    grid-row: 2;
}

.projects-grid > article.project-card:nth-of-type(5) {
    grid-column: 3;
    grid-row: 2;
}

.projects-grid > article.project-card:nth-of-type(3) .project-image,
.projects-grid > article.project-card:nth-of-type(4) .project-image,
.projects-grid > article.project-card:nth-of-type(5) .project-image {
    height: 400px; /* Same size for all three */
    border-radius: 0;
}

/* Visual projects after divider (third row) */
.projects-grid > article.project-card:nth-of-type(6) {
    grid-column: 1 / 3; /* large on left */
}

.projects-grid > article.project-card:nth-of-type(6) .project-image {
    /* Make larger hero tile 16:9 */
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: none;
    border-radius: 0;
}

.projects-grid > article.project-card:nth-of-type(7) {
    grid-column: 3; /* small on right */
}

.projects-grid > article.project-card:nth-of-type(7) .project-image {
    height: 320px;
    border-radius: 0;
}

/* Subtitle under title limited to two lines */
.project-subtitle {
    margin-top: 6px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: rgba(245, 245, 245, 0.8);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-image {
    width: 100%;
    background: rgba(245, 245, 245, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.5);
    text-transform: none;
    letter-spacing: 1px;
    border-radius: 0;
}

/* Project content wrapper */
.project-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.project-title {
    font-family: 'OggText', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #f5f5f5;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-description {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.7);
    line-height: 1.5;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    background: rgba(245, 245, 245, 0.1);
    color: rgba(245, 245, 245, 0.8);
    padding: 0.25rem 0.75rem;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0.5px;
    border-radius: 2px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: rgba(245, 245, 245, 0.5);
    text-transform: none;
    letter-spacing: 0.5px;
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.load-more-btn {
    background: none;
    border: 1px solid rgba(245, 245, 245, 0.3);
    color: rgba(245, 245, 245, 0.7);
    padding: 1rem 2rem;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.load-more-btn:hover {
    background: #f5f5f5;
    color: #000000;
    border-color: #f5f5f5;
}

/* Layout */
.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 20vh 2rem 10vh 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    transition: filter 0.3s ease;
    z-index: 1;
}

.main-content {
    text-align: left;
    width: 100%;
    height: fit-content;
}

/* Heading font split — both OggText light (300) */
.heading-sans {
    font-family: 'OggText', serif;
    font-weight: 300;
    font-style: normal;
}

.heading-italic {
    font-family: 'OggText', serif;
    font-weight: 300;
    font-style: italic;
}

/* Inline link inside main heading */
.heading-link {
    color: inherit;
    font-style: italic;
    text-decoration: none;
    white-space: nowrap;
}
.heading-link .hl-char {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}
.heading-link:hover {
    opacity: 0.7;
}

/* Typography */
.main-heading {
    font-family: 'OggText', serif;
    font-size: clamp(2.2rem, 3.8vw, 5rem);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: #f5f5f5;
    width: 80%;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.line-1, .line-2 {
    display: block;
    color: #f5f5f5;
    text-align: left;
    width: 100%;
}

.line-1 {
    margin-bottom: 0.5rem;
}

.line-2 {
    position: relative;
}

/* Common Link Styles */
.main-link, .past-work-link, .social-link {
    color: #f5f5f5;
    text-decoration: underline;
    text-decoration-color: rgba(245, 245, 245, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    font-size: 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
    text-transform: none;
    display: inline-block;
    transform-origin: center;
    cursor: pointer;
}

.main-link:hover, .past-work-link:hover, .social-link:hover {
    color: #f5f5f5;
    text-decoration-color: rgba(245, 245, 245, 0.8);
    text-decoration-thickness: 2px;
    transform: scale(1.02);
}

/* Content Grid */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: end;
}

.grid-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 600px;
}

.section {
    display: flex;
    flex-direction: column;
    min-height: 200px;
    position: relative;
    align-items: flex-start;
    justify-content: space-between;
    height: -webkit-fill-available;
    flex: 1;
    max-width: 280px;
}

/* Visit Tracker */
.visit-tracker {
    margin-bottom: 6rem;
    text-align: left;
}

#last-visit-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    color: #888888;
    letter-spacing: 0.01em;
    text-transform: none;
    text-decoration: none;
}

#last-visit-text:hover {
    color: #aaaaaa;
}

.learn-more-em {
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* Main Links */
.main-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.main-links-title, .past-work-title {
    font-size: 16px;
    color: rgba(245, 245, 245, 0.38);
    margin-bottom: 1rem;
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0.01em;
    font-family: 'IBM Plex Sans', sans-serif;
}

.past-work-title {
    margin-bottom: 2rem;
}

/* Past Work */
.past-work {
    text-align: left;
}

.past-work-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.past-work-link {
    letter-spacing: 0.3px;
    white-space: nowrap;
    width: fit-content;
}

.portfolio-link {
    color: #888888 !important;
    text-decoration: none !important;
}

.portfolio-link:hover {
    text-decoration: underline !important;
    text-decoration-color: rgba(136, 136, 136, 0.6) !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 4px !important;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 2rem;
    position: absolute;
    bottom: 0;
    left: 0;
    flex-wrap: nowrap;
    align-self: flex-start;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.social-icon {
    font-size: 1rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cat Animation */
.cat-container {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 1000;
    pointer-events: none;
    top: 10px;
    left: 0;
    opacity: 0;
    transform: translateX(100vw);
    border: none;
    outline: none;
}

.cat-sprite {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1);
    border: none;
    outline: none;
}

/* Responsive Portfolio Styles */
@media (max-width: 768px) {
    /* Homepage mobile styles */
    .container {
        padding: 12vh 1.5rem 8vh 1.5rem;
        justify-content: center;
        align-items: center;
    }

    .main-heading {
        width: 100%;
        font-size: clamp(2.5rem, 4.5vw, 4.5rem);
        margin-bottom: 2rem;
        white-space: normal;
        text-align: left;
        margin-left: 0;
        margin-right: auto;
    }

    .visit-tracker, .line-1, .line-2 {
        text-align: left;
    }

    .visit-tracker {
        margin-bottom: 2rem;
    }

    .content-grid {
        gap: 1.5rem;
        align-items: flex-start;
    }

    .grid-row {
        gap: 2.5rem;
        align-items: stretch;
    }

    .section {
        order: 1;
        min-height: unset;
    }

    .section:first-child {
        order: 1;
    }

    .section:last-child {
        order: 2;
    }

    .social-links {
        position: relative;
        bottom: unset;
        left: unset;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .cat-container {
        width: 40px;
        height: 40px;
    }
    
    /* Portfolio mobile styles */
    .portfolio-nav {
        padding: 0 1rem;
    }
    
    .nav-back {
        align-self: flex-start;
    }
    
    .nav-title {
        font-size: 18px;
    }
    
    .portfolio-header {
        padding: 80px 1rem 30px 1rem;
    }
    
    .portfolio-title {
        font-size: clamp(1.25rem, 8vw, 2rem);
    }
    
    .portfolio-subtitle {
        font-size: 12px;
    }
    
    .portfolio-filters {
        padding: 0 1rem 30px 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-options {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 11px;
    }
    
    .portfolio-main {
        padding: 0 1rem 40px 1rem;
    }
    
    .projects-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .project-card {
        width: 100%;
        padding: 0;
        margin: 0;
        /* Reset to vertical layout on mobile */
        display: block;
        gap: 0;
    }
    
    /* Reset grid layout for PhonePe and Google Pay on mobile */
    .project-card:nth-child(1),
    .project-card:nth-child(2) {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .project-card:nth-child(1),
    .project-card:nth-child(2),
    .project-card:nth-child(3),
    .project-card:nth-child(4),
    .project-card:nth-child(5),
    .project-card:nth-child(6),
    .project-card:nth-child(7),
    .project-card:nth-child(8) {
        grid-column: unset;
        grid-row: unset;
    }
    
    .project-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        object-fit: cover;
        flex: none; /* Reset flex properties on mobile */
        margin-bottom: 1rem; /* Restore margin for mobile */
    }
    
    .project-content {
        flex: none; /* Reset flex properties on mobile */
        padding-top: 0; /* Reset padding on mobile */
    }
    
    .project-title {
        font-size: 20px;
        margin-top: 1rem;
    }
    
    .project-description {
        font-size: 13px;
        margin-top: 0.5rem;
    }
    
    .load-more-container {
        padding: 0 1rem 40px 1rem;
    }
    
    .load-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Homepage mobile styles */
    .container {
        padding: 10vh 1.2rem 8vh 1.2rem;
        justify-content: center;
        align-items: center;
    }
    
    .main-heading {
        width: 100%;
        font-size: clamp(2.5rem, 4.5vw, 4.5rem);
        margin-bottom: 2rem;
        white-space: normal;
        text-align: left;
        margin-left: 0;
        margin-right: auto;
    }
    
    .visit-tracker, .line-1, .line-2 {
        text-align: left;
    }

    .visit-tracker {
        margin-bottom: 1.5rem;
    }

    .content-grid {
        gap: 1rem;
        align-items: flex-start;
    }

    .grid-row {
        gap: 2rem;
        align-items: stretch;
    }

    .section {
        min-height: unset;
        height: auto;
        justify-content: space-between;
    }

    .social-links {
        position: relative;
        bottom: unset;
        left: unset;
        gap: 1.2rem;
        margin-top: 1.2rem;
    }

    .cat-container {
        width: 40px;
        height: 40px;
    }
    
    /* Portfolio mobile styles */
    .portfolio-header {
        padding: 80px 1rem 30px 1rem;
    }
    
    .portfolio-title {
        font-size: clamp(1.25rem, 8vw, 2rem);
    }
    
    .portfolio-subtitle {
        font-size: 12px;
    }
    
    .portfolio-filters {
        padding: 0 1rem 30px 1rem;
    }
    
    .filter-title {
        font-size: 16px;
    }
    
    .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 10px;
    }
    
    .portfolio-main {
        padding: 0 1rem 30px 1rem;
    }
    
    .projects-grid {
        gap: 1rem;
    }
    
    .project-card {
        padding: 0;
        /* Reset to vertical layout on mobile */
        display: block;
        gap: 0;
    }
    
    /* Reset grid layout for PhonePe and Google Pay on mobile */
    .project-card:nth-child(1),
    .project-card:nth-child(2) {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .project-image {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
        object-fit: cover;
        flex: none; /* Reset flex properties on mobile */
        margin-bottom: 1rem; /* Restore margin for mobile */
    }
    
    .project-content {
        flex: none; /* Reset flex properties on mobile */
        padding-top: 0; /* Reset padding on mobile */
    }
    
    .project-title {
        font-size: 18px;
        margin-top: 0.75rem;
    }
    
    .project-description {
        font-size: 12px;
        margin-top: 0.5rem;
    }
    
    .project-tag {
        font-size: 10px;
        padding: 0.2rem 0.5rem;
    }
    
    .project-meta {
        font-size: 11px;
    }
    
    .load-more-btn {
        padding: 0.7rem 1.2rem;
        font-size: 12px;
    }
    
    .projects-divider {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
    }
    
    /* Reset grid layout for PhonePe and Google Pay on tablet */
    .project-card:nth-child(1),
    .project-card:nth-child(2) {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .portfolio-header {
        padding: 100px 2rem 50px 2rem;
    }
    
    .portfolio-filters {
        padding: 0 2rem 50px 2rem;
    }
    
    .portfolio-main {
        padding: 0 2rem 50px 2rem;
    }
}

@media (min-width: 1025px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Preserve original desktop aspect ratios */
    .project-card:nth-child(1) .project-image {
        height: 336px;
    }
    
    .project-card:nth-child(2) .project-image {
        height: 560px;
    }
    
    .project-card:nth-child(3) .project-image,
    .project-card:nth-child(4) .project-image,
    .project-card:nth-child(5) .project-image {
        height: 400px;
    }
    
    .project-card:nth-child(7) .project-image {
        height: 520px;
    }
    
    .project-card:nth-child(8) .project-image {
        height: 320px;
    }
}

/* Sheet Content */
.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 245, 245, 0.3) transparent;
}

.sheet-content::-webkit-scrollbar {
    width: 6px;
}

.sheet-content::-webkit-scrollbar-track {
    background: transparent;
}

.sheet-content::-webkit-scrollbar-thumb {
    background: rgba(245, 245, 245, 0.3);
    border-radius: 3px;
}

.sheet-content::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 245, 245, 0.5);
}

/* Content Styles */
.sheet-content h1 {
    font-family: 'OggText', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #f5f5f5;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.sheet-content h2 {
    font-family: 'OggText', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #f5f5f5;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.sheet-content h3 {
    font-family: 'OggText', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #f5f5f5;
    margin: 1.5rem 0 0.75rem 0;
    line-height: 1.4;
}

.sheet-content p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sheet-content ul, .sheet-content ol {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.8);
    line-height: 1.6;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.sheet-content li {
    margin-bottom: 0.5rem;
}

.sheet-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.sheet-content .project-image {
    width: 100%;
    height: 300px;
    background: rgba(245, 245, 245, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.5);
    text-transform: none;
    letter-spacing: 1px;
}

/* Loading State */
.sheet-content.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(245, 245, 245, 0.1);
    border-top: 3px solid #f5f5f5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Bottom Sheet */
@media (max-width: 768px) {
    .bottom-sheet {
        height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .sheet-content {
        padding: 1.5rem 1rem;
    }

    .sheet-content h1 {
        font-size: 2rem;
    }

    .sheet-content h2 {
        font-size: 1.5rem;
    }

    .sheet-content h3 {
        font-size: 1.2rem;
    }

    .bottom-sheet.expanded {
        height: 100vh;
    }

    .sheet-back-btn {
        font-size: 11px;
        padding: 0.3rem 0.5rem;
        gap: 0.3rem;
    }

    .back-icon {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .bottom-sheet {
        height: 100vh;
        border-radius: 0;
    }

    .sheet-content {
        padding: 1rem;
    }

    .sheet-content h1 {
        font-size: 1.8rem;
    }

    .sheet-content h2 {
        font-size: 1.3rem;
    }

    .sheet-content h3 {
        font-size: 1.1rem;
    }

    .sheet-back-btn {
        font-size: 10px;
        padding: 0.25rem 0.4rem;
        gap: 0.25rem;
    }

    .back-icon {
        font-size: 11px;
    }
}

/* Touch Gestures for Mobile */
@media (hover: none) and (pointer: coarse) {
    .bottom-sheet {
        touch-action: pan-y;
    }
    
    .sheet-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Bottom Sheet Styles */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet-overlay.expanded {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    background: #000;
    border-radius: 20px 20px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet.expanded {
    height: 100vh;
    border-radius: 0;
    transform: translateY(0) scale(1);
}

.bottom-sheet-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sheet-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: white;
}

.sheet-back-btn {
    background: none;
    border: none;
    color: #f5f5f5;
    font-size: 14px;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Sans', sans-serif;
    text-transform: none;
    letter-spacing: 0.5px;
    position: absolute;
    left: 20px;
}

.sheet-close-btn:hover {
    background-color: #333;
}

.sheet-back-btn:hover {
    background: rgba(245, 245, 245, 0.1);
    transform: translateX(-2px);
}

.sheet-title {
    font-family: 'OggText', serif;
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-align: center;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
    background: #000;
}

/* Pentagram-Inspired Project Page Styles */
.pentagram-project-page {
    background: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Project Header */
.project-header {
    padding: 4rem 2rem 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: none;
}

.project-title {
    font-family: 'OggText', serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.project-categories {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.project-category {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.1em;
    border-radius: 0;
    font-family: 'IBM Plex Sans', sans-serif;
    border: none;
}

/* Hero Section */
.project-hero {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #999;
    font-weight: 300;
}

/* Project Intro */
.project-intro {
    padding: 5rem 2rem 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.intro-text {
    font-family: 'OggText', serif;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-style: normal;
    font-weight: 300;
    margin: 0;
}

/* Image Gallery */
.project-gallery {
    padding: 0 2rem 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Masonry gallery */
.masonry-gallery .masonry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

.masonry-gallery .masonry-item:first-child {
    grid-column: 1 / -1;
}

.masonry-gallery .masonry-item {
    margin-bottom: 0;
}

.masonry-gallery .masonry-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #fff;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 9;
    min-height: 400px;
    box-sizing: border-box;
}

.masonry-gallery .masonry-image::before {
    content: attr(data-placeholder);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    color: #666;
    z-index: 1;
}

.masonry-gallery .masonry-image::after {
    content: attr(data-description);
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: #888;
    opacity: 0.85;
}

@media (max-width: 1024px) {
    .masonry-gallery .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .masonry-gallery .masonry-image {
        min-height: 250px;
    }
}

@media (max-width: 640px) {
    .masonry-gallery .masonry-grid {
        grid-template-columns: 1fr;
    }
    
    .masonry-gallery .masonry-item:first-child {
        grid-column: 1;
    }
    
    .masonry-gallery .masonry-image {
        min-height: 200px;
    }
}

/* ============================================================
   CASE STUDY — INTERLEAVED IMAGE LAYOUTS (Vanschneider-inspired)
   ============================================================ */

/* Related article card inside case studies */
.cs-related-article {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(245, 245, 245, 0.12);
    background: rgba(245, 245, 245, 0.03);
    text-decoration: none;
    color: #f5f5f5;
    margin: 0 5% 3rem;
    transition: border-color 0.25s ease, background 0.25s ease;
    position: relative;
}

.cs-related-article:hover {
    border-color: rgba(245, 245, 245, 0.3);
    background: rgba(245, 245, 245, 0.06);
}

.cs-related-article-badge {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f5f5f5;
    background: rgba(245, 245, 245, 0.12);
    border: 1px solid rgba(245, 245, 245, 0.2);
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.cs-related-article-body {
    flex: 1;
    min-width: 0;
}

.cs-related-article-label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11px;
    color: rgba(245, 245, 245, 0.4);
    margin: 0 0 6px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cs-related-article-title {
    font-family: 'OggText', serif;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    font-weight: 300;
    line-height: 1.3;
    margin: 0 0 8px;
    color: #f5f5f5;
}

.cs-related-article-excerpt {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(245, 245, 245, 0.55);
    margin: 0;
    font-weight: 300;
}

.cs-related-article-arrow {
    font-size: 1.2rem;
    color: rgba(245, 245, 245, 0.4);
    flex-shrink: 0;
    align-self: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cs-related-article:hover .cs-related-article-arrow {
    transform: translateX(4px);
    color: rgba(245, 245, 245, 0.8);
}

@media (max-width: 768px) {
    .cs-related-article {
        flex-direction: column;
        gap: 1rem;
        margin: 0 5% 2rem;
        padding: 1.2rem 1.4rem;
    }
    .cs-related-article-arrow { display: none; }
}

/* Full-width image section — breaks out of content column */
.case-image-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 40px;
    margin-bottom: 40px;
}

.case-image-full img {
    width: 100%;
    height: auto;
    display: block;
}

.case-image-full .image-placeholder {
    width: 100%;
    aspect-ratio: 21/9;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.15);
    text-transform: none;
    letter-spacing: 2px;
}

/* Side-by-side image pair */
.case-image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 40px 0;
}

.case-image-pair img {
    width: 100%;
    height: auto;
    display: block;
}

.case-image-pair .image-placeholder {
    aspect-ratio: 4/3;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: rgba(245, 245, 245, 0.15);
    text-transform: none;
    letter-spacing: 2px;
}

/* Wide pair breaking out to ~1200px */
.case-image-pair.wide {
    max-width: 1200px;
    margin-left: calc((100% - 1200px) / 2);
    margin-right: calc((100% - 1200px) / 2);
}

@media (max-width: 1400px) {
    .case-image-pair.wide {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 0 2rem;
        box-sizing: border-box;
    }
}

/* Single contained image within content column */
.case-image-single {
    margin: 40px 0;
}

.case-image-single img {
    width: 100%;
    height: auto;
    display: block;
}

.case-image-single .image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0d0d0d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: rgba(245, 245, 245, 0.15);
    text-transform: none;
    letter-spacing: 2px;
}

/* Section label divider */
.case-section-label {
    font-family: 'OggText', serif;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Image caption */
.case-image-caption {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: rgba(245, 245, 245, 0.35);
    margin-top: 0.75rem;
    letter-spacing: 0.5px;
}

@media (max-width: 640px) {
    .case-image-pair {
        grid-template-columns: 1fr;
    }

    .case-image-full,
    .case-image-pair,
    .case-image-single {
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .case-section-label {
        margin-top: 4rem;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #999;
    font-weight: 300;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .play-overlay {
    opacity: 1;
}

/* Main Content */
.project-content {
    padding: 0 2rem 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 5rem;
}

.content-title {
    font-family: 'OggText', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 300;
    font-style: normal;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.content-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 1.75rem;
}

.content-text:last-child {
    margin-bottom: 0;
}

/* Pull-out Quotes */
.pull-quote {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.3;
    color: #ffffff;
    font-weight: 400;
    font-style: italic;
    margin: 5rem 0;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-family: 'OggText', serif;
}

/* Visual Assets */
.visual-assets {
    padding: 0 2rem 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.asset-item {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.asset-icon {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

.asset-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.asset-description {
    font-size: 0.875rem;
    color: #cccccc;
    line-height: 1.5;
}

/* Next Project */
.next-project {
    padding: 6rem 2rem;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Stretch the View Project link over the entire section */
.next-project-link::after {
    content: '';
    position: absolute;
    inset: 0;
}

.next-project-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.next-project-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: none;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    font-weight: 400;
    font-family: 'IBM Plex Sans', sans-serif;
}

.next-project-title {
    font-family: 'OggText', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.next-project-link {
    display: inline-block;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    border-radius: 0;
    font-weight: 400;
    font-family: 'IBM Plex Sans', sans-serif;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
}

.next-project-link:hover {
    background: transparent;
    color: #ffffff;
    transform: none;
    text-decoration-thickness: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-header {
        padding: 2rem 1rem 1rem 1rem;
    }
    
    .project-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .project-categories {
        gap: 0.5rem;
    }
    
    .project-category {
        font-size: 12px;
        padding: 0.4rem 0.8rem;
    }
    
    .project-hero {
        height: 50vh;
        min-height: 400px;
        margin-bottom: 2rem;
    }
    
    .project-intro {
        padding: 0 1rem 2rem 1rem;
    }
    
    .intro-text {
        font-size: 1.125rem;
    }
    
    .project-gallery {
        padding: 0 1rem 2rem 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-content {
        padding: 0 1rem 2rem 1rem;
    }
    
    .content-title {
        font-size: 1.5rem;
    }
    
    .pull-quote {
        font-size: 1.25rem;
        margin: 2rem 0;
        padding: 1.5rem 0;
    }
    
    .visual-assets {
        padding: 0 1rem 2rem 1rem;
    }
    
    .assets-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .next-project {
        padding: 2rem 1rem;
    }
    
    .next-project-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .project-header {
        padding: 1.5rem 0.75rem 1rem 0.75rem;
    }
    
    .project-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .project-intro {
        padding: 0 0.75rem 1.5rem 0.75rem;
    }
    
    .project-gallery {
        padding: 0 0.75rem 1.5rem 0.75rem;
    }
    
    .project-content {
        padding: 0 0.75rem 1.5rem 0.75rem;
    }
    
    .visual-assets {
        padding: 0 0.75rem 1.5rem 0.75rem;
    }
    
    .next-project {
        padding: 1.5rem 0.75rem;
    }
}

/* Writing Page Responsive */
@media (max-width: 900px) {
    .writing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    .writing-card:nth-child(n) { grid-column: span 1; }
}

@media (max-width: 600px) {
    .writing-main {
        padding: 100px 0 60px;
        width: 92%;
    }
    .writing-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .writing-card:nth-child(n) { grid-column: span 1; }
}

/* About Page Responsive */
@media (max-width: 768px) {
    .about-main {
        padding: 120px 1.5rem 80px 1.5rem;
    }
    .about-content {
        flex-direction: column;
        gap: 2.5rem;
    }
    .about-left {
        max-width: 100%;
    }
    .about-image-col {
        width: 100%;
        flex-shrink: 1;
    }
    .about-image-placeholder,
    .about-photo-wrap {
        width: 100%;
        margin-left: 0;
        aspect-ratio: 3 / 4;
        max-height: 60vh;
    }
    .about-text {
        margin-bottom: 2rem;
    }
    .about-links {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-main {
        padding: 100px 1rem 60px 1rem;
    }
    .about-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Blog Post Page */
body:has(.blog-post-main) {
    background-color: #000000;
}

body:has(.blog-post-main) .pentagram-nav {
    background: #000;
    border-bottom: none;
}

body:has(.blog-post-main) .nav-logo {
    color: #f5f5f5;
}

body:has(.blog-post-main) .nav-link {
    color: rgba(245, 245, 245, 0.9);
}

body:has(.blog-post-main) .nav-link:hover {
    color: #f5f5f5;
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: rgba(245, 245, 245, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

body:has(.blog-post-main) .nav-link.active {
    color: #f5f5f5;
    font-style: italic;
    text-decoration: none;
}

body:has(.blog-post-main) .mountain-peak-bg {
    display: none;
}

.blog-post-main {
    padding: 160px 2rem 80px 2rem;
    max-width: 1080px;
    margin: 0 auto;
    color: #f5f5f5;
}

.blog-post {
    width: 100%;
}

.blog-post-header {
    margin-bottom: 3rem;
}

.blog-post-title {
    font-family: 'OggText', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    font-style: normal;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #f5f5f5;
    margin-bottom: 1rem;
}

.blog-post-meta {
    display: flex;
    gap: 1rem;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: rgba(245, 245, 245, 0.5);
    margin-bottom: 1.5rem;
}

.blog-post-date,
.blog-post-author {
    text-transform: none;
    letter-spacing: 0.5px;
}

.blog-post-divider {
    border: none;
    border-top: 1px solid rgba(245, 245, 245, 0.15);
    margin: 0;
}

.blog-post-content {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    font-style: normal;
    color: rgba(245, 245, 245, 0.82);
}

.blog-post-content p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    font-style: normal;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.82);
    letter-spacing: 0.01em;
    margin-bottom: 1.5rem;
}

.blog-post-content p:last-child {
    margin-bottom: 0;
}

.blog-post-intro {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(245, 245, 245, 0.9);
}

.blog-post-content h2 {
    font-family: 'OggText', serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 300;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #f5f5f5;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.blog-post-content h2:first-of-type {
    margin-top: 2rem;
}

.blog-post-content h3 {
    font-family: 'OggText', serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: #f5f5f5;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post-content strong {
    font-weight: 700;
    color: #f5f5f5;
}

.blog-post-content em {
    font-style: italic;
}

/* Blog Post Images */
.blog-post-content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem 0;
    border-radius: 4px;
}

.blog-post-content figure {
    margin: 3rem 0;
    padding: 0;
}

.blog-post-content figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    margin: 0;
}

.blog-post-content figcaption {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: rgba(245, 245, 245, 0.4);
    margin-top: 0.75rem;
    text-align: center;
    line-height: 1.5;
}

/* Full-width blog image that breaks out of the 800px column */
.blog-post-content .full-width-image {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 3rem;
    margin-bottom: 3rem;
    border-radius: 0;
}

.blog-post-content .full-width-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    margin: 0;
}

.blog-post-content .full-width-image figcaption {
    max-width: 800px;
    margin: 0.75rem auto 0 auto;
    padding: 0 2rem;
}

/* Homepage nav offset */
body:has(.main-heading) .container {
    padding-top: 60px;
}

/* Blog Post Responsive */
@media (max-width: 768px) {
    .blog-post-main {
        padding: 120px 1.5rem 60px 1.5rem;
    }
    
    .blog-post-header {
        margin-bottom: 2rem;
    }
    
    .blog-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-post-main {
        padding: 100px 1rem 40px 1rem;
    }
}


/* ============================================================
   CASE STUDY PAGE — DARK HERO & GALLERY FIXES
   Overrides the mismatched light-gray placeholders so they
   match the black .pentagram-project-page background
   ============================================================ */

/* Give the project header room for the fixed nav */
.pentagram-project-page .project-header {
    padding-top: 8rem;
}

/* Hero: dark background, project title as huge ghost type */
.pentagram-project-page .project-hero {
    background: #0a0a0a;
    height: 85vh;
    min-height: 600px;
}

.pentagram-project-page .hero-placeholder {
    background: #0d0d0d;
    color: rgba(245, 245, 245, 0.1);
    font-family: 'OggText', serif;
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 2rem 3rem 2rem;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Gallery: dark placeholders matching the dark page */
.pentagram-project-page .masonry-gallery .masonry-image {
    background: #111111;
    border: 1px solid rgba(245, 245, 245, 0.06);
    border-radius: 0;
}

.pentagram-project-page .masonry-gallery .masonry-image::before {
    color: rgba(245, 245, 245, 0.18);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: none;
}

.pentagram-project-page .masonry-gallery .masonry-image::after {
    color: rgba(245, 245, 245, 0.28);
}


/* ============================================================
   WORK CARD — Anchor tag reset so <a> cards look identical
   to the former <article> cards
   ============================================================ */

a.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

a.work-card:hover {
    text-decoration: none;
    color: inherit;
}

a.work-card:hover .project-card-title {
    opacity: 0.7;
}

.project-card-title {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #f5f5f5;
    font-family: 'OggText', serif;
    transition: opacity 0.2s ease;
}

/* Fallback text shown when project images are missing */
.project-image {
    position: relative;
}

.card-fallback-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: rgba(245, 245, 245, 0.2);
    letter-spacing: 3px;
    text-transform: none;
    pointer-events: none;
}

/* Hide fallback when real image loads successfully */
.project-image img:not([style*="display:none"]) + .card-fallback-text,
.project-image img:not([style*="display: none"]) + .card-fallback-text {
    opacity: 0;
}


/* ============================================================
   CASE STUDY — FULL VANSCHNEIDER REDESIGN
   Full-width, editorial, no column constraint
   ============================================================ */

/* ── Override main content wrapper ── */
.pentagram-project-page .project-content {
    max-width: 95%;
    width: 95%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Project Header — more dramatic ── */
.pentagram-project-page .project-header {
    padding: 9rem 5% 4rem 5%;
    max-width: 95%;
    width: 95%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0 auto;
    box-sizing: border-box;
}

.pentagram-project-page .project-title {
    font-size: clamp(2.8rem, 6.5vw, 6.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.pentagram-project-page .project-categories {
    gap: 2rem;
}

.pentagram-project-page .project-category {
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.35);
}

/* ── Hero — taller, punchier ── */
.pentagram-project-page .project-hero {
    height: 90vh;
    min-height: 640px;
    margin-bottom: 0;
    background: #000;
}

.pentagram-project-page .hero-placeholder {
    font-size: clamp(3rem, 8vw, 7rem);
    padding: 0 6vw 5rem;
    letter-spacing: -0.03em;
    color: rgba(245, 245, 245, 0.06);
    font-weight: 700;
}

/* ── Project Intro — wide, editorial ── */
.pentagram-project-page .project-intro {
    padding: 6rem 5%;
    max-width: 95%;
    width: 95%;
    margin: 0 auto;
    border-bottom: none;
    box-sizing: border-box;
}

.pentagram-project-page .intro-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
    max-width: 90%;
    font-weight: 300;
}

/* ── Content sections — full width with own padding ── */
.pentagram-project-page .content-section {
    padding: 5rem 5% 4rem;
    margin-bottom: 0;
    border-bottom: none;
}

.pentagram-project-page .content-title {
    font-size: 48px;
    font-weight: 400;
    font-style: normal;
    letter-spacing: -0.03em;
    margin-bottom: 3rem;
    line-height: 1.1;
    max-width: 900px;
    text-wrap: balance;
}

.pentagram-project-page .content-title em {
    font-style: italic;
    font-weight: 400;
}

.pentagram-project-page .content-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.65);
    max-width: 680px;
    margin-bottom: 1.5rem;
}

/* ══════════════════════════════════════════════════════════════
   EDITORIAL LAYOUTS
   Layout A (.cs-editorial-split): heading left ⅓, 2 cols right ⅔
   Layout B (.cs-editorial-cols): full heading top, 3 cols below
══════════════════════════════════════════════════════════════ */

.cs-editorial-split,
.cs-editorial-cols {
    padding: 5rem 5% 4rem;
    border-top: 1px solid rgba(245, 245, 245, 0.08);
}

/* Layout A */
.cs-editorial-split {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 0 6rem;
    align-items: start;
}

.cs-editorial-split-heading {
    font-family: 'OggText', serif;
    font-size: clamp(2.8rem, 4.8vw, 5.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #f5f5f5;
    padding-top: 0.05em;
    text-wrap: balance;
}

.cs-editorial-split-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3.5rem;
}

.cs-editorial-split-col p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(245, 245, 245, 0.65);
    font-style: normal;
    font-weight: 300;
    margin-bottom: 1.4rem;
}

.cs-editorial-split-col p:last-child { margin-bottom: 0; }

/* Layout B */
.cs-editorial-cols-heading {
    font-family: 'OggText', serif;
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #f5f5f5;
    margin-bottom: 4rem;
    text-wrap: balance;
}

.cs-editorial-cols-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 4rem;
}

.cs-editorial-col p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(245, 245, 245, 0.65);
    font-style: normal;
    font-weight: 300;
    margin-bottom: 1.4rem;
}

.cs-editorial-col p:last-child { margin-bottom: 0; }

/* Responsive */
@media (max-width: 900px) {
    .cs-editorial-split {
        grid-template-columns: 1fr;
        gap: 2.5rem 0;
    }
    .cs-editorial-split-body {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .cs-editorial-cols-body {
        grid-template-columns: 1fr 1fr;
        gap: 0 2.5rem;
    }
}

@media (max-width: 600px) {
    .cs-editorial-cols-body {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════
   EDITORIAL LAYOUT VARIATIONS 2
   .cs-pull-text  — full-width large statement paragraph + ornament
   .cs-right-stack — heading + text pushed to right 40%, left empty
   .cs-text-image  — text left ~35%, image right ~65%
══════════════════════════════════════════════════════════════ */

/* Variation 1: Large full-width editorial statement */
.cs-pull-text {
    padding: 5rem 5% 4rem;
    border-top: 1px solid rgba(245, 245, 245, 0.08);
}

.cs-pull-text-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    line-height: 1.55;
    color: rgba(245, 245, 245, 0.88);
    max-width: 880px;
    font-style: normal;
    letter-spacing: -0.01em;
}

.cs-pull-text-ornament {
    margin-top: 2.5rem;
    font-size: 28px;
    color: rgba(245, 245, 245, 0.18);
    letter-spacing: 0.1em;
    user-select: none;
}

/* Variation 2: Heading + text right-aligned, left empty */
.cs-right-stack {
    padding: 5rem 5% 4rem;
    border-top: 1px solid rgba(245, 245, 245, 0.08);
    display: flex;
    justify-content: flex-end;
}

.cs-right-stack-inner {
    width: 42%;
}

.cs-right-stack-heading {
    font-family: 'OggText', serif;
    font-size: clamp(2.8rem, 4.8vw, 5.5rem);
    font-weight: 400;
    font-style: normal;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #f5f5f5;
    margin-bottom: 2.5rem;
    text-wrap: balance;
}

.cs-right-stack-heading em {
    font-style: italic;
}

.cs-right-stack-inner p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(245, 245, 245, 0.65);
    margin-bottom: 1.4rem;
}

.cs-right-stack-inner p:last-child { margin-bottom: 0; }

/* Variation 3: Text left, image right (no padding on right) */
.cs-text-image {
    border-top: 1px solid rgba(245, 245, 245, 0.08);
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    align-items: stretch;
    min-height: 520px;
}

.cs-text-image-content {
    padding: 5rem 4rem 4rem 5%;
}

.cs-text-image-content p {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(245, 245, 245, 0.65);
    margin-bottom: 1.4rem;
}

.cs-text-image-content p:last-child { margin-bottom: 0; }

.cs-text-image-media {
    background: #111;
    overflow: hidden;
}

.cs-text-image-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cs-text-image-media .image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(245, 245, 245, 0.2);
    letter-spacing: 0.1em;
    background: #111;
}

/* Responsive */
@media (max-width: 900px) {
    .cs-right-stack-inner { width: 65%; }
    .cs-text-image { grid-template-columns: 1fr; }
    .cs-text-image-content { padding: 5rem 6vw; }
    .cs-text-image-media .image-placeholder { min-height: 300px; }
}

@media (max-width: 600px) {
    .cs-right-stack { justify-content: flex-start; }
    .cs-right-stack-inner { width: 100%; }
}

/* ── Pull quote — huge, full span ── */
.pentagram-project-page .pull-quote {
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    line-height: 1.2;
    color: #ffffff;
    font-weight: 400;
    font-style: normal;
    margin: 0;
    padding: 6rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
    max-width: none;
    letter-spacing: -0.02em;
    font-family: 'OggText', serif;
    display: block;
}

.pentagram-project-page .pull-quote::before {
    content: '"';
    display: block;
    font-size: 0.4em;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0;
    margin-bottom: 1.5rem;
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: normal;
}

/* ── Full-width image — edge to edge within content column ── */
.pentagram-project-page .case-image-full {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    overflow: hidden;
}

/* ── Light / Dark mode comparison slider ── */
.mode-compare {
    width: 100%;
    margin: 0;
    user-select: none;
}

.mode-compare-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: col-resize;
    display: block;
    line-height: 0;
}

.mode-compare-before,
.mode-compare-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mode-compare-before {
    z-index: 1;
}

.mode-compare-after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
}

.mode-compare-before img,
.mode-compare-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Anchor image to set container height */
.mode-compare-anchor {
    width: 100%;
    display: block;
    visibility: hidden;
}

.mode-compare-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: 2px;
    z-index: 10;
    pointer-events: none;
}

.mode-compare-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
}

.mode-compare-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-compare-label {
    position: absolute;
    top: 1.5rem;
    z-index: 20;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.mode-compare-label--left  { left: 1.5rem; }
.mode-compare-label--right { right: 1.5rem; }

/* ── End comparison slider ── */

.pentagram-project-page .case-image-full img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

.pentagram-project-page .case-image-full .image-placeholder {
    aspect-ratio: 16 / 7;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    letter-spacing: 4px;
    color: rgba(245, 245, 245, 0.1);
}

/* ── Side-by-side image pair — edge to edge ── */
.pentagram-project-page .case-image-pair {
    width: 100%;
    margin: 40px 0;
    gap: 2px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.pentagram-project-page .case-image-pair .image-placeholder {
    aspect-ratio: 3 / 2;
    background: #0a0a0a;
    font-size: 11px;
    letter-spacing: 4px;
    color: rgba(245, 245, 245, 0.1);
}

/* ── Single image — full width ── */
.pentagram-project-page .case-image-single {
    width: 100%;
    margin: 40px 0;
}

.pentagram-project-page .case-image-single .image-placeholder {
    aspect-ratio: 21 / 9;
    background: #0a0a0a;
    font-size: 11px;
    letter-spacing: 4px;
    color: rgba(245, 245, 245, 0.1);
}

/* ── Next project — oversized and dramatic ── */
.pentagram-project-page .next-project {
    padding: 8rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pentagram-project-page .next-project-container {
    max-width: none;
    text-align: left;
}

.pentagram-project-page .next-project-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    display: block;
}

.pentagram-project-page .next-project-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 3rem;
    display: block;
    transition: opacity 0.3s ease;
}

.pentagram-project-page .next-project-title:hover {
    opacity: 0.6;
}

.pentagram-project-page .next-project-link {
    font-size: 11px;
    letter-spacing: 0.15em;
}


/* ============================================================
   SCROLL REVEAL ANIMATIONS — Vanschneider-style
   ============================================================ */

/* Base hidden state */
.cs-reveal {
    opacity: 0;
    transform: translateY(48px);
    transition:
        opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Blur variant (used on images, hero, intro) */
.cs-reveal-blur {
    opacity: 0;
    filter: blur(16px);
    transform: translateY(20px);
    transition:
        opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scale-in for image blocks */
.cs-reveal-scale {
    opacity: 0;
    transform: scale(0.97);
    transition:
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visible state — triggered by JS */
.cs-reveal.is-visible,
.cs-reveal-blur.is-visible,
.cs-reveal-scale.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Staggered delays for grid children */
.cs-reveal[data-delay="1"] { transition-delay: 0.12s; }
.cs-reveal[data-delay="2"] { transition-delay: 0.24s; }
.cs-reveal[data-delay="3"] { transition-delay: 0.36s; }
.cs-reveal[data-delay="4"] { transition-delay: 0.48s; }

.cs-reveal-blur[data-delay="1"] { transition-delay: 0.15s; }
.cs-reveal-blur[data-delay="2"] { transition-delay: 0.3s; }

.cs-reveal-scale[data-delay="1"] { transition-delay: 0.1s; }
.cs-reveal-scale[data-delay="2"] { transition-delay: 0.2s; }


/* ============================================================
   RESPONSIVE — Case study pages (mobile)
   ============================================================ */

@media (max-width: 768px) {
    .pentagram-project-page .project-title {
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .pentagram-project-page .intro-text {
        font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    }

    .pentagram-project-page .content-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .pentagram-project-page .pull-quote {
        font-size: clamp(1.5rem, 5.5vw, 2.5rem);
        padding: 4rem 1.5rem;
    }

    .pentagram-project-page .case-image-pair {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .pentagram-project-page .next-project {
        padding: 5rem 1.5rem;
    }

    .pentagram-project-page .next-project-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}

@media (max-width: 480px) {
    .pentagram-project-page .project-header {
        padding: 6rem 1.25rem 2rem;
    }

    .pentagram-project-page .content-section {
        padding: 3rem 1.25rem;
    }

    .pentagram-project-page .project-intro {
        padding: 3rem 1.25rem;
    }

    .pentagram-project-page .pull-quote {
        padding: 3rem 1.25rem;
    }

    .pentagram-project-page .next-project {
        padding: 4rem 1.25rem;
    }
}



/* ============================================================
   WORK PAGE — notreal.tv exact masonry layout
   5-col grid, staggered heights, vertical cards, black bg
   ============================================================ */

.portfolio-page {
    background: #0a0a0a;
    color: #f5f5f5;
    cursor: none;
}

.portfolio-page .custom-cursor {
    background: rgba(245, 245, 245, 0.9);
    border-color: rgba(245, 245, 245, 0.9);
    box-shadow: 0 0 10px rgba(245, 245, 245, 0.2);
}

/* ── Nav: dark ── */
.portfolio-page .pentagram-nav {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
}

.portfolio-page .nav-logo,
.portfolio-page .nav-link { color: #f5f5f5; }

.portfolio-page .nav-logo {
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.portfolio-page .nav-link {
    color: rgba(245, 245, 245, 0.65);
    font-style: normal;
    text-decoration: none;
}

.portfolio-page .nav-link:hover {
    color: #f5f5f5;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.portfolio-page .nav-link.active {
    color: #f5f5f5;
    font-family: 'OggText', serif;
    font-style: italic;
    text-decoration: none;
}

/* ── Fixed sidebars — hidden ── */
.work-sidebar { display: none; }

/* ── Portfolio page header ── */
.portfolio-page-header {
    padding-top: 120px !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* ── Projects section ── */
.portfolio-page .projects-section {
    padding: 0 0 8rem;
    width: 95%;
    margin: 0 auto;
}

/* ── Vertical stacked layout ── */
.portfolio-page .projects-grid {
    display: flex !important;
    flex-direction: column;
    gap: 40px;
    background: transparent;
    width: 100%;
}

/* ── All work cards: vertical flex (image on top, text below) ── */
.portfolio-page a.work-card,
.portfolio-page .projects-grid > a.work-card {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none;
    color: #f5f5f5;
    background: #0a0a0a;
    transition: none;
}

/* ─────────────────────────────────────────────────────────────
   Repeating 4-item pattern:
   4n+1 → 60% width · left  · rectangular (16:9)
   4n+2 → 30% width · right · rectangular (16:9)
   4n+3 → 50% width · left  · square (1:1)
   4n+4 → 50% width · right · square (1:1)
───────────────────────────────────────────────────────────── */

.portfolio-page .projects-grid > a.work-card:nth-child(4n+1) {
    width: 60%;
    align-self: flex-start;
}
.portfolio-page .projects-grid > a.work-card:nth-child(4n+1) .card-media {
    aspect-ratio: 16 / 9;
}

.portfolio-page .projects-grid > a.work-card:nth-child(4n+2) {
    width: 40%;
    align-self: flex-end;
}
.portfolio-page .projects-grid > a.work-card:nth-child(4n+2) .card-media {
    aspect-ratio: 16 / 9;
}

.portfolio-page .projects-grid > a.work-card:nth-child(4n+3) {
    width: 50%;
    align-self: flex-start;
}
.portfolio-page .projects-grid > a.work-card:nth-child(4n+3) .card-media {
    aspect-ratio: 1 / 1;
}

.portfolio-page .projects-grid > a.work-card:nth-child(4n+4) {
    width: 50%;
    align-self: flex-end;
}
.portfolio-page .projects-grid > a.work-card:nth-child(4n+4) .card-media {
    aspect-ratio: 1 / 1;
}

/* ── Per-card size overrides ── */
/* Google Pay (child 2): bigger */
.portfolio-page .projects-grid > a.work-card:nth-child(2) {
    width: 58%;
}
/* Eureka Forbes (child 3): smaller */
.portfolio-page .projects-grid > a.work-card:nth-child(3) {
    width: 35%;
}

/* ── Card media (image container) ── */
.card-media {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

/* ── Card color block (brand-color fallback) ── */
.card-color-block {
    position: absolute;
    inset: 0;
    transition: filter 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 0;
    transition: filter 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

/* ── Hover: blur + scale on image ── */
.portfolio-page a.work-card:hover .card-media img,
.portfolio-page a.work-card:hover .card-color-block {
    filter: blur(14px);
    transform: scale(1.06);
}

/* ── Hover overlay ── */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    z-index: 2;
    transition: opacity 0.45s ease;
}

.portfolio-page a.work-card:hover .card-hover-overlay {
    opacity: 1;
}

.card-hover-text {
    font-family: 'OggText', serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.6rem);
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

/* ── Card info: below image, left-aligned text ── */
.card-info {
    padding: 12px 16px 18px;
    background: #0a0a0a;
    border-top: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* notreal.tv title style */
.card-title {
    font-family: 'OggText', serif;
    font-size: 24px;
    font-weight: 300;
    font-style: normal;
    color: #f5f5f5;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: text-decoration 0.2s ease;
}

.portfolio-page a.work-card:hover .card-title {
    text-decoration: underline;
    text-decoration-color: rgba(245, 245, 245, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.card-title em {
    font-style: italic;
    color: #f5f5f5;
}

.card-tags {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    color: rgba(245, 245, 245, 0.38);
    text-transform: none;
    letter-spacing: 0.01em;
    margin: 0;
}

/* Tags inside case study header — mirrors card-tags */
.project-header-tags {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: rgba(245, 245, 245, 0.38);
    letter-spacing: 0.01em;
    margin: 0 0 2.5rem 0;
    display: block;
}

/* ── Hide old project-card elements ── */
.portfolio-page .project-card-title { display: none; }
.portfolio-page .project-subtitle    { display: none; }
.portfolio-page .project-meta        { display: none; }
.portfolio-page .project-image       { display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .portfolio-page .projects-grid { gap: 48px; }
    .portfolio-page .projects-grid > a.work-card:nth-child(n) {
        width: 70% !important;
        align-self: flex-start !important;
    }
    .portfolio-page .projects-grid > a.work-card:nth-child(even) {
        align-self: flex-end !important;
    }
    .portfolio-page .projects-grid > a.work-card .card-media { aspect-ratio: 16/9; }
    .work-sidebar { display: none; }
}

@media (max-width: 560px) {
    .portfolio-page .projects-section { padding: 60px 0 4rem; }
    .portfolio-page .projects-grid { gap: 32px; }
    .portfolio-page .projects-grid > a.work-card:nth-child(n) {
        width: 100% !important;
        align-self: stretch !important;
    }
}

/* ── Writing Article: hero placeholder + next article ── */
.article-hero-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    display: block;
    margin: 2rem 0 3rem;
}

.article-hero-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    margin: 2rem 0 3rem;
}

.article-next-divider {
    width: 100%;
    height: 1px;
    background: rgba(245, 245, 245, 0.1);
    margin: 8rem 0 3rem;
}

.article-next {
    padding-bottom: 4rem;
}

.article-next-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: rgba(245, 245, 245, 0.35);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.article-next-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    color: rgba(245, 245, 245, 0.55);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(245, 245, 245, 0.25);
    line-height: 1.4;
    letter-spacing: 0.04em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-next-title:hover {
    color: rgba(245, 245, 245, 0.9);
    text-decoration-color: rgba(245, 245, 245, 0.55);
}

/* ── About responsive ── */
@media (max-width: 900px) {
    .about-content {
        flex-direction: column;
        gap: 3rem;
    }
    .about-image-col {
        width: 100%;
        max-width: 320px;
    }
    .about-left {
        max-width: 100%;
    }
}

/* ─────────────────────────────────────────────
   MOBILE HAMBURGER MENU
   ───────────────────────────────────────────── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: none;
    padding: 4px;
    z-index: 10001;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 1px;
    background: rgba(245, 245, 245, 0.85);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    z-index: 10000;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 8vw;
    gap: 0;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.open {
    display: flex;
    opacity: 1;
}

.mobile-nav-overlay .mobile-nav-link {
    font-family: 'OggText', serif;
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 300;
    font-style: normal;
    color: rgba(245, 245, 245, 0.85);
    text-decoration: none;
    line-height: 1.2;
    padding: 0.2em 0;
    border-bottom: 1px solid rgba(245, 245, 245, 0.08);
    width: 100%;
    display: block;
    transition: color 0.2s ease;
}

.mobile-nav-overlay .mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-overlay .mobile-nav-link.active {
    font-style: italic;
    color: #f5f5f5;
}

.mobile-nav-overlay .mobile-nav-link:hover {
    color: #f5f5f5;
}

/* Close button inside the mobile overlay */
.mobile-nav-close {
    display: none;
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10002;
    color: #f5f5f5;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close svg {
    width: 22px;
    height: 22px;
    stroke: #f5f5f5;
    stroke-width: 1.5;
}

.mobile-nav-overlay.open .mobile-nav-close {
    display: flex;
}

@media (max-width: 768px) {
    .nav-links {
        display: none !important;
    }
    /* Ensure nav stays horizontal: logo left, nav-actions right */
    .nav-container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0 !important;
        width: 95% !important;
        padding: 0 !important;
    }
}

/* ============================================================
   COMPREHENSIVE MOBILE OPTIMISATION — all pages
   ============================================================ */

/* ── Work page mobile ── */
@media (max-width: 768px) {
    .portfolio-page .projects-section {
        width: 92%;
        padding: 0 0 4rem;
    }
    .portfolio-page .projects-grid {
        gap: 24px;
    }
    /* On tablet: wider cards */
    .portfolio-page .projects-grid > a.work-card:nth-child(4n+1),
    .portfolio-page .projects-grid > a.work-card:nth-child(4n+3) {
        width: 80% !important;
        align-self: flex-start !important;
    }
    .portfolio-page .projects-grid > a.work-card:nth-child(4n+2),
    .portfolio-page .projects-grid > a.work-card:nth-child(4n+4) {
        width: 65% !important;
        align-self: flex-end !important;
    }
    .card-title { font-size: 18px; }
}

@media (max-width: 480px) {
    .portfolio-page .projects-section {
        width: 100%;
        padding: 0 0 3rem;
    }
    .portfolio-page .projects-grid {
        gap: 16px;
    }
    /* Full width single column on phone */
    .portfolio-page .projects-grid > a.work-card:nth-child(n) {
        width: 100% !important;
        align-self: stretch !important;
    }
    .card-title { font-size: 16px; }
    .card-tags { font-size: 14px; }
}

/* ── About page mobile ── */
@media (max-width: 768px) {
    .about-main { width: 92%; }
    .about-content {
        flex-direction: column;
        gap: 2.5rem;
    }
    .about-left { max-width: 100%; }
    .about-image-col {
        width: 100%;
        max-width: 100%;
    }
    .about-image-placeholder {
        width: 100%;
        margin-left: 0;
        aspect-ratio: 4 / 3;
    }
    .about-title {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }
}

/* ── Writing page mobile ── */
@media (max-width: 768px) {
    .writing-main {
        padding: 90px 0 60px;
        width: 92%;
    }
    .writing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .writing-title {
        font-size: clamp(1.8rem, 7vw, 2.4rem);
    }
}

@media (max-width: 480px) {
    .writing-main {
        padding: 80px 0 40px;
        width: 92%;
    }
    .writing-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .writing-card {
        border-bottom-width: 0;
    }
    .writing-card:last-child {
        border-bottom: 1px solid rgba(245, 245, 245, 0.08);
    }
}

/* ── Case study pages mobile ── */
/* ── Case study pages — mobile (768px and below) ── */
@media (max-width: 768px) {

    /* Core containers: 90% width, centred */
    .pentagram-project-page .project-header,
    .pentagram-project-page .project-intro,
    .pentagram-project-page .project-content {
        width: 90%;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    /* Header padding */
    .pentagram-project-page .project-header {
        padding: 6rem 0 2rem;
    }

    /* Title size */
    .pentagram-project-page .project-title {
        font-size: clamp(2.4rem, 10vw, 4rem);
        line-height: 1.08;
    }

    /* Intro text */
    .pentagram-project-page .project-intro {
        padding: 3rem 0;
    }
    .pentagram-project-page .intro-text {
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    /* All text sections: flush padding inside the 90% container */
    .pentagram-project-page .content-section {
        padding: 3.5rem 0 2.5rem;
    }
    .pentagram-project-page .content-title {
        font-size: clamp(1.6rem, 6.5vw, 2.4rem);
    }

    /* Editorial split: stack vertically */
    .cs-editorial-split {
        grid-template-columns: 1fr;
        gap: 1.5rem 0;
        padding: 3.5rem 0 2.5rem;
    }
    .cs-editorial-split-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Editorial cols: 2-col on tablet, 1-col on phone */
    .cs-editorial-cols {
        padding: 3.5rem 0 2.5rem;
    }
    .cs-editorial-cols-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Pull text */
    .cs-pull-text {
        padding: 3.5rem 0 2.5rem;
    }
    .cs-pull-text-body {
        font-size: clamp(1.15rem, 4.5vw, 1.6rem);
    }

    /* Right stack: left-align on mobile, full width */
    .cs-right-stack {
        justify-content: flex-start;
        padding: 3.5rem 0 2.5rem;
    }
    .cs-right-stack-inner {
        width: 100%;
    }

    /* Text + image: stack vertically */
    .cs-text-image {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .cs-text-image-content {
        padding: 3.5rem 0 2rem;
    }
    .cs-text-image-media {
        width: 100%;
    }
    .cs-text-image-media .image-placeholder {
        aspect-ratio: 16 / 9;
        min-height: unset;
    }

    /* Images — full bleed (100vw) still works fine; pair stacks */
    .case-image-full {
        margin-top: 24px;
        margin-bottom: 24px;
    }
    .case-image-full .image-placeholder {
        aspect-ratio: 16 / 9;
    }

    .case-image-pair {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 24px 0;
    }
    .case-image-pair .image-placeholder {
        aspect-ratio: 4 / 3;
    }

    .case-image-single {
        margin: 24px 0;
    }
    .case-image-single .image-placeholder {
        aspect-ratio: 16 / 9;
    }

    /* Next project */
    .pentagram-project-page .next-project {
        padding: 5rem 5%;
    }
    .pentagram-project-page .next-project-title {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }
}

/* ── Homepage mobile ── */
@media (max-width: 768px) {
    body:has(.main-heading) .container {
        padding-top: 70px;
    }
}

/* ── Photos page ─────────────────────────────── */
.photos-header {
    padding: 120px 0 48px;
    width: 95%;
    max-width: none;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.shuffle-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(245,245,245,0.5);
    background: rgba(245,245,245,0.05);
    border: 1px solid rgba(245,245,245,0.1);
    border-radius: 4px;
    padding: 9px 15px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 6px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.shuffle-btn:hover {
    color: rgba(245,245,245,0.9);
    background: rgba(245,245,245,0.09);
    border-color: rgba(245,245,245,0.22);
}

.shuffle-btn svg {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
}

.shuffle-btn.shuffling svg {
    transform: rotate(180deg);
}

html[data-theme="light"] .shuffle-btn {
    color: rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .shuffle-btn:hover {
    color: rgba(0,0,0,0.85);
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.2);
}

.photos-title {
    font-family: 'OggText', serif;
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    font-weight: 400;
    font-style: normal;
    color: var(--fg);
    line-height: 1;
    margin: 0 0 14px;
    letter-spacing: -0.03em;
}

.photos-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: var(--fg-45);
    margin: 0;
    letter-spacing: 0.02em;
}

.photos-main {
    padding: 0 0 8rem;
    width: 95%;
    max-width: none;
    margin: 0 auto;
}

.photos-grid {
    columns: 3;
    column-gap: 10px;
}

.photo-item {
    break-inside: avoid;
    margin-bottom: 10px;
    cursor: pointer;
}

.photo-item:hover .photo-img-wrap {
    opacity: 0.82;
}

.photo-img-wrap {
    width: 100%;
    overflow: hidden;
    background: #111;
    transition: opacity 0.3s ease;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
}

.photo-aspect-portrait  { aspect-ratio: 4 / 5; }
.photo-aspect-landscape { aspect-ratio: 3 / 2; }
.photo-aspect-square    { aspect-ratio: 1 / 1; }
.photo-aspect-tall      { aspect-ratio: 2 / 3; }

.photo-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-meta {
    padding: 10px 0 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.photo-meta-title {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(245,245,245,0.85);
    line-height: 1.3;
}

.photo-meta-detail {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(245,245,245,0.35);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .photos-grid { columns: 2; }
    .photos-header { padding-top: 90px; }
    .photos-title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
}

@media (max-width: 540px) {
    .photos-grid { columns: 1; column-gap: 0; }
    .photo-item { margin-bottom: 8px; }
    .photos-header { padding: 90px 5vw 32px; }
    .photos-main { padding: 0 5vw 5rem; }
    .photo-meta-title { font-size: 11px; }
    .photo-meta-detail { font-size: 10px; }
}

/* ── Light mode overrides ── */
html[data-theme="light"] body {
  background: var(--bg);
  color: var(--fg);
}

/* Global nav background — covers all pages */
html[data-theme="light"] .pentagram-nav {
  background: var(--bg);
  border-bottom-color: var(--fg-08);
}

html[data-theme="light"] .nav-logo,
html[data-theme="light"] body:has(.about-main) .nav-logo,
html[data-theme="light"] body:has(.writing-main) .nav-logo {
  color: var(--fg);
}

html[data-theme="light"] .nav-link,
html[data-theme="light"] body:has(.about-main) .nav-link,
html[data-theme="light"] body:has(.writing-main) .nav-link {
  color: var(--fg-65);
}

html[data-theme="light"] .nav-link:hover {
  color: var(--fg);
}

html[data-theme="light"] .nav-link.active,
html[data-theme="light"] body:has(.about-main) .nav-link.active,
html[data-theme="light"] body:has(.writing-main) .nav-link.active {
  color: var(--fg);
}

html[data-theme="light"] .mobile-nav-overlay {
  background: var(--overlay);
}

html[data-theme="light"] .mobile-nav-link {
  color: var(--fg);
  border-bottom-color: var(--fg-08);
}

html[data-theme="light"] .hamburger-btn span {
  background: var(--fg);
}

html[data-theme="light"] .mobile-nav-close svg {
  stroke: var(--fg);
}

/* About page */
html[data-theme="light"] body:has(.about-main) { background: var(--bg); }
html[data-theme="light"] .about-main {
  color: var(--fg);
}
html[data-theme="light"] .about-title { color: var(--fg); }
html[data-theme="light"] .about-text p { color: var(--fg-80); }
html[data-theme="light"] .about-link { color: var(--fg-65); }
html[data-theme="light"] .about-link:hover { color: var(--fg); }
html[data-theme="light"] .about-subtitle { color: var(--fg-55); }

/* Writing page */
html[data-theme="light"] body:has(.writing-main) { background: var(--bg); }
html[data-theme="light"] .writing-main { color: var(--fg); }
html[data-theme="light"] .writing-title { color: var(--fg); }
html[data-theme="light"] .writing-subtitle { color: var(--fg-55); }
html[data-theme="light"] .writing-card {
  background: transparent;
  border-top-color: rgba(0,0,0,0.12);
  border-bottom-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .writing-card:hover {
  background: transparent;
  border-top-color: rgba(0,0,0,0.32);
  border-bottom-color: rgba(0,0,0,0.18);
}
html[data-theme="light"] .writing-card:hover .post-title { color: var(--fg); }
html[data-theme="light"] a.writing-card:hover .post-title { color: var(--fg); }
html[data-theme="light"] .post-title { color: var(--fg); }
html[data-theme="light"] .post-excerpt { color: var(--fg-65); }
html[data-theme="light"] .post-date { color: var(--fg-45); }
html[data-theme="light"] .post-tag {
  background: var(--fg-08);
  color: var(--fg-65);
}
html[data-theme="light"] .currently-writing-label { color: var(--fg-45); }

/* Photos page */
html[data-theme="light"] .photos-title { color: var(--fg); }
html[data-theme="light"] .photos-subtitle { color: var(--fg-45); }
html[data-theme="light"] .photo-meta-title { color: var(--fg-80); }
html[data-theme="light"] .photo-meta-detail { color: var(--fg-35); }
html[data-theme="light"] .photo-img-wrap { background: var(--bg-card); }
html[data-theme="light"] .photo-placeholder { background: var(--bg-deep); }

/* Portfolio/work page */
/* portfolio page base */
html[data-theme="light"] .portfolio-page { background: var(--bg); color: var(--fg); }
html[data-theme="light"] .portfolio-page .nav-link { color: var(--fg-65); }
html[data-theme="light"] .portfolio-page .nav-link:hover,
html[data-theme="light"] .portfolio-page .nav-link.active { color: var(--fg); }
html[data-theme="light"] .project-card-title { color: var(--fg); }
html[data-theme="light"] .projects-section { background: var(--bg); }
html[data-theme="light"] .card-info { background: var(--bg) !important; }
html[data-theme="light"] .card-title { color: var(--fg) !important; }
html[data-theme="light"] .card-title em { color: var(--fg) !important; }
html[data-theme="light"] .card-tags { color: var(--fg-55) !important; }
html[data-theme="light"] .card-media { background: var(--bg-card); }
html[data-theme="light"] .portfolio-page a.work-card:hover .card-title {
  text-decoration-color: rgba(0,0,0,0.60);
}
html[data-theme="light"] .load-more-btn {
  color: var(--fg);
  border-color: var(--fg-20);
}
html[data-theme="light"] .load-more-btn:hover { background: var(--fg-08); }

/* Index / homepage */
html[data-theme="light"] .main-heading,
html[data-theme="light"] .line-1,
html[data-theme="light"] .line-2 { color: var(--fg); }
html[data-theme="light"] .main-link,
html[data-theme="light"] .past-work-link { color: var(--fg); }
html[data-theme="light"] .main-links-title,
html[data-theme="light"] .past-work-title { color: var(--fg-45); }
html[data-theme="light"] .social-link { color: var(--fg-65); }
html[data-theme="light"] .timer-text,
html[data-theme="light"] .time-spent { color: var(--fg-45); }
html[data-theme="light"] .mountain-peak-bg { opacity: 0.04; filter: invert(1); }
html[data-theme="light"] .divider-line { background: var(--fg-12); }

/* PhonePe / case study pages */
html[data-theme="light"] .pentagram-project-page { background: var(--bg); }
html[data-theme="light"] .pentagram-project-page .project-header { background: var(--bg); }
html[data-theme="light"] .pentagram-project-page .project-title { color: var(--fg); }
html[data-theme="light"] .pentagram-project-page .project-header-tags { color: var(--fg-55); }
html[data-theme="light"] .pentagram-project-page .project-hero { background: var(--bg-2); }
html[data-theme="light"] .pentagram-project-page .project-content { background: var(--bg); }
html[data-theme="light"] .pentagram-project-page .content-title { color: var(--fg); }
html[data-theme="light"] .pentagram-project-page .content-text { color: var(--fg-65); }
html[data-theme="light"] .pentagram-project-page .intro-text { color: var(--fg-80); }
html[data-theme="light"] .cs-editorial-split-heading,
html[data-theme="light"] .cs-right-stack-heading,
html[data-theme="light"] .cs-editorial-cols-heading { color: var(--fg); }
html[data-theme="light"] .cs-editorial-split-col p,
html[data-theme="light"] .cs-right-stack-inner p,
html[data-theme="light"] .cs-editorial-col p { color: var(--fg-65); }
html[data-theme="light"] .cs-text-image { border-top-color: var(--fg-08); }
html[data-theme="light"] .cs-text-image-content p { color: var(--fg-65); }
html[data-theme="light"] .cs-text-image-media { background: var(--bg-2); }
html[data-theme="light"] .case-image-full img,
html[data-theme="light"] .case-image-pair img,
html[data-theme="light"] .case-image-single img { opacity: 0.95; }
html[data-theme="light"] .image-placeholder { background: var(--bg-2); }
html[data-theme="light"] .next-project { background: var(--bg-2); border-top-color: var(--fg-08); }
html[data-theme="light"] .next-project-label { color: var(--fg-45); }
html[data-theme="light"] .next-project-title { color: var(--fg); }
html[data-theme="light"] .next-project-link { color: var(--fg); border-color: var(--fg-20); }

/* Hide cursor on touch devices */
@media (hover: none) {
    .custom-cursor { display: none !important; }
}

/* Custom cursor */
html[data-theme="light"] .custom-cursor {
  background: rgba(0,0,0,0.88);
  box-shadow: 0 0 12px rgba(0,0,0,0.18);
}

/* ── Theme toggle — circular ripple reveal ── */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* ── Page Fade Transition ── */
html.page-loading body { opacity: 0 !important; }
body { transition: opacity 0.38s ease; opacity: 1; }

/* ── Nav actions wrapper (mobile toggle + hamburger) ── */
.nav-actions {
  display: none;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Theme Toggle — Pill Switch ── */
.theme-toggle {
  background: none;
  border: none;
  cursor: none;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Desktop toggle — fixed to viewport (nav is also fixed, so left:50% = true centre) */
.nav-links .theme-toggle {
    position: fixed;
    left: 50%;
    top: 25px; /* nav padding (14px) + half toggle height (11px) */
    transform: translate(-50%, -50%);
    margin-right: 0;
    z-index: 10002;
}

/* In nav-actions: hidden by default on desktop */
.nav-actions .theme-toggle { display: flex; }

/* ── Toggle Track ── */
.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: rgba(245,245,245,0.12);
  border: 1px solid rgba(245,245,245,0.18);
  position: relative;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}
.theme-toggle:hover .toggle-track {
  background: rgba(245,245,245,0.20);
  border-color: rgba(245,245,245,0.30);
}

/* ── Toggle Thumb ── */
.toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(245,245,245,0.85);
  position: absolute;
  left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
  flex-shrink: 0;
}

/* ── Icons inside thumb ── */
.toggle-icon {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  pointer-events: none;
}
/* dark mode: thumb is light → icon must be dark */
.toggle-icon--sun  { display: none;  color: #000; }
.toggle-icon--moon { display: block; color: #000; }

/* ── Light mode: track flips colours, thumb slides right, swap icon ── */
html[data-theme="light"] .toggle-track {
  background: rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.18);
}
html[data-theme="light"] .theme-toggle:hover .toggle-track {
  background: rgba(0,0,0,0.18);
  border-color: rgba(0,0,0,0.30);
}
html[data-theme="light"] .toggle-thumb {
  background: rgba(0,0,0,0.88);
  transform: translateX(16px);
}
html[data-theme="light"] .toggle-icon--sun  { display: block; color: rgba(245,245,245,0.85); }
html[data-theme="light"] .toggle-icon--moon { display: none; }

/* ── Mobile: hide desktop toggle (inside nav-links), show nav-actions ── */
@media (max-width: 768px) {
  .nav-actions { display: flex; }
  /* nav-links is already display:none on mobile so its toggle hides automatically */
}

/* Ensure hamburger inside nav-actions keeps correct display */
.nav-actions .hamburger-btn { display: none; }
@media (max-width: 768px) {
  .nav-actions .hamburger-btn { display: flex; }
}

/* ── Toggle Labels (Dark / Light) — hidden ── */
.toggle-label { display: none; }
.toggle-label-UNUSED {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  transition: color 0.3s ease, opacity 0.3s ease;
  flex-shrink: 0;
  user-select: none;
}
.toggle-label--dark  { margin-right: 7px; color: rgba(245,245,245,0.75); }
.toggle-label--light { margin-left: 7px;  color: rgba(245,245,245,0.35); }

/* Active label highlights */
html[data-theme="light"] .toggle-label--dark  { color: rgba(0,0,0,0.40); }
html[data-theme="light"] .toggle-label--light { color: rgba(0,0,0,0.80); }

/* ── Light mode: blog post page ── */
html[data-theme="light"] body:has(.blog-post-main) { background: var(--bg); }
html[data-theme="light"] .blog-post-main { color: var(--fg); }
html[data-theme="light"] .blog-post-title { color: var(--fg); }
html[data-theme="light"] .blog-post-meta { color: var(--fg-45); }
html[data-theme="light"] .blog-post-content { color: var(--fg-80); }
html[data-theme="light"] .blog-post-content p { color: var(--fg-80); }
html[data-theme="light"] .blog-post-content h2,
html[data-theme="light"] .blog-post-content h3 { color: var(--fg); }
html[data-theme="light"] .blog-post-content strong { color: var(--fg); }
html[data-theme="light"] .blog-post-content em { color: inherit; }
html[data-theme="light"] .blog-post-content a { color: var(--fg); }
html[data-theme="light"] .blog-post-content figcaption { color: var(--fg-45); }
html[data-theme="light"] .blog-post-content blockquote { border-color: var(--fg-20); color: var(--fg-65); }
html[data-theme="light"] .blog-post-intro { color: var(--fg-80); }
html[data-theme="light"] .blog-post-date,
html[data-theme="light"] .blog-post-author { color: var(--fg-45); }
html[data-theme="light"] .blog-post-divider { border-color: var(--fg-12); }
html[data-theme="light"] .article-next-divider { background: var(--fg-08); }
html[data-theme="light"] .article-next-label { color: var(--fg-35); }
html[data-theme="light"] .article-next-title {
  color: var(--fg-55);
  text-decoration-color: var(--fg-20);
}
html[data-theme="light"] .article-next-title:hover {
  color: var(--fg);
  text-decoration-color: var(--fg-45);
}

/* ── Light mode: case study / project page text fixes ── */
html[data-theme="light"] .project-header-tags { color: var(--fg-55); }
html[data-theme="light"] .cs-related-article { background: var(--bg-2); }
html[data-theme="light"] .cs-related-article-badge { color: var(--fg-45); }
html[data-theme="light"] .cs-related-article-title { color: var(--fg); }

/* ── Light mode: nav on all page types ── */
html[data-theme="light"] body:has(.blog-post-main) .hamburger-btn span,
html[data-theme="light"] body:has(.pentagram-project-page) .hamburger-btn span { background: rgba(0,0,0,0.88); }
html[data-theme="light"] .mobile-nav-overlay { background: var(--bg); }
html[data-theme="light"] .mobile-nav-link { color: var(--fg); }
html[data-theme="light"] .mobile-nav-link.active { color: var(--fg); }

/* ── Inline external link inside case study content ── */
.cs-inline-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-65);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-20);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: none;
}
.cs-inline-link:hover {
  color: var(--fg);
  border-color: var(--fg-55);
}
html[data-theme="light"] .cs-inline-link { color: var(--fg-65); border-color: var(--fg-20); }
html[data-theme="light"] .cs-inline-link:hover { color: var(--fg); border-color: var(--fg-55); }

/* ── External Link Preview (Eureka Forbes style) ── */
.cs-link-preview {
  display: block;
  border: 1px solid var(--fg-12);
  border-radius: 6px;
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto;
  text-decoration: none;
  transition: border-color 0.22s ease, transform 0.22s ease;
  cursor: none;
}
.cs-link-preview:hover {
  border-color: var(--fg-28, rgba(245,245,245,0.28));
  transform: translateY(-2px);
}
.cs-link-preview-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.cs-link-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}
.cs-link-preview:hover .cs-link-preview-thumb img {
  transform: scale(1.02);
}
.cs-link-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-2);
  border-top: 1px solid var(--fg-08);
}
.cs-link-preview-domain {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-55);
}
.cs-link-preview-icon {
  color: var(--fg-45);
  flex-shrink: 0;
}

/* light mode */
html[data-theme="light"] .cs-link-preview { border-color: var(--fg-12); }
html[data-theme="light"] .cs-link-preview:hover { border-color: var(--fg-35); }
html[data-theme="light"] .cs-link-preview-bar { background: var(--bg-2); border-top-color: var(--fg-08); }

/* ── Coming Soon card (portfolio) ── */
.work-card--coming-soon {
  cursor: default;
  pointer-events: none;
  opacity: 0.55;
}
.card-coming-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.work-card--coming-soon .card-coming-soon-overlay {
  opacity: 1;
  background: transparent;
}
.card-coming-soon-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,245,245,0.65);
  border: 1px solid rgba(245,245,245,0.25);
  padding: 6px 14px;
  border-radius: 2px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
html[data-theme="light"] .card-coming-soon-text {
  color: rgba(245,245,245,0.85);
  border-color: rgba(245,245,245,0.35);
  background: rgba(0,0,0,0.35);
}

/* ── Typography: prevent widows, orphans & reduce rags ────────────────────
   text-wrap: pretty  → avoids lone words on the last line (orphans/widows)
   text-wrap: balance → balances line lengths across all lines (headings)
   orphans / widows   → CSS paged/column fallback (min lines before a break)
─────────────────────────────────────────────────────────────────────────── */

/* Body / paragraph text — pretty wrapping prevents trailing single words */
p,
.content-text,
.intro-text,
.cs-editorial-split-col p,
.cs-editorial-col p,
.cs-right-stack-inner p,
.cs-pull-text-body,
.blog-post-content p,
.card-info .card-title,
.past-work-link,
.project-header-tags,
.card-tags {
  text-wrap: pretty;
  orphans: 3;
  widows: 3;
}

/* Headings — balance distributes words evenly across lines */
h1, h2, h3, h4,
.project-title,
.content-title,
.cs-editorial-split-heading,
.cs-editorial-cols-heading,
.cs-right-stack-heading,
.next-project-title,
.blog-post-title,
.section-title,
.card-title {
  text-wrap: balance;
}

/* ── Heading letter invert hover ── */
.hl-word {
  display: inline-block;
  white-space: nowrap;
}
/* Keep punctuation after a link on the same line */
.heading-link + .hl-word {
  display: inline;
}
.hl-char {
  display: inline-block;
  transform-origin: center center;
  will-change: transform;
  transform: scaleY(1);
  /* no transition on exit — snaps back instantly, no jitter */
}
@media (hover: hover) {
  .hl-char:hover {
    transform: scaleY(-1);
    transition: none;
  }
  /* No flip on linked words — underline is the interaction instead */
  .heading-link .hl-char:hover {
    transform: none;
  }
}

/* ── Photo Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.is-open .lightbox-img-wrap {
    transform: scale(1);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 100000;
}

.lightbox-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(245,245,245,0.7);
    background: rgba(245,245,245,0.08);
    border: 1px solid rgba(245,245,245,0.14);
    border-radius: 4px;
    padding: 8px 14px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.lightbox-btn:hover {
    color: #fff;
    background: rgba(245,245,245,0.15);
}

.lightbox-close {
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1;
}

.lightbox-counter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(245,245,245,0.35);
    letter-spacing: 0.06em;
    padding: 8px 4px;
    pointer-events: none;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100000;
    background: rgba(245,245,245,0.07);
    border: 1px solid rgba(245,245,245,0.12);
    border-radius: 4px;
    color: rgba(245,245,245,0.6);
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lightbox-nav:hover {
    background: rgba(245,245,245,0.14);
    color: #fff;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── About Page — Magnifying Glass ── */
.mag-wrapper {
    position: fixed;
    pointer-events: none;
    z-index: 150000;
    opacity: 0;
    transition: opacity 0.18s ease;
    width: 180px;
    height: 180px;
}
.mag-wrapper.mag-open { opacity: 1; }

.mag-lens-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(245,245,245,0.22);
    box-shadow: 0 6px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
    background: #090909;
}

.mag-inner {
    position: absolute;
    transform-origin: 0 0;
    transform: scale(2);
}

.mag-shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 50%);
    pointer-events: none;
}

.mag-handle {
    position: absolute;
    width: 9px;
    height: 52px;
    background: linear-gradient(to bottom, rgba(245,245,245,0.30), rgba(245,245,245,0.12));
    border-radius: 0 0 6px 6px;
    top: 148px;
    left: 148px;
    transform: rotate(45deg);
    transform-origin: 50% 0;
}

html[data-theme="light"] .mag-lens-circle {
    background: #fafaf8;
    border-color: rgba(0,0,0,0.18);
    box-shadow: 0 6px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}
html[data-theme="light"] .mag-handle {
    background: linear-gradient(to bottom, rgba(0,0,0,0.28), rgba(0,0,0,0.10));
}

/* ── Site footer ── */
.site-footer-text {
    position: absolute;
    bottom: 10px;
    left: 4vw;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: rgba(245, 245, 245, 0.25);
    letter-spacing: 0.04em;
    pointer-events: none;
}

/* ── Mobile 92% width — all page containers aligned to nav ── */
@media (max-width: 768px) {
    .nav-container,
    .container,
    .about-main,
    .writing-main,
    .projects-section,
    .portfolio-main,
    .photos-main,
    .photos-header,
    .blog-post-main,
    .project-header,
    .project-intro,
    .project-content,
    .next-project,
    .pentagram-project-page .project-header,
    .pentagram-project-page .project-intro,
    .pentagram-project-page .project-content {
        padding-left: 4vw !important;
        padding-right: 4vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ─────────────────────────────────────────────
   MOBILE BOTTOM NAVIGATION
   ───────────────────────────────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(245, 245, 245, 0.12);
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
    .mobile-bottom-nav { display: flex; }
    .hamburger-btn { display: none !important; }
    body { padding-bottom: 68px; }
}

.mobile-bottom-nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(245, 245, 245, 0.55);
    text-decoration: none;
    padding: 6px 16px;
    transition: color 0.2s ease;
    cursor: pointer;
}

.mobile-bottom-nav-link:hover,
.mobile-bottom-nav-link.active {
    color: rgba(245, 245, 245, 1);
    font-style: italic;
}

html[data-theme="light"] .mobile-bottom-nav {
    background: rgba(245, 245, 242, 0.97);
    border-top-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .mobile-bottom-nav-link {
    color: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .mobile-bottom-nav-link:hover,
html[data-theme="light"] .mobile-bottom-nav-link.active {
    color: rgba(0, 0, 0, 0.9);
}
