/* ==========================================================================
   celaltopcu.com
   Warm graphite + oxide. Hairlines, no cards, no shadows, no glow.
   Headings Archivo / body Source Serif 4 / data IBM Plex Mono.
   ========================================================================== */

:root {
  --paper:      #191714;
  --paper-2:    #201d19;
  --rule:       #332e27;
  --rule-soft:  #262220;
  --ink:        #eae6df;
  --ink-dim:    #a9a196;
  --ink-faint:  #776f64;
  --oxide:      #d46a3c;
  --oxide-ink:  #1a0f09;
  --sel:        rgba(212, 106, 60, 0.26);

  --measure: 66ch;
  --container: 1080px;
  --gutter: 7.5rem;
  --gap: 2.75rem;
}

html.theme-light {
  --paper:      #f4f1ea;
  --paper-2:    #fffdf8;
  --rule:       #d9d1c2;
  --rule-soft:  #e7e0d3;
  --ink:        #1b1a17;
  --ink-dim:    #55504a;
  --ink-faint:  #8a8278;
  --oxide:      #b24a22;
  --oxide-ink:  #fffdf8;
  --sel:        rgba(178, 74, 34, 0.18);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--sel); }

h1, h2, h3, h4 {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

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

.prose a,
a.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--oxide);
  transition: color 0.15s ease;
}
.prose a:hover,
a.link:hover { color: var(--oxide); }

strong { font-weight: 600; color: var(--ink); }

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

/* --- language switch ---------------------------------------------------- */
html.lang-en .t-tr { display: none; }
html.lang-tr .t-en { display: none; }

/* --- shell -------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Header
   ========================================================================== */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 60px;
}

.logo {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-right: auto;
}
.logo .mark {
  color: var(--oxide);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-dim);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--oxide);
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--oxide);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink-faint);
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  transition: color 0.15s ease;
}
.icon-btn:hover { color: var(--oxide); }
.icon-btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
html.theme-light .theme-toggle .icon-sun { display: none; }
html.theme-light .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle span {
  display: block;
  width: 17px; height: 1px;
  background: currentColor;
  margin: 3px 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 5.5rem 28px 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 3.5rem;
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
}
.hero h1::after {
  content: "";
  display: block;
  width: 52px;
  height: 2px;
  background: var(--oxide);
  margin-top: 1.1rem;
}

.hero-sub {
  max-width: 54ch;
  font-size: 1.1875rem;
  color: var(--ink-dim);
  margin-bottom: 1.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.4rem;
}

.hero-photo img {
  width: 168px;
  height: 168px;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 2px;
  filter: saturate(0.92);
}
.hero-photo figcaption { margin-top: 0.6rem; }

/* dated "now" note */
.now {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  max-width: 58ch;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1.5rem;
}
.now p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-dim);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  border: 1px solid var(--oxide);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--oxide);
  color: var(--oxide-ink);
}
.btn-primary:hover { background: transparent; color: var(--oxide); }
.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--rule);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: 3.6rem 28px;
  border-top: 1px solid var(--rule);
}

.section-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 2.2rem;
}

.section-lead {
  max-width: var(--measure);
  color: var(--ink-dim);
  margin-bottom: 2.4rem;
}

/* two-column entry: mono meta in the gutter, content in the column */
.entry {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  gap: 0 var(--gap);
  padding: 2.1rem 0;
  border-top: 1px solid var(--rule-soft);
}
.entry.first { border-top: 0; padding-top: 0; }

.entry-meta {
  text-align: right;
  padding-top: 0.3rem;
}
.entry-meta span { display: block; }

.entry-body { min-width: 0; }
.entry-body > h3 {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}
.entry-org {
  font-size: 0.95rem;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}
.entry-body .prose { max-width: var(--measure); color: var(--ink-dim); }

/* hanging-indent list, em dash instead of bullet dots */
.ticks {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  max-width: var(--measure);
}
.ticks li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.55rem;
  color: var(--ink-dim);
}
.ticks li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--oxide);
}
.ticks li:last-child { margin-bottom: 0; }

/* stack line, slash separated — not pills */
.stack {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 1.1rem;
  line-height: 1.9;
}
.stack > * + *::before {
  content: " / ";
  color: var(--rule);
}
.stack a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-decoration-color: var(--oxide);
  text-underline-offset: 3px;
}
.stack a:hover { color: var(--oxide); }

/* ==========================================================================
   Figures
   ========================================================================== */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.4rem;
  margin-top: 1.7rem;
}
figure { margin: 0; }
figure img {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper-2);
  transition: border-color 0.15s ease;
}
a:hover figure img { border-color: var(--oxide); }
figcaption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--ink-faint);
  margin-top: 0.5rem;
}
figcaption .fig-no { color: var(--oxide); }

