/* =================================================================
   LOBBY — Editorial / Magazine
   Kendi başına ayakta duran stylesheet. main.css'e bağımlı değildir.
   Not: Google Fonts <link> olarak HTML <head>'inde yükleniyor (perf).
   ================================================================= */

:root {
  /* --- Paper palette --- */
  --paper: #f6f1e7;
  --paper-dim: #ebe4d4;
  --paper-tint: #efe8d9;
  --paper-dark: #1a1716;
  --ink: #171412;
  --ink-mute: #5c544b;
  --ink-soft: #8a8278;
  --rule: #d9d0bd;
  --rule-strong: #221d18;

  /* Accent — print terracotta */
  --accent: #b2401f;
  --accent-dim: rgba(178,64,31,0.08);

  /* Status */
  --status-done: #5a6a3d;
  --status-active: #b2401f;
  --status-soon: #8a8278;

  --f-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; font-size: 16px; overflow-x: clip; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
  /* Subtle paper noise */
  background-image:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(178,64,31,0.03), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(90,106,61,0.03), transparent 70%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

/* --- Grain overlay (subtle) --- */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: multiply;
}

/* --- Container --- */
.sheet {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  position: relative;
  z-index: 2;
}

/* --- Masthead --- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper), transparent 10%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 1rem clamp(1.5rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.masthead-brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 0.75rem;
}
.masthead-brand .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  transform: translateY(-2px);
}
.masthead-brand .sub {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 0.75rem;
  border-left: 1px solid var(--rule);
}
.masthead-nav {
  display: flex; align-items: center; gap: 2rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.masthead-nav a {
  position: relative;
  transition: color 180ms var(--ease);
}
.masthead-nav a:hover { color: var(--ink); }
.masthead-nav a.active { color: var(--accent); }
.masthead-nav .num {
  display: inline-block; opacity: 0.5; margin-right: 0.3rem;
}

/* --- Cover / Opening Spread --- */
.cover {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
}

.cover-top {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  flex-wrap: wrap; gap: 1rem;
}
.cover-top .issue { font-weight: 500; color: var(--ink); }
.cover-top .date { }

.cover-eyebrow {
  margin-top: 2.5rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}

.cover-headline {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 11vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-top: 2rem;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  overflow-wrap: break-word;
}
.cover-headline em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.cover-headline .line {
  display: block;
  overflow: hidden;
}
.cover-headline .line span {
  display: inline-block;
  transform: translateY(100%);
  animation: rise 900ms var(--ease) forwards;
}
.cover-headline .line:nth-child(2) span { animation-delay: 120ms; }
@keyframes rise {
  to { transform: translateY(0); }
}

