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

:root {
  --bg: #faf7f7;
  --title: #bababa;
  --blue: #0042fe;
  --serif: 'Instrument Serif', serif;
  --sans: 'Space Grotesk', sans-serif;
  --nav-h: 80px;
}

html { scroll-behavior: smooth; }
html.overlay-open { overflow: hidden; }

body {
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 300;
  color: #111;
  min-height: 100vh;
}

/* ══ SHARED NAV — sits on every page ══ */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 3rem;
  background: var(--bg);
  /* hair-line so nav reads over scrolled content */
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.38rem;
  color: #111;
  text-decoration: none;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

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

.nav-links a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  transition: color 0.22s;
}
.nav-links a:hover { color: var(--blue); }

/* ══ HOME ══ */
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* vertically centre the whole content block within the viewport */
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* Inner block: intro + projects centred with equal gaps above/below intro */
.home-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 2rem;
  /* equal gap = intro block sits exactly in the middle of remaining space */
}

/* spacer between nav and intro equals the gap between intro and projects */
.home-spacer-top    { flex: 1.4; min-height: 2rem; }
.home-spacer-middle { flex: 1.4; min-height: 2rem; }

.intro {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.35vw, 0.98rem);
  color: #111;
  text-align: center;
  max-width: 500px;
  line-height: 1.9;
  letter-spacing: 0.005em;
  animation: fadeUp 0.8s ease both 0.05s;
}

/* ══ PROJECT LIST ══ */
.projects {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.project-item {
  position: relative;
  width: 100%;
  text-align: center;
  cursor: pointer;
  padding: calc(0.55rem + 5px) 0;
  transform-origin: center center;
  will-change: transform;
}

.project-name {
  font-family: var(--serif);
  font-size: clamp(1.95rem, 4.3vw, 3.55rem);
  color: var(--title);
  letter-spacing: -0.015em;
  line-height: 1.08;
  transition: color 0.28s ease;
  display: block;
  user-select: none;
}
.project-item:hover .project-name { color: var(--blue); }

/* ══ HOVER PREVIEW ══ */
.preview-bubble {
  position: fixed;
  width: 295px; height: 205px;
  pointer-events: none;
  z-index: 700;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.16s ease;
  transform: scale(0.94) translateY(7px);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 18px 52px rgba(0,0,0,0.14);
}
.preview-bubble.visible { opacity: 1; transform: scale(1) translateY(0); }
.preview-bubble img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ══ OVERLAY PAGES (project + simple) ══ */
/* They sit BELOW the shared nav but cover #home */
.project-page,
.simple-page {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 500;
  overflow-y: scroll;
}
.project-page.open,
.simple-page.open { display: block; }

/* ── project page inner ── */
.pp-inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 3.5rem 3rem 7rem;
}

.pp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.back-btn,
.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.22s;
}
.back-btn:hover,
.next-btn:hover { color: var(--blue); }
.back-btn svg,
.next-btn svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.pp-eyebrow {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 0.65rem;
}

.pp-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  color: var(--blue);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.pp-subtitle {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: #111;
  margin-bottom: 3.5rem;
  line-height: 1.55;
}

.pp-hero {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
  margin-bottom: 3.5rem;
}

.pp-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 4.5rem;
  margin-bottom: 3.5rem;
}

.pp-meta-group { margin-bottom: 1.5rem; }
.pp-meta-label {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #111;
  display: block;
  margin-bottom: 0.25rem;
}
.pp-meta-value {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 300;
  color: #111;
  line-height: 1.7;
}

.pp-copy {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.9;
  color: #111;
}
.pp-copy p + p { margin-top: 1.15em; }

.pp-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: #111;
  border-left: 2px solid #d0cece;
  padding-left: 1.4rem;
  margin: 1.8rem 0;
  line-height: 1.8;
}
.pp-quote small {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #111;
}

.pp-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.pp-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* ── simple page inner ── */
.sp-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 3.5rem 3rem 6rem;
}

.sp-inner h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #c4c0c0;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.sp-inner p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.9;
  color: #666;
  margin-bottom: 1.2rem;
}
.sp-inner a { color: var(--blue); text-decoration: none; }
.sp-inner a:hover { text-decoration: underline; }

/* Awards list */
.awards-list { list-style: none; margin-top: 0.5rem; }
.awards-list li {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.92rem;
  color: #666;
  line-height: 1;
  padding: 1.4rem 0;
  border-bottom: 0.5px solid #e3dfdf;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.awards-list li:first-child { border-top: 0.5px solid #e3dfdf; }

.award-status {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bbb;
  min-width: 52px;
  flex-shrink: 0;
}
.award-status.winner { color: var(--blue); }

.award-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: #c0bbbb;
  line-height: 1.2;
}

