/* ---------------------------------------------------------
   Inner-page system (About / Projects / Contact)
   Reuses tokens from style.css (--paper, --ink, --rail-w, fonts)
--------------------------------------------------------- */

:root {
  --font-mono: 'Space Mono', 'Courier New', monospace;
}

.page {
  margin: 0 var(--rail-w);
}

/* ---------------------------------------------------------
   Panels — alternating dark / light full-bleed sections
--------------------------------------------------------- */
.panel {
  position: relative;
  padding: 120px 24px 96px;
}

.panel--dark {
  background: var(--ink);
  color: var(--paper);
}

.panel--light {
  background: var(--paper);
  color: var(--ink);
}

.panel--full {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.panel__inner {
  max-width: 920px;
  margin: 0 auto;
}

.panel__inner--wide {
  max-width: 1160px;
}

/* Torn / stepped edge between a dark panel and the panel below it */
.torn-edge {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(20px, 4vw, 48px);
  transform: translateY(50%);
  z-index: 5;
  pointer-events: none;
}

.torn-edge path {
  fill: var(--ink);
}

.torn-edge--light path {
  fill: var(--paper);
}

/* ---------------------------------------------------------
   Eyebrow label — "(ABOUT)" "(PROJECTS)" "(REACH OUT)"
--------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.65;
  margin: 0 0 18px;
}

/* ---------------------------------------------------------
   Headline + mono copy
--------------------------------------------------------- */
.page-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  text-wrap: balance;
  max-width: 16em;
}

.mono-copy {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 34em;
  opacity: 0.85;
}

.mono-copy + .mono-copy {
  margin-top: 1.2em;
}

.serif-copy {
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 36em;
}

.serif-copy + .serif-copy {
  margin-top: 1em;
}

/* ---------------------------------------------------------
   About hero — text and portrait side by side
--------------------------------------------------------- */
.about-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 56px;
}

.about-hero__figure {
  margin: 0;
  justify-self: end;
}

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-hero__figure {
    justify-self: stretch;
  }
}

/* ---------------------------------------------------------
   Numbered image caption (shared idiom with the homepage portrait)
--------------------------------------------------------- */
.figure {
  position: relative;
  margin: 56px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.figure__frame {
  flex: 1;
  aspect-ratio: 3 / 4;
  max-width: 420px;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel--dark .figure__frame {
  background: #2a2a28;
}

.figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

/* ---------------------------------------------------------
   Section heading (used to open Experience / Education / Skills)
--------------------------------------------------------- */
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 36px;
}

.section-heading__index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.5;
}

.section-heading__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
}

.subsection + .subsection {
  margin-top: 88px;
}

/* ---------------------------------------------------------
   List — Experience / Education
--------------------------------------------------------- */
.list {
  border-top: 1px solid var(--rule);
}

.panel--dark .list {
  border-top-color: rgba(244, 243, 240, 0.16);
}

.list__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.panel--dark .list__row {
  border-bottom-color: rgba(244, 243, 240, 0.16);
}

.list__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-body);
}

.list__role {
  font-size: 1.15rem;
}

.list__org {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  opacity: 0.7;
}

.list__dates {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.6;
  white-space: nowrap;
}

.list__desc {
  flex-basis: 100%;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 46em;
  opacity: 0.85;
  margin: 2px 0 0;
}

/* ---------------------------------------------------------
   Two-column Skills & Languages
--------------------------------------------------------- */
.columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.column__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 0 0 18px;
}

.column__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 2;
}

.column__list li {
  border-bottom: 1px solid var(--rule);
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.column__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  opacity: 0.55;
  white-space: nowrap;
}

/* ---------------------------------------------------------
   Projects grid
--------------------------------------------------------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.project-tile {
  position: relative;
  display: block;
  color: inherit;
  border-top: 1px solid var(--rule);
  padding: 48px 0;
  overflow: hidden;
}

.panel--dark .project-tile { border-top-color: rgba(244, 243, 240, 0.16); }

.project-grid .project-tile:last-child {
  border-bottom: 1px solid var(--rule);
}

.panel--dark .project-grid .project-tile:last-child { border-bottom-color: rgba(244, 243, 240, 0.16); }

.project-tile__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-right: clamp(120px, 16vw, 200px);
}

.project-tile__index {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  opacity: 0.5;
  min-width: 2.5em;
  flex-shrink: 0;
}

.project-tile__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  min-width: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.project-tile__type {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  opacity: 0.55;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-tile__media {
  position: absolute;
  top: 50%;
  right: 0;
  width: clamp(96px, 13vw, 160px);
  aspect-ratio: 4 / 3;
  transform: translateY(-50%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  background: #2a2a28;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.project-tile__wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}

@media (hover: hover) {
  .project-tile:hover .project-tile__name {
    transform: translateX(14px);
  }
  .project-tile:hover .project-tile__media {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.project-tile:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

/* Floating cursor tag (desktop hover, mirrors the case-study reveal cue) */
.cursor-tag {
  position: fixed;
  z-index: 70;
  transform: translate(-50%, -140%);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor-tag.is-visible {
  opacity: 1;
}

@media (hover: none) {
  .cursor-tag { display: none; }
}

/* ---------------------------------------------------------
   Project detail page
--------------------------------------------------------- */
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 243, 240, 0.16);
}