/* --- Dek (summary paragraph) --- */
.cover-dek {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.cover-dek p {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 42ch;
  font-variation-settings: "opsz" 20;
}
.cover-dek p strong { font-weight: 600; }
.cover-dek p em { color: var(--accent); font-style: italic; }

.byline {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  min-width: 160px;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
}
.byline .label {
  display: block;
  font-size: 0.68rem;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
}
.byline .name {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.byline ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.byline li { font-size: 0.72rem; color: var(--ink-mute); }

/* --- Section labels --- */
.rubric {
  display: flex; align-items: baseline;
  gap: 1rem;
  margin: clamp(4rem, 8vw, 6rem) 0 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
}
.rubric .no { color: var(--accent); font-weight: 600; }
.rubric .title { color: var(--ink); font-weight: 500; }
.rubric .flex { flex: 1; }
.rubric .count {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* --- Contents (ödev listesi) --- */
.toc { padding-bottom: 2rem; }

.entry {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(2rem, 4vw, 2.75rem) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: background 300ms var(--ease);
}
.entry:first-of-type { border-top: none; }
.entry:last-of-type { border-bottom: 1px solid var(--rule); }
.entry::before {
  content: ''; position: absolute;
  left: -1rem; right: -1rem; top: 0; bottom: 0;
  background: var(--paper-tint);
  opacity: 0; pointer-events: none;
  transition: opacity 300ms var(--ease);
  z-index: -1;
  border-radius: 4px;
}
.entry:hover::before { opacity: 1; }
.entry:hover .entry-arrow { transform: translateX(6px); color: var(--accent); }
.entry:hover .entry-title { color: var(--accent); }

/* Disabled (soon) entry */
.entry--soon { cursor: default; opacity: 0.75; }
.entry--soon:hover::before { opacity: 0; }
.entry--soon:hover .entry-arrow { transform: none; color: var(--ink-soft); }
.entry--soon:hover .entry-title { color: var(--ink); }

/* --- Ghost / Bekleniyor entry --- */
.entry--waiting {
  cursor: default;
  border-top: 1px dashed var(--rule) !important;
  position: relative;
}
.entry--waiting:last-of-type {
  border-bottom: 1px dashed var(--rule) !important;
}
.entry--waiting:hover::before { opacity: 0; }
.entry--waiting:hover .entry-arrow { transform: none; }
.entry--waiting:hover .entry-title { color: var(--ink-mute); }

/* Subtle horizontal shimmer across the ghost card */
.entry--waiting::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -100%;
  width: 60%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(178,64,31,0.04) 50%,
    transparent 100%);
  animation: ghost-shimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ghost-shimmer {
  0% { left: -60%; }
  60%, 100% { left: 110%; }
}

/* Faded number */
.entry--waiting .ghost-num {
  color: var(--ink-soft);
  opacity: 0.5;
  animation: ghost-pulse 3s ease-in-out infinite;
  display: inline-block;
}
@keyframes ghost-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}
.entry--waiting .entry-num .sup {
  color: var(--ink-soft);
}

/* Redacted bars — placeholder text that looks "censored" */
.entry--waiting .redacted {
  display: inline-block;
  background: linear-gradient(90deg,
    var(--rule) 25%,
    var(--paper-deep) 50%,
    var(--rule) 75%);
  background-size: 200% 100%;
  color: transparent !important;
  user-select: none;
  padding: 0 4px;
  border-radius: 1px;
  animation: redacted-shift 2.5s linear infinite;
  letter-spacing: -0.1em;
  font-family: var(--f-mono);
  font-size: 0.85em;
}
.entry-meta .redacted {
  min-width: 60px;
}
@keyframes redacted-shift {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Title — muted color + animated trailing dots */
.entry--waiting .entry-title {
  color: var(--ink-mute);
  font-style: italic;
  display: flex;
  align-items: baseline;
  gap: 0.1em;
  flex-wrap: wrap;
}

/* Animated pending dots */
.pending-dots {
  display: inline-flex;
  gap: 2px;
  margin-left: 2px;
}
.pending-dots span {
  display: inline-block;
  animation: pending-dot 1.4s ease-in-out infinite;
  color: var(--accent);
  font-weight: 400;
}
.pending-dots span:nth-child(1) { animation-delay: 0s; }
.pending-dots span:nth-child(2) { animation-delay: 0.2s; }
.pending-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pending-dot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.pending-dots--big span {
  font-size: 1.4em;
  line-height: 1;
}

/* Meta rows faded */
.entry--waiting .entry-meta {
  color: var(--ink-soft);
}
.entry--waiting .entry-meta strong {
  color: var(--ink-mute);
}

/* Desc faded + italic emphasis */
.entry--waiting .entry-desc {
  color: var(--ink-soft);
}
.entry--waiting .entry-desc em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

/* Status chip — "bekleniyor" */
.status--waiting {
  color: var(--ink-soft);
  border-style: dashed;
  position: relative;
}
.status--waiting .pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-ring 1.8s ease-out infinite;
  position: relative;
}
.status--waiting .pulse-dot::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-ring-shadow 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes pulse-ring-shadow {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Arrow replaced by big ellipsis */
.waiting-arrow {
  color: var(--ink-soft);
  font-size: 1.1em;
  letter-spacing: 0.2em;
}

.entry-num {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
}
.entry-num .sup {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.4rem;
}

.entry-body {}
.entry-kicker {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.entry-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 0.9rem;
  transition: color 200ms var(--ease);
  font-variation-settings: "opsz" 60;
}
.entry-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-mute);
  max-width: 54ch;
  margin-bottom: 1.25rem;
}
.entry-meta {
  display: flex; flex-wrap: wrap;
  gap: 0 2rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.entry-meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.entry-meta strong { color: var(--ink); font-weight: 500; }

.entry-side {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 1.5rem;
  text-align: right;
  min-width: 120px;
}

.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border: 1px solid currentColor;
}
.status--done   { color: var(--status-done); }
.status--active { color: var(--status-active); }
.status--soon   { color: var(--status-soon); }
.status .mark { font-size: 0.9em; }
.status--active .mark { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.entry-arrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  font-weight: 500;
  transition: transform 240ms var(--ease), color 200ms var(--ease);
}
.entry-arrow .ar {
  font-family: var(--f-mono);
  font-size: 1.1em;
}

