/* ==========================================================================
   Tuna Kocayurt — a relational field
   Three typographic registers:
     Spectral      — the voice of thought (prose, concepts, statements)
     Archivo       — the institutional voice (navigation, wall labels)
     IBM Plex Mono — the notation layer (relations, indices, metadata)
   ========================================================================== */

:root {
  /* Ground: a cool gallery paper. Deliberately not cream. */
  --paper:      #f3f3ef;
  --paper-warm: #ecece6;
  --paper-pure: #fbfbf9;

  /* Ink */
  --ink:      #15161a;
  --graphite: #74767c;
  --faint:    #c6c7c2;
  --hairline: #d9dad4;

  /* The annotation ink. Used only where a relation is active. */
  --ultra:      #2434ae;
  --ultra-soft: rgba(36, 52, 174, 0.14);

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 63ch;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --band: clamp(4.5rem, 11vw, 9.5rem);
  --rule: 1px solid var(--hairline);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------- base --- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 300; line-height: 1.1; margin: 0; }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--ultra);
  outline-offset: 3px;
}

/* height:auto is load-bearing — without it the width/height attributes
   fight a CSS width and the image renders stretched. */
img { max-width: 100%; height: auto; display: block; }

hr {
  border: 0;
  border-top: var(--rule);
  margin: 0;
}

/* Utility registers */
.mono {
  font-family: var(--mono);
  font-size: 0.688rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite);
  line-height: 1.5;
}

.label {
  font-family: var(--sans);
  font-size: 0.688rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--graphite);
}

.shell {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

.link-underline {
  border-bottom: 1px solid var(--hairline);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.link-underline:hover { color: var(--ultra); border-bottom-color: var(--ultra); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------- navigation --- */

.masthead {
  border-bottom: var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.15rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.0625rem;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 3vw, 2.4rem);
}

.nav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--graphite);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ultra);
}

/* -------------------------------------------------------------- layout --- */

.band { padding-block: var(--band); }
.band-tight { padding-block: clamp(3rem, 7vw, 5.5rem); }

.page-head { margin-bottom: clamp(2.75rem, 6vw, 5rem); }

.page-head .label { display: block; margin-bottom: 1.75rem; }

.statement {
  font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3.15rem);
  font-weight: 200;
  line-height: 1.16;
  letter-spacing: -0.012em;
  max-width: 19ch;
}

.statement em { font-style: italic; font-weight: 300; }

.lede {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: 1.0625em;
  color: #34363c;
}

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

.hero { margin: 0; }

.hero-line {
  display: block;
  font-size: clamp(2.1rem, 1.1rem + 4.4vw, 4.6rem);
  font-weight: 200;
  line-height: 1.06;
  letter-spacing: -0.021em;
}

.hero-quiet { color: var(--graphite); }
.hero-line .conj { color: var(--graphite); font-style: italic; }

.hero-note {
  margin-top: 2.25rem;
  max-width: 44ch;
  color: var(--graphite);
  font-size: 0.9375rem;
}

/* ----------------------------------------------------------- the field --- */

.field {
  margin: clamp(3rem, 7vw, 5.5rem) 0 0;
  padding: 0;
}

.field-frame {
  position: relative;
  border-top: var(--rule);
  border-bottom: var(--rule);
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
}

.field svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Edges */
.edge {
  stroke: var(--faint);
  stroke-width: 1;
  fill: none;
  transition: stroke 0.45s var(--ease), stroke-width 0.45s var(--ease), opacity 0.45s var(--ease);
}
.edge.is-lit {
  stroke: var(--ultra);
  stroke-width: 1.25;
}
.edge.is-dim { opacity: 0.28; }

/* Edge labels — the relation named */
.edge-label {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.04em;
  fill: var(--ultra);
  text-anchor: middle;
  dominant-baseline: middle;
  opacity: 0;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
  transition: opacity 0.35s var(--ease);
}
.edge-label.is-shown { opacity: 1; }