.project-meta__item dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  margin: 0 0 6px;
}

.project-meta__item dd {
  font-family: var(--font-body);
  font-size: 1.05rem;
  margin: 0;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--paper);
  color: var(--ink);
}

.project-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project-nav a:hover { opacity: 0.6; }

/* ---------------------------------------------------------
   Contact
--------------------------------------------------------- */
.contact-list {
  margin: 40px 0 0;
}

.contact-list__row {
  border-top: 1px solid rgba(244, 243, 240, 0.16);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
}

.contact-list__row:last-child {
  border-bottom: 1px solid rgba(244, 243, 240, 0.16);
}

.contact-list dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.contact-list dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
}

.contact-list a {
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.contact-list a:hover { opacity: 0.6; }

/* ---------------------------------------------------------
   Site footer / footnote (contact details, every page)
--------------------------------------------------------- */
.site-footer {
  background: var(--paper);
  color: var(--ink);
  margin: 0 var(--rail-w);
  padding: 28px 24px 32px;
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  opacity: 0.7;
}

.site-footer a {
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-bottom-color: currentColor;
}

/* ---------------------------------------------------------
   Case-study page — full-bleed hero + details spread
--------------------------------------------------------- */
.case-hero {
  padding: 56px 24px 0;
}

.case-hero__bar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.case-hero__title {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.case-hero__year {
  font-size: 0.55em;
  font-weight: 400;
  letter-spacing: 0.03em;
  opacity: 0.6;
  margin-top: 0.2em;
}

.case-hero__figure {
  max-width: 1160px;
  margin: 40px auto 0;
  aspect-ratio: 2 / 1;
  background: var(--paper);
  overflow: hidden;
}

.case-hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-hero__scroll {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 0 56px;
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.3rem;
}

.case-hero__arrow {
  display: block;
  margin: 6px auto 0;
  font-family: var(--font-body);
  font-size: 1.1rem;
  opacity: 0.6;
  animation: case-arrow-pulse 2.2s ease-in-out infinite;
}

@keyframes case-arrow-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(4px); opacity: 0.8; }
}

.case-details {
  max-width: 1160px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  display: grid;
  grid-template-columns: minmax(240px, 400px) 1fr;
  gap: 24px 56px;
}

.case-details__meta {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 2;
  text-align: right;
}

.case-details__meta p { margin: 0; }

.case-details__heading {
  font-family: var(--font-script);
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 20px;
}

.case-details__body .mono-copy {
  max-width: 42em;
}

.case-details__link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.case-details__link:hover { opacity: 0.6; }

.case-details__foot {
  grid-column: 1 / -1;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
}

/* ---------------------------------------------------------
   Work gallery — mixed-size photo grid, reveals on scroll
--------------------------------------------------------- */
.work-gallery {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 96px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.work-gallery__item {
  margin: 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-gallery__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.work-gallery__item--large {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.work-gallery__item--small {
  aspect-ratio: 4 / 5;
}

.work-gallery__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--paper);
  overflow: hidden;
}

/* Photos are matted, never upscaled past their native resolution —
   each <img> carries its own max-width/max-height inline, matching
   its real pixel dimensions, so a small source photo sits centered
   and sharp rather than being stretched blurry to fill the frame. */
.work-gallery__frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.work-gallery__caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  opacity: 0.55;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 900px) {
  .columns { grid-template-columns: 1fr; gap: 32px; }
  .project-tile__media { display: none; }
  .case-details { grid-template-columns: 1fr; gap: 32px; }
  .case-details__meta { text-align: left; }
}

@media (max-width: 640px) {
  .page { margin: 0 34px; }
  .site-footer { margin: 0 34px; }
  .panel { padding: 88px 16px 64px; }
  .project-tile__row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .project-tile__type { text-align: left; }
  .site-footer__inner { flex-direction: column; }
  .case-hero { padding: 40px 16px 0; }
  .case-hero__figure { aspect-ratio: 4 / 5; }
  .case-details { padding: 64px 16px 48px; }
  .work-gallery { grid-template-columns: 1fr; padding: 0 16px 64px; gap: 24px; }
  .work-gallery__item--large,
  .work-gallery__item--small {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-tile__name,
  .project-tile__media {
    transition: none;
  }
  .case-hero__arrow {
    animation: none;
  }
  .work-gallery__item {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