/* ══ ABOUT PAGE ══ */
.about-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 3rem 7rem;
}

.about-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
  margin-bottom: 4rem;
}

.about-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #c4c0c0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.about-lead {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: #111;
  line-height: 1.9;
}

.about-hero-img img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  background: #eae6e6;
}

/* Ticker */
.about-ticker-wrap {
  overflow: hidden;
  border-top: 0.5px solid #e3dfdf;
  border-bottom: 0.5px solid #e3dfdf;
  padding: 0.9rem 0;
  margin-bottom: 5rem;
  white-space: nowrap;
}
.about-ticker {
  display: inline-block;
  animation: ticker 22s linear infinite;
}
.about-ticker span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: #ccc;
  margin-right: 0.5rem;
}
.about-ticker .ticker-dot {
  font-style: normal;
  margin-right: 0.5rem;
  color: #ddd;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

/* Two-col grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: 5rem;
}

.about-section-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 2rem;
  display: block;
}

/* Expertise */
.about-expertise-item {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 0.5px solid #ece8e8;
}
.about-expertise-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.about-expertise-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: #111;
  font-weight: 400;
  margin-bottom: 0.65rem;
}
.about-expertise-body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.83rem;
  color: #111;
  line-height: 1.85;
}

/* Experience */
.about-exp-list { display: flex; flex-direction: column; }
.about-exp-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 0.5px solid #ece8e8;
}
.about-exp-item:first-child { border-top: 0.5px solid #ece8e8; }
.about-exp-role { display: flex; flex-direction: column; gap: 0.2rem; }
.about-exp-company {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: #111;
  line-height: 1.2;
}
.about-exp-title-role {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  color: #111;
}
.about-exp-years {
  font-family: var(--sans);
  font-size: 0.68rem;
  color: #888;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Photo grid */
.about-photos {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 4rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  background: #eae6e6;
  aspect-ratio: 3/4;
}
.about-photo--tall { aspect-ratio: 2/3; }

/* Footer links */
.about-footer {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 0.5px solid #e3dfdf;
}
.about-footer a {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  transition: color 0.22s;
}
.about-footer a:hover { color: var(--blue); }
.about-location {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  margin-left: auto;
}

/* ══ JOURNAL PAGE ══ */
.journal-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 3rem 7rem;
}

.journal-header {
  max-width: 520px;
  margin-bottom: 4rem;
}

.journal-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #c4c0c0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.journal-lead {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.88rem;
  color: #999;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* CSS columns masonry — uneven, natural cascade */
.journal-masonry {
  columns: 3;
  column-gap: 1rem;
  margin-bottom: 1rem;
}

.journal-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  display: block;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.journal-item img {
  width: 100%;
  display: block;
  background: #eae6e6;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.journal-item:hover img {
  transform: scale(1.02);
  opacity: 0.88;
}

.journal-caption {
  display: block;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #bbb;
  padding: 0.55rem 0 0;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Stagger odd columns slightly for natural unevenness */
.journal-masonry .journal-item:nth-child(3n+1) { margin-top: 0; }
.journal-masonry .journal-item:nth-child(3n+2) { margin-top: 0; }
.journal-masonry .journal-item:nth-child(3n)   { margin-top: 0; }

/* ══ SITE FOOTER ══ */
.site-footer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 10px;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid #d8d4d4;
  color: #aaa;
  text-decoration: none;
  transition: border-color 0.22s, color 0.22s, background 0.22s;
  background: var(--bg);
}
.footer-icon:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: #f0f4ff;
}
.footer-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}

/* ══ ANIMATIONS ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
.project-item { animation: fadeUp 0.6s ease both; }
.project-item:nth-child(1) { animation-delay: 0.16s; }
.project-item:nth-child(2) { animation-delay: 0.23s; }
.project-item:nth-child(3) { animation-delay: 0.30s; }
.project-item:nth-child(4) { animation-delay: 0.37s; }
.project-item:nth-child(5) { animation-delay: 0.44s; }
.project-item:nth-child(6) { animation-delay: 0.51s; }
.project-item:nth-child(7) { animation-delay: 0.58s; }
.project-item:nth-child(8) { animation-delay: 0.65s; }

/* ══ RESPONSIVE ══ */