/* Nodes */
.node { cursor: pointer; }
.node text {
  font-family: var(--serif);
  font-weight: 300;
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: middle;
  transition: fill 0.4s var(--ease), opacity 0.4s var(--ease);
}
.node .hit { fill: transparent; }

.node.is-dim text { fill: var(--faint); }
.node.is-near text { fill: var(--ink); }
.node.is-active text { fill: var(--ultra); font-weight: 400; }

.node:focus { outline: none; }
.node:focus-visible .hit {
  fill: var(--ultra-soft);
  rx: 3;
}

/* The readout — where the selected concept is written out */
.readout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  margin: 0;
  padding-top: clamp(1.5rem, 3.5vw, 2.5rem);
  min-height: 11rem; /* holds its height so hovering does not shift the page */
}

.readout-term {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.1;
  margin: 0;
  transition: opacity 0.3s var(--ease);
}

.readout-def {
  margin: 0;
  max-width: 56ch;
  font-size: 1.0625em;
  color: #34363c;
  transition: opacity 0.3s var(--ease);
}

.readout-rel {
  margin: 0;
  max-width: 62ch;
  color: var(--ultra);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
  line-height: 1.85;
}

.readout.is-idle .readout-term { color: var(--graphite); font-style: normal; }

@media (min-width: 900px) {
  .readout {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .readout-label { grid-column: 1; grid-row: 1; }
  .readout-term  { grid-column: 1; grid-row: 2; }
  .readout-def   { grid-column: 2; grid-row: 1 / span 2; }
  .readout-rel   { grid-column: 2; grid-row: 3; }
}

/* ------------------------------------------------------------ approach --- */

.lens {
  display: grid;
  gap: 1.5rem clamp(2rem, 6vw, 5.5rem);
  padding-block: clamp(2.5rem, 5.5vw, 4.25rem);
  border-top: var(--rule);
}

.lens:last-of-type { border-bottom: var(--rule); }

.lens-name {
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.4rem);
  font-weight: 200;
  letter-spacing: -0.014em;
  line-height: 1.05;
  margin: 0 0 0.9rem;
}

.lens-rel {
  text-transform: none;
  letter-spacing: 0.03em;
  color: var(--graphite);
  font-size: 0.7188rem;
  line-height: 1.8;
}
.lens-rel b { font-weight: 500; color: var(--ultra); }

.lens-body { max-width: var(--measure); }

@media (min-width: 860px) {
  .lens { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

/* ------------------------------------------------------------- writing --- */

.entry {
  display: block;
  padding-block: clamp(1.9rem, 4vw, 2.9rem);
  border-top: var(--rule);
  transition: background-color 0.3s var(--ease);
}
.entry:last-of-type { border-bottom: var(--rule); }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
  margin-bottom: 0.95rem;
}

.entry-kind { color: var(--ink); }
.entry-tags { color: var(--graphite); text-transform: none; letter-spacing: 0.03em; }

.entry-title {
  font-size: clamp(1.35rem, 1.05rem + 1.35vw, 2.1rem);
  font-weight: 300;
  letter-spacing: -0.012em;
  line-height: 1.12;
  margin: 0 0 0.75rem;
  transition: color 0.25s var(--ease);
}

.entry-abstract {
  max-width: var(--measure);
  color: #34363c;
  margin: 0;
}

a.entry:hover .entry-title,
a.entry:focus-visible .entry-title { color: var(--ultra); }

a.entry .entry-title::after {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 1px;
  background: var(--ultra);
  vertical-align: 0.28em;
  margin-left: 0.5em;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
a.entry:hover .entry-title::after,
a.entry:focus-visible .entry-title::after { transform: scaleX(1); }

.entry-static .entry-title { color: var(--ink); }
.entry-static .entry-abstract { color: var(--graphite); }

/* --------------------------------------------------------------- essay --- */

.essay-head { border-bottom: var(--rule); padding-bottom: clamp(2rem, 4vw, 3rem); }

/* Where a text came from, and in what language it was written. */
.origin {
  margin-top: 1.5rem;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.75;
  color: var(--graphite);
  max-width: 52ch;
}
.origin a { color: var(--ultra); border-bottom: 1px solid var(--ultra-soft); }
.origin a:hover { border-bottom-color: var(--ultra); }

.entry-origin { color: var(--graphite); text-transform: none; letter-spacing: 0.03em; }

.essay-end .origin { margin-top: 0; }
.essay-end .origin + p { margin-top: 1.25rem; }

.essay-title {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.35rem);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.018em;
  max-width: 17ch;
  margin: 1.5rem 0 0;
}

.essay-body {
  max-width: var(--measure);
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  font-size: 1.0938em;
  line-height: 1.72;
}

/* Book setting: indent marks the new paragraph, so the gap can close up. */
.essay-body > p { margin-bottom: 0.4em; }
.essay-body > p + p { text-indent: 1.5em; }

.essay-body h2 {
  font-size: 1.35em;
  font-weight: 400;
  font-style: italic;
  margin: 2.75em 0 0.9em;
  text-indent: 0;
}

.pull {
  margin: 2.5em 0;
  padding-left: 1.4em;
  border-left: 2px solid var(--ultra);
  font-size: 1.2em;
  font-style: italic;
  font-weight: 200;
  line-height: 1.4;
  color: var(--ink);
  text-indent: 0;
}

.essay-end {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: var(--rule);
}

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

.about-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); }
}