/* --- Marginalia / fun fact --- */
.aside-fact {
  margin: 4rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  align-items: baseline;
}
.aside-fact-label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
}
.aside-fact-text {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 60ch;
}

/* --- Timeline (editorial style) --- */
.timeline-ed {
  padding: 0 0 3rem;
}
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 2rem;
  position: relative;
  padding-top: 2.5rem;
}
.timeline-grid::before {
  content: ''; position: absolute;
  left: 0; right: 0; top: 2.5rem;
  height: 1px;
  background: var(--rule-strong);
}
.tl-point {
  padding: 1.75rem 1rem 0 0;
  position: relative;
  border-right: 1px dashed var(--rule);
}
.tl-point:last-child { border-right: none; }
.tl-point::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 10px; height: 10px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.tl-point.done::before { background: var(--status-done); border-color: var(--status-done); }
.tl-point.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.tl-point.future::before { background: var(--paper); border-style: dashed; }

.tl-date {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.tl-label {
  font-family: var(--f-display);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tl-point.future .tl-label { color: var(--ink-soft); }

/* --- Timeline note --- */
.timeline-note {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--rule);
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 56ch;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 20;
}
.timeline-note em {
  font-style: italic;
  color: var(--accent);
}

/* --- Colophon / footer --- */
.colophon {
  margin-top: 5rem;
  padding: 3rem 0 2rem;
  border-top: 3px double var(--rule-strong);
}
.colophon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.colophon-text {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 42ch;
  font-style: italic;
}
.colophon-text strong { color: var(--ink); font-style: normal; font-weight: 600; }
.colophon-meta {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-align: right;
}
.colophon-meta p { margin-bottom: 0.4rem; }
.colophon-meta p:first-child { color: var(--ink); font-weight: 500; }
.colophon-rule {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  flex-wrap: wrap; gap: 1rem;
}
.colophon-rule .sig {
  display: flex; align-items: center; gap: 0.5rem;
}
.colophon-rule .sig .dot {
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

/* --- Entrance animations --- */
.rise {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.rise.in { opacity: 1; transform: none; }
.rise[data-d="1"] { transition-delay: 100ms; }
.rise[data-d="2"] { transition-delay: 200ms; }
.rise[data-d="3"] { transition-delay: 300ms; }
.rise[data-d="4"] { transition-delay: 400ms; }

/* --- Responsive --- */
@media (max-width: 820px) {
  .masthead-nav { display: none; }
  .cover-dek { grid-template-columns: 1fr; }
  .byline { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 1.5rem; min-width: 0; }
  .entry { grid-template-columns: 1fr; gap: 1.5rem; }
  .entry-side { align-items: flex-start; text-align: left; flex-direction: row; justify-content: space-between; }
  .entry-num { font-size: 2.6rem; }
  .timeline-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 0; }
  .colophon-grid { grid-template-columns: 1fr; gap: 2rem; }
  .colophon-meta { text-align: left; }
  .aside-fact { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 480px) {
  .cover-top { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .cover-headline { font-size: clamp(2.2rem, 10vw, 3.5rem); letter-spacing: -0.03em; }
  .cover-dek p { font-size: 1.05rem; }
  .cover { padding-top: 2rem; padding-bottom: 1.5rem; }
  .lobby-id { padding: 0.75rem 1rem; gap: 0.75rem; }
  .lobby-id-avatar { width: 36px; height: 36px; font-size: 0.95rem; }
  .masthead-brand { font-size: 0.9rem; gap: 0.5rem; }
  .masthead-brand .sub { padding-left: 0.5rem; font-size: 0.65rem; }
  .rubric { font-size: 0.72rem; letter-spacing: 0.1em; gap: 0.5rem; }
  .entry { padding: 1.5rem 0; }
  .entry-num { font-size: 2.2rem; }
  .entry-title { font-size: 1.4rem; }
  .entry-desc { font-size: 0.95rem; }
  .entry-meta { gap: 0 1rem; font-size: 0.7rem; }
  .timeline-grid { grid-template-columns: 1fr; }
  .tl-point { border-right: none; border-bottom: 1px dashed var(--rule); padding: 1.5rem 0; }
  .tl-point::before { top: 1.5rem; }
  .tl-point:last-child { border-bottom: none; }
  .timeline-grid::before { display: none; }
}
