/* ── Fonts ───────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Raveo';
  src: url('/assets/fonts/RaveoVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */

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

/* ── Variables ───────────────────────────────────────────────────────────────── */

:root {
  --bg:         #ffffff;
  --bg-off:     #f6f5f3;
  --text:       #0f0f0f;
  --text-dim:   #5c5c5c;
  --text-muted: #999999;
  --border:     #e8e8e8;
  --sans:       'Raveo', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w:      1440px;
  --gutter:     40px;
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Base ────────────────────────────────────────────────────────────────────── */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── Container ───────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Header ──────────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--bg);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  gap: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.2s;
  cursor: pointer;
}

.info-row:hover .header-bio { color: var(--text); }

.info-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.header-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.44px;
  line-height: 26px;
  color: var(--text);
  display: inline-block;
  width: fit-content;
  padding: 2px 4px;
  border-radius: 6px;
  margin: -2px -4px;
}

.header-time {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.44px;
  line-height: 26px;
  color: rgb(207, 207, 207);
  display: block;
}
.header-time-value {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: inherit;
}

.header-bio {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.44px;
  line-height: 26px;
  color: rgb(207, 207, 207);
  text-align: left;
  max-width: 50%;
  align-self: flex-start;
  transition: color 0.2s;
}

.nav-row {
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  height: 44px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-row::-webkit-scrollbar { display: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: -8px;
}

.nav-row a,
.nav-link {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.28px;
  line-height: 22.4px;
  color: rgb(207, 207, 207);
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  background: none;
  transition: color 0.15s ease;
  display: inline-block;
}

.nav-row a:hover,
.nav-link:hover {
  color: rgb(17, 17, 17);
}

.nav-row a.active,
.nav-link.active {
  color: rgb(17, 17, 17);
  background: none;
}

.nav-sep {
  color: rgba(0, 0, 0, 0.18);
  font-size: 0.75rem;
  user-select: none;
  padding: 0 2px;
}

/* ── Project Grid ────────────────────────────────────────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.project-card {
  display: block;
  cursor: pointer;
  background: var(--bg-off);
  border-radius: 8px;
  overflow: hidden;
}

.project-card-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-label {
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 900;
  color: rgba(0,0,0,0.1);
  letter-spacing: -0.02em;
  user-select: none;
}

.project-card-info {
  padding: 12px 16px 20px;
  background: var(--bg);
}

.project-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.project-card-sub {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ── Page Header (inner pages) ───────────────────────────────────────────────── */

.page-header {
  padding: 64px var(--gutter) 48px;
}

.page-title {
  font-size: clamp(2.275rem, 4.55vw, 3.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  max-width: 800px;
  text-wrap: balance;
}

/* ── Work page grid ──────────────────────────────────────────────────────────── */

.work-grid-section {
  padding-top: 2px;
  padding-bottom: 80px;
}

/* ── Bento / Feed Grid ───────────────────────────────────────────────────────── */

.bento-section {
  padding-top: 0;
  padding-bottom: 24px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 4px;
  align-items: start;
}

.bento-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bento-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-off);
  cursor: pointer;
  animation: bento-in 0.3s ease var(--delay, 0ms) both;
}

.bento-item img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes bento-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Feed lightbox ───────────────────────────────────────────────────────────── */

#feed-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

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

#feed-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.bento-empty {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── About Page ──────────────────────────────────────────────────────────────── */