/* No frame: the circle is its own edge. */
.portrait {
  margin: 0;
  max-width: 16rem;
}

.portrait img {
  width: 100%;
  filter: grayscale(1) contrast(1.04);
}

.portrait figcaption { margin-top: 1.15rem; }

.about-body { max-width: var(--measure); }

.about-body p + p { margin-top: 1.15em; }

.practice {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.4rem;
  border-top: var(--rule);
}

.practice dl {
  display: grid;
  gap: 0.55rem 2rem;
  margin: 1.25rem 0 0;
}

@media (min-width: 640px) {
  .practice dl { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
}

.practice dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite);
  padding-top: 0.3em;
}

.practice dd { margin: 0 0 0.55rem; }

/* ------------------------------------------------------------- contact --- */

.contact-page { display: flex; flex-direction: column; min-height: 100vh; }
.contact-main { flex: 1; display: flex; align-items: center; }

.contact-list {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
}

/* A fixed label column, so every row breaks at the same place and the three
   values sit on one left edge. Stacks below the breakpoint rather than
   letting a long address wrap against a floated label. */
.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  padding-block: clamp(1.4rem, 3vw, 2.1rem);
  border-top: var(--rule);
}
.contact-row:last-of-type { border-bottom: var(--rule); }

@media (min-width: 620px) {
  .contact-row {
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 2rem;
    align-items: baseline;
  }
}

.contact-row dt { padding-top: 0.15em; }
.contact-row dd { margin: 0; min-width: 0; }

/* One treatment for all three values — same family, size, weight, colour. */
.contact-value {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 0.95rem + 1.35vw, 1.85rem);
  font-weight: 200;
  letter-spacing: -0.008em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: color 0.25s var(--ease);
}

.contact-note {
  margin: 1.75rem 0 0;
  color: var(--graphite);
}

.back-link { margin: 2.5rem 0 0; }

a.contact-value:hover, a.contact-value:focus-visible { color: var(--ultra); }


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

.colophon {
  border-top: var(--rule);
  margin-top: auto;
}

.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2.25rem;
}

.colophon a { color: var(--graphite); transition: color 0.25s var(--ease); }
.colophon a:hover { color: var(--ultra); }

/* ------------------------------------------------------------- motion --- */

@keyframes rise {
  from { opacity: 0; transform: translateY(0.7em); }
  to   { opacity: 1; transform: none; }
}

.rise {
  opacity: 0;
  animation: rise 1s var(--ease) forwards;
}
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.18s; }
.rise-3 { animation-delay: 0.31s; }
.rise-4 { animation-delay: 0.52s; }

.field svg { opacity: 0; animation: rise 1.4s var(--ease) 0.6s forwards; }

.reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .rise, .field svg { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