/* Tablet — 900px */
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr 260px; gap: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-photos { grid-template-columns: 1fr 1fr; }
  .about-photo--tall { aspect-ratio: 3/4; }
}

/* Tablet — 900px */
@media (max-width: 900px) {
  .journal-masonry { columns: 2; }
}

/* Mobile — 640px */
@media (max-width: 640px) {
  :root { --nav-h: 64px; }

  #site-nav { padding: 0 1.25rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.6rem; letter-spacing: 0.08em; }

  #home { padding-top: var(--nav-h); }

  .intro { font-size: 0.85rem; max-width: 90vw; }

  /* Project list */
  .projects { max-width: 100%; }
  .project-name { font-size: clamp(1.8rem, 10vw, 3rem); }

  /* Hover preview hidden on touch */
  .preview-bubble { display: none; }

  /* Project pages */
  .pp-inner { padding: 2rem 1.25rem 5rem; }
  .pp-body { grid-template-columns: 1fr; gap: 2rem; }



  /* Simple pages */
  .sp-inner { padding: 2rem 1.25rem 4rem; }

  /* About */
  .about-inner { padding: 2rem 1.25rem 5rem; }
  .about-hero { grid-template-columns: 1fr; gap: 2rem; }
  .about-hero-img { order: -1; }
  .about-hero-img img { aspect-ratio: 4/3; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-photos { grid-template-columns: 1fr 1fr; }
  .about-photo--tall { aspect-ratio: 3/4; }
  .about-footer { gap: 1.5rem; }
  .about-location { margin-left: 0; width: 100%; }

  /* Journal */
  .journal-inner { padding: 2rem 1.25rem 5rem; }
  .journal-masonry { columns: 1; }
}

/* Hide journal captions — images only */
.journal-caption { display: none; }

/* Fish-eye hover pop on project titles */
.project-item { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.project-item:hover { transform: scale(1.13) !important; z-index: 2; }

/* About collapsible sections (Japan / Substack / Reading) */
.about-collapsible { margin-bottom: 4rem; }

.about-collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 1.1rem 0;
  border-top: 0.5px solid #e3dfdf;
  border-bottom: 0.5px solid #e3dfdf;
  user-select: none;
}
.about-collapsible-header:hover .about-collapsible-label { color: var(--blue); }

.about-collapsible-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #111;
  transition: color 0.22s;
}

.about-collapsible-chevron {
  width: 14px; height: 14px;
  stroke: #aaa; fill: none;
  stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.3s ease, stroke 0.22s;
  flex-shrink: 0;
}
.about-collapsible.open .about-collapsible-chevron { transform: rotate(180deg); stroke: var(--blue); }

.about-collapsible-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s ease;
}
.about-collapsible.open .about-collapsible-body {
  grid-template-rows: 1fr;
}
.about-collapsible-body-inner {
  overflow: hidden;
}

.about-collapsible-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.7rem;
  padding: 1.2rem 0 0.5rem;
}
.about-collapsible-grid img {
  width: 100%;
  border-radius: 3px;
  display: block;
  object-fit: cover;
  aspect-ratio: 3/4;
  background: #eae6e6;
  transition: transform 0.4s ease, opacity 0.3s;
}
.about-collapsible-grid img:hover { transform: scale(1.02); opacity: 0.9; }
.about-collapsible-grid img.landscape { aspect-ratio: 4/3; }

@media (max-width: 640px) {
  .about-collapsible-grid { grid-template-columns: 1fr 1fr; }
}

/* ══ VIDEO EMBEDS ══ */
.pp-video {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3.5rem;
  background: #111;
}
.pp-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Journal video item — sits naturally in the masonry column */
.journal-item--video {
  break-inside: avoid;
  margin-bottom: 1rem;
}
.journal-item--video video {
  width: 100%;
  display: block;
  border-radius: 3px;
  background: #111;
}

/* ══ AWARDS TESTIMONIAL ══ */
.awards-testimonial {
  margin-top: 3rem;
}
.awards-testimonial-body {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #888;
  line-height: 1.85;
  margin-bottom: 1em;
}
.awards-testimonial-attribution {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #111;
  margin-top: 1.5rem;
  line-height: 1.7;
}

/* ══ ABOUT PAGE FOOTER ICONS ══ */
.about-footer-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

/* ══ PAGE FOOTER ICONS (on all overlay pages) ══ */
.page-footer-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 0 1rem;
}

/* ══ JOURNAL CLOUDINARY LOADING STATE ══ */
.journal-loading {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ccc;
  padding: 1rem 0 0.5rem;
}
