/* peter.kuna.hu — one stylesheet, no framework */
:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5b6070;
  --line: #e4e0d8;
  --biz: #2457d6;
  --fit: #d9541a;
  --games: #12823d;
  --accent: var(--ink);
  --radius: 14px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1a1d23;
    --ink: #eceae6;
    --muted: #a3a7b3;
    --line: #2b2f37;
    --biz: #7aa2ff;
    --fit: #ff8a4c;
    --games: #4be38a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--font);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { font-weight: 750; letter-spacing: -0.01em; text-decoration: none; font-size: 1.05rem; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 0.95rem; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--line); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; font-size: 1.2rem; cursor: pointer; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 780; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 740; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.muted { color: var(--muted); }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center; }
.hero-photo { border-radius: 24px; overflow: hidden; aspect-ratio: 4/5; background: #0b0b0c; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.hero h1 span { display: block; color: var(--muted); font-weight: 600; font-size: 0.5em; letter-spacing: -0.01em; margin-top: 0.4em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; padding: 0; list-style: none; }
.tags li { font-size: 0.9rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.tags .t-biz { color: var(--biz); } .tags .t-fit { color: var(--fit); } .tags .t-games { color: var(--games); }
@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { max-width: 340px; order: -1; aspect-ratio: 1/1; border-radius: 50%; width: 180px; }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; text-decoration: none; font-weight: 650; font-size: 0.97rem; border: 1px solid var(--line); background: var(--surface); }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { color: var(--bg); opacity: .9; }
.btn svg { width: 18px; height: 18px; }

/* Pillar cards */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--c); }
.pillar:hover { border-color: var(--c); color: inherit; }
.pillar .eyebrow { color: var(--c); }
.pillar p:not(.eyebrow) { color: var(--muted); flex: 1; }
.pillar .more { font-weight: 650; color: var(--c); }
.c-biz { --c: var(--biz); } .c-fit { --c: var(--fit); } .c-games { --c: var(--games); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* Page header */
.page-head { padding: 64px 0 40px; }
.page-head .lede { max-width: 60ch; }
.theme-biz { --accent: var(--biz); } .theme-fit { --accent: var(--fit); } .theme-games { --accent: var(--games); }

/* Generic grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 520px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px solid var(--line); }
.list-check li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* Media tiles (adventures, maps) */
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .15s ease; }
.tile:hover { transform: translateY(-3px); color: inherit; }
.tile img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.tile div { padding: 14px 16px 16px; }
.tile h3 { font-size: 1.02rem; margin: 0 0 4px; }
.tile p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.map-group { margin-top: 40px; }
.map-group header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.map-group h3 { margin: 0; }

