/* tuncoztemir.com — dark editorial.
   Fraunces for the voice, Instrument Sans for the detail. One warm light in the dark. */

:root {
  --bg: #0B0A0D;
  --bg-lift: #121016;
  --text: #ECE7DD;
  --dim: #9A948A;
  --faint: #625C55;
  --gold: #C9A86A;
  --gold-soft: rgba(201, 168, 106, 0.16);
  --line: rgba(236, 231, 221, 0.10);
  --line-soft: rgba(236, 231, 221, 0.055);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* atmosphere: one warm light, and a whisper of grain */
body::before {
  content: "";
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 70vh;
  background: radial-gradient(60% 60% at 30% 0%, rgba(201, 168, 106, 0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: drift 26s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(236, 231, 221, 0.018) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}
@keyframes drift {
  from { transform: translateX(-4%) translateY(-2%); opacity: 0.8; }
  to   { transform: translateX(6%) translateY(3%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 54rem;
  margin: 0 auto;
  padding: 0 1.8rem;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--dim);
}
.topbar .mark { color: var(--text); }
.topbar nav a {
  color: var(--dim);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 160ms ease;
}
.topbar nav a:hover { color: var(--gold); }

/* ---------- hero ---------- */
.hero { padding: 7rem 0 4rem; }

.name {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 340;
  font-size: clamp(3.4rem, 9vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: var(--text);
}

.thesis {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 2.4rem;
  max-width: 20ch;
}
.thesis .it { font-style: italic; color: var(--gold); }

.sub {
  margin-top: 1.8rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--dim);
  max-width: 46ch;
}

.meta {
  margin-top: 2.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  align-items: center;
}
.meta a { color: var(--dim); text-decoration: none; transition: color 160ms ease; }
.meta a:hover { color: var(--gold); }
.meta .sep { color: var(--line); }

/* ---------- sections ---------- */
section { padding: 3.4rem 0; border-top: 1px solid var(--line-soft); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1.6rem;
}

.lead {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 24ch;
  margin-bottom: 1.6rem;
}

p.body { color: var(--dim); max-width: 54ch; }
p.body + p.body { margin-top: 1rem; }
p.body a, .inline-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
  transition: color 160ms ease;
}
p.body a:hover, .inline-link:hover { color: var(--gold); }

/* ---------- figures (editorial, not boxes) ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.4rem;
}
@media (max-width: 40rem) { .figures { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.4rem; } }
.fig .n {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.fig .n .u { font-size: 0.5em; color: var(--gold); letter-spacing: 0; margin-left: 0.05em; }
.fig .c {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--dim);
  max-width: 22ch;
}

/* ---------- work list (hanging labels, asymmetric) ---------- */
.work { display: grid; gap: 2.6rem; }
.entry { display: grid; grid-template-columns: 8rem 1fr; gap: 1.6rem; }
@media (max-width: 40rem) { .entry { grid-template-columns: 1fr; gap: 0.5rem; } }
.entry .tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.5rem;
}
.entry h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.entry p { color: var(--dim); max-width: 50ch; font-size: 1rem; }

/* ---------- creed (principles) ---------- */
.creed { display: grid; gap: 1.5rem; max-width: 40ch; }
.creed .line {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--text);
}
.creed .line .q { color: var(--gold); font-style: italic; }

/* ---------- footer ---------- */
footer { padding: 3.6rem 0 5rem; border-top: 1px solid var(--line-soft); }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.6rem; font-size: 0.92rem; }
.foot-links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 160ms ease;
}
.foot-links a:hover { border-color: var(--gold); }
.colophon { margin-top: 1.4rem; font-size: 0.8rem; color: var(--faint); max-width: 58ch; }

/* ---------- notes page ---------- */
.note-title {
  font-family: var(--display);
  font-weight: 340;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 18ch;
}
.note-lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  line-height: 1.3;
  color: var(--dim);
  margin-top: 1.4rem;
  max-width: 34ch;
}
.note-body { padding: 2.6rem 0; max-width: 60ch; }
.note-body h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 2.4rem 0 0.8rem;
}
.note-body p { margin-bottom: 1.05rem; color: var(--dim); }
.note-body p strong { color: var(--text); font-weight: 600; }
.note-body a { color: var(--text); border-bottom: 1px solid var(--gold); text-decoration: none; padding-bottom: 1px; }
.pull {
  font-family: var(--display);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.28;
  color: var(--text);
  margin: 2.2rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--gold);
  max-width: 30ch;
}
.back { font-size: 0.8rem; color: var(--dim); text-decoration: none; }
.back:hover { color: var(--gold); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(12px); animation: rise 800ms cubic-bezier(0.19, 1, 0.22, 1) forwards; }
  .d1 { animation-delay: 80ms; } .d2 { animation-delay: 200ms; }
  .d3 { animation-delay: 320ms; } .d4 { animation-delay: 440ms; }
  .d5 { animation-delay: 560ms; } .d6 { animation-delay: 680ms; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

@media print {
  body { background: #fff; color: #111; }
  body::before, body::after, .topbar nav { display: none; }
  .name, .thesis, .lead, .fig .n, .entry h3, .note-title { color: #111; }
  .thesis .it, .fig .n .u { color: #7a5c1a; }
}