.about-hero {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.about-hero-text {
  flex: 1;
  min-width: 0;
}

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

.about-hero-img {
  width: 280px;
  height: 360px;
  object-fit: cover;
  object-position: center 35%;
  flex-shrink: 0;
  display: block;
  margin: 0;
  border-radius: 4px;
}

.about-headline {
  font-size: clamp(2.925rem, 6.5vw, 5.85rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 6px;
  text-wrap: balance;
}

.about-headline em {
  font-style: normal;
  color: var(--text-muted);
}

.about-bio-text {
  font-size: 1.0625rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 640px;
}

.about-bio-text + .about-bio-text { margin-top: 1.35em; }

/* ── Experience Timeline (about page) ────────────────────────────────────────── */

.timeline-section {
  padding: 80px var(--gutter);
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-left { padding-top: 3px; }

.timeline-period {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}


.timeline-company {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 6px;
}

.timeline-role {
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── Philosophy Grid (about page) ────────────────────────────────────────────── */

.philosophy-section {
  padding: 80px var(--gutter) 100px;
}



/* ── Footer ──────────────────────────────────────────────────────────────────── */

.site-footer {
  display: flex;
  flex-direction: column;
}

.footer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: var(--gutter);
  border-top: 1px solid var(--border);
}

.footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-col--right {
  align-items: flex-end;
}

.footer-reach {
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: rgb(207, 207, 207);
  max-width: 640px;
  text-decoration: none;
  transition: color 0.15s;
  display: block;
}

.footer-reach:hover { color: rgb(17, 17, 17); }


.footer-col-link {
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: rgb(207, 207, 207);
  transition: color 0.15s;
  text-decoration: none;
}

.footer-col-link:hover { color: rgb(17, 17, 17); }

.footer-next-row {
  display: flex;
  align-items: center;
  padding: var(--gutter);
  border-top: 1px solid var(--border);
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: rgb(207, 207, 207);
  transition: color 0.15s;
  text-decoration: none;
}

.footer-next-row:hover { color: rgb(17, 17, 17); }

/* ── Toast ───────────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 12px 20px;
  z-index: 999;
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.3s var(--ease);
  pointer-events: none;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ── Project tags (used in project.html) ─────────────────────────────────────── */

.modal-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}

.modal-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
}

/* ── Project Page ────────────────────────────────────────────────────────────── */

.project-page-hero {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #ebebeb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-hero-label {
  font-size: clamp(3rem, 8vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.1);
  user-select: none;
  line-height: 1;
}

.project-page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-page-header {
  padding: 64px 0 48px;
  max-width: 760px;
  border-bottom: 1px solid var(--border);
}

.project-page-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-page-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.project-page-title {
  font-size: clamp(2.6rem, 5.2vw, 4.55rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  text-wrap: balance;
}

.project-page-subtitle {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 640px;
}

.project-page-sections {
  padding: 64px 0 100px;
  max-width: 760px;
}

/* Section: Text */
.ps-text { margin-bottom: 52px; }
.ps-text:last-child { margin-bottom: 0; }

.ps-heading {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}

.ps-body {
  font-size: 1.0625rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* Section: Image */
.ps-image {
  margin-bottom: 52px;
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
}
.ps-image:last-child { margin-bottom: 0; }

.ps-image img { width: 100%; display: block; }

.ps-caption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 0 var(--gutter);
}

/* Section: Metrics */
.ps-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 52px;
}
.ps-metrics:last-child { margin-bottom: 0; }

.ps-metric { background: var(--bg); padding: 28px 24px; }

.ps-metric-value {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 6px;
}

.ps-metric-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Section: Quote */
.ps-quote {
  border-left: 3px solid var(--text);
  padding-left: 28px;
  margin-bottom: 52px;
}
.ps-quote:last-child { margin-bottom: 0; }

.ps-quote-text {
  font-size: 1.3125rem;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.6;
}

.ps-quote-cite {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: normal;
}


/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  :root { --gutter: 28px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  /* About page: timeline inside about-grid needs higher specificity override */
  .about-grid .timeline-section .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 680px) {
  :root { --gutter: 20px; }
  .project-grid { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .info-row { flex-direction: column; gap: 6px; }
  /* header-bio: remove 50% max-width constraint when info-row stacks */
  .header-bio { text-align: left; max-width: none; font-size: 16px; }
  .header-name { font-size: 16px; }
  .header-time { font-size: 16px; }
  /* page-header: reduce top padding on small screens */
  .page-header { padding-top: 40px; padding-bottom: 32px; }
  /* project page: reduce padding on small screens */
  .project-page-header { padding-top: 40px; padding-bottom: 32px; }
  .project-page-sections { padding-top: 40px; padding-bottom: 60px; }
  /* homepage stance: reduce top padding on small screens */
  .homepage-stance { padding-top: 40px; }
  .about-hero { flex-direction: column; align-items: flex-start; gap: 32px; }
  .about-hero-img { width: 100%; height: 260px; border-radius: 4px; }
}

/* ── Dark theme — index.html only (body.page-new) ───────────────────────────── */

body.page-new {
  background: #0a0a0a;
  color: #fff;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.page-new .page-content {
  flex: 1;
  min-height: calc(100dvh - var(--header-h, 120px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Suppress all pseudo-element overlays on dark homepage — plain #0a0a0a */
body.page-new::after { display: none; }

body.page-new .site-header { background: #0a0a0a; color: #fff; }

body.page-new .info-row {
  color: #e5e5e5;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.page-new .header-name { color: #fff; }
body.page-new .header-time { color: rgba(255,255,255,0.38) !important; }
body.page-new .header-bio  { color: rgba(255,255,255,0.38); }
body.page-new .info-row:hover .header-bio { color: #fff; }

body.page-new .nav-row {
  background: #0a0a0a;
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.page-new .nav-row a,
body.page-new .nav-link {
  color: rgba(255, 255, 255, 0.38) !important;
}

body.page-new .nav-row a:hover,
body.page-new .nav-link:hover {
  color: #fff !important;
  background: none;
}

body.page-new .nav-row a.active,
body.page-new .nav-link.active {
  color: #fff;
  background: none;
}

body.page-new .nav-sep { color: rgba(255, 255, 255, 0.15); }

body.page-new .footer-contact-row,
body.page-new .footer-next-row {
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.page-new .footer-reach  { color: rgba(255, 255, 255, 0.38); }
body.page-new .footer-reach:hover { color: #fff; opacity: 1; }
body.page-new .footer-col-link { color: rgba(255, 255, 255, 0.38); }
body.page-new .footer-col-link:hover { color: #fff; opacity: 1; }
body.page-new .footer-next-row { color: rgba(255, 255, 255, 0.38); }
body.page-new .footer-next-row:hover { color: #fff; opacity: 1; }

body.page-new main { overflow-x: hidden; }


/* ── Page Transitions ─────────────────────────────────────────────────────────── */

@keyframes page-wipe-in {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0%   0 0); }
}

@keyframes page-wipe-out {
  from { clip-path: inset(0 0%   0 0); }
  to   { clip-path: inset(0 0% 0 100%); }
}

::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  animation: page-wipe-in 400ms cubic-bezier(0.27, 0, 0.51, 1) both;
  mix-blend-mode: normal;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

/* ── Animations ──────────────────────────────────────────────────────────────── */

/* Element-level stagger — each .appear starts hidden; JS applies opacity transition */
.appear {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .appear {
    opacity: 1 !important;
    transition: none !important;
  }
}

/* 2. Project card hover — restrained scale */
.project-card {
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

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

.project-card img {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

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

/* 3. Body text link hover — opacity fade */
main a:not(.project-card):not(.nav-link) {
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

main a:not(.project-card):not(.nav-link):hover {
  opacity: 1;
}

/* ── About Grid Layout ───────────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4px; /* matches .bento-grid gap */
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem var(--gutter) 6rem;
}

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

/* Full-width section dividers inside the about grid */
.about-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
  align-self: end;
}

/* Hero inside grid — remove standalone border/padding */
.about-grid .about-hero {
  border-bottom: none;
  padding: 0 0 3rem;
}

/* Bio — left column */
.about-info {
  grid-column: 1;
  padding-top: 0.25rem;
  padding-bottom: 3rem;
  align-self: start;
}

.about-info .about-bio-text {
  max-width: 52ch;
}

.about-info .about-bio-text:first-child {
  font-size: 1.1875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.65;
}

/* How I work + Experience: label left, content right */
.about-grid .philosophy-section,
.about-grid .timeline-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  padding: 0;
  padding-top: 3rem;
  padding-bottom: 3rem;
  align-items: start;
}


/* Section headings in col 1: same style as company names, sticky while content scrolls */
.about-grid .philosophy-section > .section-label,
.about-grid .timeline-section > .section-label {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-transform: none;
  color: var(--text);
  margin-bottom: 0;
  position: sticky;
  top: 52px; /* 44px nav + 8px breathing room */
  align-self: start;
}

/* Align "How I work" with first principle (philosophy-item has 40px top padding) */
.about-grid .philosophy-section > .section-label {
  padding-top: 40px;
}

/* Align "Experience" with first job entry (timeline-item has 36px top padding) */
.about-grid .timeline-section > .section-label {
  padding-top: 36px;
}

/* Experience entries: flex column, logo+date top row */
.about-grid .timeline-section .timeline-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.about-grid .timeline-section .timeline-item:first-child {
  border-top: none;
}

.timeline-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

/* Reset global role margin in about timeline — gap handles spacing */
.about-grid .timeline-section .timeline-role {
  margin-bottom: 0;
}

/* Visually separate description from identity block above */
.about-grid .timeline-section .timeline-desc {
  margin-top: 10px;
}

.timeline-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.about-grid .timeline-section .timeline-company {
  display: block;
  margin-bottom: 0;
}

.about-grid .timeline-section .timeline-company a {
  opacity: 1 !important;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  padding: 2px 4px;
  border-radius: 6px;
  margin: -2px -4px;
}

@media (max-width: 768px) {
  .about-grid .philosophy-section,
  .about-grid .timeline-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* Mobile */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    padding: 2rem var(--gutter) 4rem;
  }
  .about-full,
  .about-info {
    grid-column: 1 !important;
  }
  .about-grid .philosophy-section > .section-label,
  .about-grid .timeline-section > .section-label {
    position: static;
  }
}

/* ── "Now" dot — replaces pill badge on timeline ─────────────────────────────── */

.timeline-now-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.timeline-item-top .timeline-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-off);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
}

/* ── Philosophy section — visually distinct from experience ──────────────────── */

.philosophy-list {
  display: flex;
  flex-direction: column;
}

.philosophy-item {
  display: block;
  padding: 40px 0;
}

/* Children carry the muted/active state — parent opacity is owned by the
   entrance animation (.appear), so we target children to avoid conflict. */
.philosophy-item .philosophy-principle,
.philosophy-item .philosophy-desc {
  opacity: 0.25;
  transition: opacity 0.4s var(--ease);
}

.philosophy-item.active .philosophy-principle,
.philosophy-item.active .philosophy-desc {
  opacity: 1;
}

.philosophy-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0.2;
  letter-spacing: 0.04em;
  padding-top: 6px;
}

.philosophy-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.philosophy-principle {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  text-wrap: balance;
}

.philosophy-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 56ch;
  text-wrap: pretty;
}

@media (max-width: 680px) {
  .philosophy-item {
    padding: 32px 0;
  }
  .philosophy-principle { font-size: 1.125rem; }
}

/* ── Redesign Upgrades ───────────────────────────────────────────────────────── */

/* Focus states — accessible keyboard navigation */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Remove default outline when using mouse */
:focus:not(:focus-visible) {
  outline: none;
}

/* Active press feedback */

/* Subtle noise overlay — breaks flat digital sterility */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
  transform: translateZ(0);
  will-change: transform;
}

/* text-wrap: pretty on body text to prevent orphans */
.timeline-desc,
.about-bio-text,
.ps-body {
  text-wrap: pretty;
}

/* ── Custom Cursor ────────────────────────────────────────────── */

@media (hover: hover) {
  *, *::before, *::after {
    cursor: none !important;
  }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #111111;
  background: transparent;
  pointer-events: none;
  z-index: 9999;
  will-change: transform, width, height, border-radius;
  transition:
    width         0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    height        0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-radius 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color  0.2s ease,
    opacity       0.2s ease;
}

/* ── Homepage landing page ──────────────────────────────────────────────────── */

.homepage-stance { padding-top: 64px; padding-bottom: 48px; }

body.page-new .homepage-stance {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.homepage-body {
  font-size: clamp(2.275rem, 4.55vw, 3.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  max-width: 800px;
}

.homepage-body + .homepage-body { margin-top: 0.9em; }

/* Dark theme overrides (body.page-new = index.html only) */
body.page-new .homepage-body { color: #fff; max-width: none; }

/* ── About page: photo row (about-specific) ──────────────────────────────────── */

.about-img-cell {
  margin-bottom: 3rem;
}

.about-img-cell .about-photo,
.about-photo-placeholder {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 8px; /* matches .bento-item border-radius */
  display: block;
}

.about-photo-placeholder {
  background: var(--bg-off); /* muted surface, ready to swap for a real image */
}

@media (max-width: 768px) {
  .about-img-cell .about-photo,
  .about-photo-placeholder {
    height: 300px;
  }
}

/* ── Per-character variable weight — homepage hero ───────────────────────────── */

.char {
  display: inline-block;
  transition: font-weight 0.15s ease;
  font-weight: 900;
}

/* ─────────────────────────────────────────────────────────────────────────── */
