/* ==========================================================================
   KIKIS — editorial portfolio shell
   No animations / transitions by design. Motion is layered in later.
   ========================================================================== */

:root {
  --bg:        #ffffff;
  --fg:        #111111;
  --fg-soft:   #6a6a6a;
  --rule:      #e2e2e2;
  --accent:    #d4331d;

  --font-mono: "Geist Mono", "SFMono-Regular", ui-monospace, "Menlo",
               "DejaVu Sans Mono", monospace;

  --fs-nano:   10px;   /* numerals, tags */
  --fs-micro:  11px;   /* nav, captions, footer, body copy */
  --fs-small:  12px;   /* section markers */
  --fs-display:16px;   /* the one "large" line per page */

  --track:     0.045em;
  --track-wide:0.12em;

  --gutter:    18px;
  --edge:      28px;   /* page side margin */
  --bar:       34px;   /* header / footer band height */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: var(--track);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

p { margin: 0; }

/* --------------------------------------------------------------- primitives */

.u-up      { text-transform: uppercase; }
.u-soft    { color: var(--fg-soft); }
.u-accent  { color: var(--accent); }
.u-nano    { font-size: var(--fs-nano); }
.u-right   { text-align: right; }
.u-strong  { font-weight: 600; }
.u-nowrap  { white-space: nowrap; }

/* The clipped-corner tag used for [NEW] / [ARCHIVE] markers. */
.tag {
  display: inline-block;
  font-size: var(--fs-nano);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}
.tag--new { color: var(--accent); }

.marker {
  font-size: var(--fs-small);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.display {
  font-size: var(--fs-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* -------------------------------------------------------------------- shell */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--edge);
}

.page__body { flex: 1 1 auto; }

/* 6-column field. Everything on the page snaps to it. */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

.start-1 { grid-column-start: 1; }
.start-2 { grid-column-start: 2; }
.start-3 { grid-column-start: 3; }
.start-4 { grid-column-start: 4; }
.start-5 { grid-column-start: 5; }

/* ------------------------------------------------------------------- header */

.masthead {
  padding-top: 12px;
  padding-bottom: 10px;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.masthead__cell > span,
.masthead__cell > a { display: block; }

.masthead__cell--end { text-align: right; }

.masthead a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------- footer */

.colophon {
  padding-top: 26px;
  padding-bottom: 14px;
  font-size: var(--fs-micro);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}

.colophon__cell--end { text-align: right; }

.pager { display: inline; }
.pager__sep { color: var(--fg-soft); }

/* ---------------------------------------------------------------- home strip */

/* Overflows the viewport on purpose: the reel is meant to be dragged sideways. */
.reel {
  padding: 0 var(--edge);
  margin: 0 calc(var(--edge) * -1);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.reel__track {
  display: flex;
  align-items: flex-end;
  gap: 34px;
  width: max-content;
  padding-bottom: 4px;
}

.reel__item {
  width: 132px;
  flex: 0 0 auto;
}

/* Widen a couple of frames so the row reads as photographs, not a data table. */
.reel__item--wide { width: 152px; }

.reel__num {
  font-size: var(--fs-nano);
  letter-spacing: var(--track-wide);
  color: var(--fg-soft);
  margin-bottom: 12px;
}

.reel__frame {
  height: 178px;
  overflow: hidden;
  background: #f4f4f4;
}

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

.reel__caption {
  margin-top: 12px;
  font-size: var(--fs-nano);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home__stage {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 190px);
}

.home__plus {
  align-self: center;
  padding-left: 20px;
  font-size: 15px;
  color: var(--fg-soft);
}

/* ----------------------------------------------------------------- index grid */

.index {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 74px;
  align-items: start;
}

.card__frame {
  overflow: hidden;
  background: #f4f4f4;
}

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

/* Frame proportions, applied per card so the index stays irregular. */
.ar-portrait   .card__frame { aspect-ratio: 3 / 4; }
.ar-tall       .card__frame { aspect-ratio: 2 / 3; }
.ar-landscape  .card__frame { aspect-ratio: 16 / 9; }
.ar-wide       .card__frame { aspect-ratio: 21 / 9; }
.ar-square     .card__frame { aspect-ratio: 1 / 1; }

.card__tag { display: block; margin-bottom: 8px; }

.card__caption {
  margin-top: 12px;
  font-size: var(--fs-nano);
  line-height: 1.55;
}

.card__title {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Optical nudges — a strict grid reads as a spreadsheet, offsets read as edited. */
.drop-1 { margin-top: 48px; }
.drop-2 { margin-top: 96px; }
.drop-3 { margin-top: 150px; }

/* ------------------------------------------------------------------- entries */

.entry__head { padding-top: 84px; }

.entry__abstract {
  margin-top: 14px;
  font-size: var(--fs-micro);
  line-height: 1.6;
}

.entry__meta {
  margin-top: 16px;
  font-size: var(--fs-nano);
  line-height: 1.6;
}

.plate {
  margin-top: 62px;
  overflow: hidden;
  background: #f4f4f4;
}

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

.plate--hero    { aspect-ratio: 2 / 1; }
.plate--pair    { aspect-ratio: 4 / 3; }
.plate--trio    { aspect-ratio: 4 / 5; }
.plate--stack   { aspect-ratio: 3 / 4; }

.plate__caption {
  margin-top: 10px;
  font-size: var(--fs-nano);
  color: var(--fg-soft);
}

.entry__note { margin-top: 96px; }

.entry__note-copy {
  font-size: var(--fs-micro);
  line-height: 1.6;
}

/* --------------------------------------------------------------------- about */

.about__stage { padding-top: 70px; }

.about__portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f4f4f4;
}

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

.about__copy {
  margin-top: 58px;
  font-size: var(--fs-micro);
  line-height: 1.6;
}

.about__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-nano);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.about__list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
}
.about__list li:first-child { border-top: 1px solid var(--rule); }

.about__list span { color: var(--fg-soft); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .index { row-gap: 56px; }
  .drop-1, .drop-2, .drop-3 { margin-top: 0; }
}

@media (max-width: 860px) {
  :root { --edge: 18px; --gutter: 12px; }

  .masthead,
  .colophon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }
  .masthead__cell--end,
  .colophon__cell--end { text-align: left; }

  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index > * { grid-column: span 2 !important; }

  .entry__head { padding-top: 46px; }
  .entry__head > *,
  .entry__note > * { grid-column: 1 / -1 !important; }

  .plate--hero { aspect-ratio: 3 / 2; }

  .about__stage > * { grid-column: 1 / -1 !important; }
  .about__portrait { aspect-ratio: 3 / 4; }

  .home__stage { min-height: 0; padding: 56px 0 40px; }
  .home__plus { display: none; }
}
