/*
 * omayoglu.com — personal site stylesheet.
 * Hand-written, no framework. Light-first; dark is the same system re-toned,
 * not a second brand. One accent, used only for live status, primary action
 * and focus. Mobile-first, one breakpoint at 900px.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  --bg:        #f1f0ec;
  --surface:   #fbfaf9;
  --surface-2: #e8e6e0;
  --line:      #dcd9d2;
  --text:      #16171a;
  --muted:     #5a5d64;
  --accent:    #b4380f;
  --accent-ink:#ffffff;
  --maxw:      64rem;
  --r:         0.5rem;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:        #131417;
  --surface:   #1b1d21;
  --surface-2: #232529;
  --line:      #2e3137;
  --text:      #eceef1;
  --muted:     #9ba1aa;
  --accent:    #ff7a45;
  --accent-ink:#17181b;
  color-scheme: dark;
}

/* Light is the default for everyone, deliberately — the OS dark preference is
   NOT auto-honoured here. Dark is available, but only when explicitly chosen. */

* { box-sizing: border-box; }

html {
  transition: background-color 0.2s ease, color 0.2s ease;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ------------------------------------------------------------------ type */

h1, h2, h3 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 5.2vw + 0.5rem, 3.75rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: 17ch;
}

.mono, .eyebrow, .chip, .reg-meta, .node-label, .foot-note {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Section headings: a number, then the name. The number is the kicker, so
   the heading itself stays a real heading rather than a tracked-out label. */
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.75rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--line);
}
.eyebrow b {
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.eyebrow span {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.75rem;
}
.brand {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.avail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
@media (max-width: 640px) { .avail .avail-text { display: none; } }

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  flex: none;
}
.dot.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.tbtn {
  font: 500 0.75rem/1 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tbtn:hover { color: var(--text); border-color: var(--muted); }

/* ------------------------------------------------------------------ hero */

.hero { padding-block: 3.5rem 2rem; }
@media (min-width: 900px) { .hero { padding-block: 4.5rem 2.5rem; } }

.hero-grid { display: grid; gap: 3rem; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; }
}

.lead {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 46ch;
}
.lead strong { color: var(--text); font-weight: 600; }

.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.625rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 600 0.9375rem/1 'Manrope', system-ui, sans-serif;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--muted); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover { filter: brightness(1.07); border-color: var(--accent); }
.btn svg { width: 1rem; height: 1rem; }

/* -------------------------------------------------- signature: topology */

/* Every node is one live production system and a real link. The map is the
   navigation — rewrite the nodes and the signature is gone, which is the
   point of having it. */
.topo { width: 100%; height: auto; display: block; overflow: visible; }
.topo-edge {
  stroke: var(--line);
  stroke-width: 1.25;
  fill: none;
  stroke-dasharray: var(--len, 200);
  stroke-dashoffset: var(--len, 200);
  animation: draw 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 70ms);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.topo-node circle.ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.35;
  transform-box: fill-box;
  transform-origin: center;
  animation: ringpulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.35s);
}
@keyframes ringpulse {
  0%, 100% { transform: scale(1);    opacity: 0.35; }
  50%      { transform: scale(1.22); opacity: 0.05; }
}
.topo-node circle.core {
  fill: var(--accent);
  transition: r 0.18s ease;
}
.topo-node.platform circle.core { fill: var(--muted); }
.topo-node.platform circle.ring { stroke: var(--muted); }
.topo-node .node-label {
  font-size: 8.5px;
  fill: var(--text);
  letter-spacing: 0.02em;
}
.topo-node .node-sub {
  font-size: 6.5px;
  fill: var(--muted);
  font-family: 'DM Mono', ui-monospace, monospace;
}
.topo-node { cursor: pointer; }
.topo-node:hover circle.core, .topo-node:focus-visible circle.core { r: 6.5; }
.topo-node:hover .node-label { fill: var(--accent); }
.topo-node:focus { outline: none; }
.topo-node:focus-visible .node-label { fill: var(--accent); }

.topo-cap {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* ----------------------------------------------------------- work: bento */

.block { padding-block: 3.5rem 0; }

.bento { display: grid; gap: 1.25rem; }
@media (min-width: 900px) {
  .bento { grid-template-columns: 1.2fr 1fr; }
  .cell-a { grid-column: 1 / -1; }
}

.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.2s ease;
}
@media (min-width: 900px) {
  .cell { padding: 1.875rem; }
  .cell-b { min-height: 20rem; }
  .cell-c { min-height: 16rem; }
}
.cell:hover { border-color: var(--muted); }

.cell-a { border-left: 3px solid var(--accent); }

.cell h3 { font-size: 1.375rem; margin-bottom: 0.25rem; }
.cell-a h3 { font-size: 1.75rem; }
.cell p {
  margin: 0.625rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.62;
  max-width: 62ch;
}
.cell .outcome {
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

.chips {
  list-style: none;
  margin: 1.125rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.875rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.cell-foot {
  margin-top: auto;
  padding-top: 1.125rem;
}
.cell .chips + .cell-foot { padding-top: 0.875rem; }

/* Underline wipes in from the left on hover — no lift, no shadow bloom. */
.live-link {
  display: inline-block;
  font: 500 0.875rem/1.4 'DM Mono', ui-monospace, monospace;
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: background-size 0.22s ease-out;
}
.live-link:hover, .live-link:focus-visible { background-size: 100% 1.5px; }
.live-link::after { content: " \2192"; }

.foot-note { font-size: 0.75rem; color: var(--muted); }

/* ------------------------------------------------- platforms: registry */

.registry {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
}
.reg-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.reg-row:last-child { border-bottom: none; }
@media (min-width: 900px) {
  .reg-row { grid-template-columns: 1.1fr 1fr 1.4fr auto; }
}
.reg-name {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
}
.reg-meta { font-size: 0.75rem; color: var(--muted); }
.reg-desc { font-size: 0.875rem; color: var(--muted); }

/* --------------------------------------------------------- prose blocks */

.prose p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--muted);
  max-width: 64ch;
}
.prose p strong { color: var(--text); font-weight: 600; }

.contact-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.contact-item .k {
  font: 500 0.6875rem/1 'DM Mono', ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-item a { color: var(--accent); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

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

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ------------------------------------------------------------- reveal */

/* Content is visible by default; the observer only adds motion. If JS never
   runs, nothing is hidden. */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0.01;
  transform: translateY(14px);
  transition: opacity 480ms cubic-bezier(0.22,1,0.36,1),
              transform 480ms cubic-bezier(0.22,1,0.36,1);
}
.js .reveal.in { opacity: 1; transform: none; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .topo-edge { stroke-dashoffset: 0; }
}