/* Stats + timeline */
.stats .card { padding: 20px 22px; }
.stat { font-size: 2.2rem; font-weight: 780; letter-spacing: -0.03em; color: var(--accent); margin: 0 0 4px; line-height: 1.1; }
.stats .muted { font-size: 0.92rem; margin: 0; }
.timeline { list-style: none; margin: 32px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 0 0 32px 24px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline time { font-weight: 650; color: var(--muted); font-size: 0.95rem; padding-top: 2px; }
.timeline h3 { margin: 0 0 2px; }
.timeline p { margin: 0 0 6px; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Game showcase */
.game { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; margin-bottom: 48px; }
.game-shot img, .shot { border-radius: var(--radius); width: 100%; aspect-ratio: 16/9; object-fit: cover; box-shadow: 0 24px 50px -28px rgba(0,0,0,.5); }
.game .tags { margin: 16px 0 20px; }
@media (max-width: 860px) { .game { grid-template-columns: 1fr; gap: 20px; } }

/* Post list */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { border-bottom: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 22px 0; text-decoration: none; align-items: start; }
.posts img { aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: var(--line); }
.posts h3 { margin: 0 0 6px; }
.posts a:hover h3 { color: var(--accent); }
.posts p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.pill { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c, var(--muted)); }
@media (max-width: 560px) { .posts a { grid-template-columns: 1fr; gap: 12px; } .posts img { aspect-ratio: 16/9; } }

/* Article */
.article { padding: 56px 0 80px; }
.article h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.article .cover { border-radius: var(--radius); margin: 28px 0 36px; width: 100%; max-height: 460px; object-fit: cover; }
.prose { font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; }
.prose h2, .prose h3 { font-family: var(--font); margin-top: 1.6em; }
.prose img { border-radius: 10px; margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 10px; }
.back { display: inline-block; margin-top: 40px; font-weight: 650; text-decoration: none; color: var(--accent); }

/* Draft markers — remove when copy is final */
.todo { background: color-mix(in srgb, #f5c400 22%, transparent); border-radius: 4px; padding: 0 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.social a:hover { border-color: var(--ink); }
.social svg { width: 18px; height: 18px; }

.cta { text-align: center; }
.cta .lede { margin: 0 auto 28px; }
.cta .btns { justify-content: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* =====================================================================
   CALM (default): editorial, fewer boxes
   ===================================================================== */
.btn { border-radius: 8px; }
.nav a { border-radius: 6px; }
.tags li { border-radius: 6px; }
.card { background: none; border: 0; border-top: 2px solid var(--line); border-radius: 0; padding: 18px 0 0; }
.pillars { grid-template-columns: 1fr; gap: 0; }
.pillar { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px 32px; align-items: baseline; padding: 28px 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.pillar::before { display: none; }
.pillar .eyebrow { grid-column: 1; grid-row: 1; margin: 0; }
.pillar h3 { grid-column: 1; grid-row: 2; margin: 0; font-size: 1.5rem; }
.pillar p:not(.eyebrow) { grid-column: 2; grid-row: 1 / span 2; margin: 0; max-width: 56ch; }
.pillar .more { grid-column: 3; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.pillar:hover { border-color: var(--line); }
.pillar:hover h3 { color: var(--c); }
@media (max-width: 760px) {
  .pillar { grid-template-columns: 1fr; }
  .pillar .eyebrow, .pillar h3, .pillar p:not(.eyebrow), .pillar .more { grid-column: 1; grid-row: auto; }
}
.photo-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-top: 28px; }
.photo-row img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); }
.photo-row figure { margin: 0; }
.photo-row figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .photo-row { grid-template-columns: 1fr 1fr; } .photo-row figure:first-child { grid-column: 1 / -1; } .photo-row figure:first-child img { aspect-ratio: 4/3; } }
.site-footer .small { display: block; margin-top: 6px; }
.site-footer .small a { color: var(--muted); }

/* "The most recent from me" */
.recent { margin: 28px 0 0; padding: 40px 36px 28px; background: var(--surface); border-left: 4px solid var(--ink); border-radius: 0 var(--radius) var(--radius) 0; position: relative; }
.recent::before { content: "\201C"; position: absolute; top: -14px; left: 18px; font: 700 5rem/1 var(--serif); color: var(--muted); opacity: .35; pointer-events: none; }
.recent blockquote { margin: 0; }
.recent h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 0 0 4px; }
.recent h3 a { text-decoration: none; }
.recent-date { font-size: .9rem; color: var(--muted); margin: 0 0 14px; }
.recent-text p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; margin: 0 0 .8em; }
.recent-text p:last-child { margin-bottom: 0; }
.recent figcaption { margin-top: 16px; font-weight: 650; }
.recent figcaption a { text-decoration: none; }
.more-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 48px 0 4px; }
.more-head h3 { margin: 0; }
@media (max-width: 560px) { .recent { padding: 36px 20px 22px; } }

/* Games page: publisher facts + per-game AI notes */
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .95rem; color: var(--muted); }
.facts strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.ai-note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; margin: 0 0 20px; }
.ai-note strong { color: var(--ink); }
.recent-section { padding-top: 24px; }

/* Equal-height photo strip: each figure grows by its image's aspect ratio (--ar) */
.photo-strip { display: flex; gap: 16px; align-items: flex-start; }
.photo-strip figure { margin: 0; flex: var(--ar, 1) 1 0; min-width: 0; }
.photo-strip img { width: 100%; height: auto; aspect-ratio: var(--ar, 1); object-fit: cover; border-radius: var(--radius); }
.photo-strip figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 640px) { .photo-strip { flex-direction: column; } .photo-strip figure { flex: none; width: 100%; } .photo-strip figure[style*="0.667"] img { aspect-ratio: 4/5; } }
@media (max-width: 640px) {
  .photo-strip.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .photo-strip.two-up img { aspect-ratio: 4/5; }
}