/* ==========================================================================
   Definition table (facts, skills, coursework)
   ========================================================================== */
.deftable { border-top: 1px solid var(--rule); }
.deftable > div {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 0 var(--gap);
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.deftable dt,
.deftable .dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding-top: 0.18rem;
  margin: 0;
}
.deftable dd,
.deftable .dd {
  margin: 0;
  color: var(--ink-dim);
}

.runin {
  color: var(--ink-faint);
  font-size: 0.95rem;
  max-width: var(--measure);
}

/* ==========================================================================
   Timeline — mono dates in the gutter, one hairline per entry
   ========================================================================== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline > li {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  gap: 0 var(--gap);
  padding: 1.9rem 0;
  border-top: 1px solid var(--rule-soft);
}
.timeline > li:first-child { border-top: 0; padding-top: 0; }

.sub-head {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0;
  margin: 3rem 0 1.4rem;
}
.sub-head.first { margin-top: 0; }

/* ==========================================================================
   Writing list
   ========================================================================== */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.post-list li { border-bottom: 1px solid var(--rule-soft); }
.post-list a {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  gap: 0 var(--gap);
  padding: 1.25rem 0;
}
.post-list a:hover .post-title { color: var(--oxide); }
.post-title {
  display: block;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  transition: color 0.15s ease;
}
.post-dek {
  display: block;
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin-top: 0.25rem;
  max-width: 62ch;
}

/* ==========================================================================
   Publication / callout
   ========================================================================== */
.callout {
  border-left: 2px solid var(--oxide);
  padding: 0.2rem 0 0.2rem 1.4rem;
  max-width: 76ch;
  color: var(--ink-dim);
  font-size: 1rem;
}
.callout cite {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}
.cite-actions { margin-top: 0.9rem; }
.copy-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-faint);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--oxide); border-color: var(--oxide); }

/* brand mark inline */
.brand-mark-sm {
  width: 20px; height: 20px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 0.45rem;
}

/* ==========================================================================
   Contact + footer
   ========================================================================== */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.footer {
  border-top: 1px solid var(--rule);
  padding: 1.7rem 0 2.4rem;
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: baseline;
  justify-content: space-between;
}
.footer p { margin: 0; }
.footer a { color: var(--ink-faint); }
.footer a:hover { color: var(--oxide); }

/* ==========================================================================
   Article / subpage
   ========================================================================== */
.article {
  max-width: 72ch;
  margin: 0 auto;
  padding: 4rem 28px 3rem;
}
.article h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.8rem;
}
.article-meta { margin-bottom: 2.4rem; }
.article h2 {
  font-size: 1.1875rem;
  margin: 2.6rem 0 0.8rem;
}
.article h3 {
  font-size: 1.0625rem;
  margin: 1.9rem 0 0.6rem;
}
.article p,
.article li { color: var(--ink-dim); }
.article ul,
.article ol { padding-left: 1.3rem; margin: 0 0 1.05em; }
.article li { margin-bottom: 0.4rem; }
.article figure { margin: 2rem 0; }
.article blockquote {
  margin: 1.8rem 0;
  border-left: 2px solid var(--oxide);
  padding-left: 1.4rem;
  color: var(--ink-dim);
}
.article code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  padding: 0.08em 0.35em;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.95rem;
}
.article th,
.article td {
  text-align: left;
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-dim);
  vertical-align: top;
}
.article th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--ink-faint);
  border-bottom-color: var(--rule);
}
.backlink {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.backlink:hover { color: var(--oxide); }

/* ==========================================================================
   Reveal on scroll — only when JS is present
   ========================================================================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  :root { --gutter: 6rem; --gap: 1.8rem; }
  .deftable > div { grid-template-columns: 10rem minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .nav { position: relative; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 28px 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.6rem 0; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 3.2rem;
    gap: 2.2rem;
  }
  .hero-photo { order: -1; }
  .hero-photo img { width: 116px; height: 116px; }

  .now { grid-template-columns: 1fr; gap: 0.35rem; }

  .entry,
  .timeline > li,
  .post-list a {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .entry-meta { text-align: left; padding-top: 0; }
  .entry-meta span { display: inline; }
  .entry-meta span + span::before { content: " \2014 "; color: var(--rule); }

  .deftable > div { grid-template-columns: 1fr; gap: 0.3rem; }

  .section { padding: 2.6rem 28px; }
  body { font-size: 1.03125rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav-wrap, .footer, .hero-actions, .contact-links, .icon-btn, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { border-top: 1px solid #ccc; padding: 1rem 0; }
  a { text-decoration: none; color: #000; }
}
