/* =====================================================================
   94me site styles — shared by samduan.94me.fyi and home.94me.fyi.
   Change the look by editing the tokens in :root (and the dark block).
   ===================================================================== */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #18181b;
  --muted: #5f5f66;
  --faint: #8d8d94;
  --line: #e6e5e1;
  --accent: #0f6b66;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ef;
  --shadow: 0 1px 2px rgb(20 20 20 / 0.04), 0 8px 24px rgb(20 20 20 / 0.06);
  --radius: 14px;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f10;
    --surface: #17181a;
    --ink: #ececea;
    --muted: #a4a4aa;
    --faint: #75757c;
    --line: #2a2b2e;
    --accent: #5fd0c4;
    --accent-ink: #062a27;
    --accent-soft: #15302d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0f10;
  --surface: #17181a;
  --ink: #ececea;
  --muted: #a4a4aa;
  --faint: #75757c;
  --line: #2a2b2e;
  --accent: #5fd0c4;
  --accent-ink: #062a27;
  --accent-soft: #15302d;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--faint); font-weight: 400; }
.nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; align-items: center; }

.icon-btn, .btn {
  font: 500 14px var(--sans);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.icon-btn { width: 36px; padding: 0; justify-content: center; }
.btn:hover, .icon-btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
svg.i { width: 16px; height: 16px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; display: grid; gap: 28px; grid-template-columns: auto 1fr; align-items: center; }
.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 44px var(--serif);
  background: var(--accent-soft);
  color: var(--accent);
  overflow: hidden;
  border: 1px solid var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { font: 500 13px var(--mono); color: var(--accent); letter-spacing: 0.02em; margin: 0 0 6px; }
.hero h1 { font: 400 clamp(40px, 6vw, 64px)/1.05 var(--serif); margin: 0; letter-spacing: -0.01em; }
.hero .role { font-size: 19px; color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
.hero .bio { color: var(--muted); margin: 14px 0 0; max-width: 64ch; }
.hero .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.chip {
  font: 500 13px var(--sans);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 40px 0 8px; }
.section[hidden] { display: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-bottom: 20px; }
.section-head h2 { font: 400 30px/1.2 var(--serif); margin: 0; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; max-width: 52ch; text-align: right; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.layout-featured .grid { grid-template-columns: 1fr; }
.layout-list .grid { grid-template-columns: 1fr; gap: 0; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover { border-color: color-mix(in srgb, var(--faint) 60%, var(--line)); box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.meta { display: flex; align-items: center; gap: 8px; font: 500 12px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--faint); margin-top: auto; padding-top: 8px; }
.stats span { display: inline-flex; align-items: center; gap: 5px; }
.dot-lang { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* Media (videos, games) */
.media { position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 0; padding: 0; }
.media.game { aspect-ratio: 485 / 402; }
.media iframe { width: 100%; height: 100%; border: 0; display: block; }
.poster { cursor: pointer; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
.play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.92);
  color: #111;
  transition: transform 0.15s;
}
.poster:hover .play { transform: scale(1.08); }
.layout-featured .card { flex-direction: row; }
.layout-featured .media { flex: 1.6; aspect-ratio: 16 / 9; }
.layout-featured .card-body { flex: 1; justify-content: center; padding: 28px; }
.layout-featured h3 { font: 400 28px/1.2 var(--serif); }

/* Site tiles (mock browser window) */
.site-shot { position: relative; aspect-ratio: 16 / 9; background: var(--bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.site-shot .bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.site-shot .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.site-shot .bar code { margin-left: 8px; font: 11px var(--mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-shot .face { position: absolute; inset: 28px 0 0; display: grid; place-items: center; font: 52px var(--serif); color: var(--accent); background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%); }
.site-shot iframe { position: absolute; top: 28px; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; }
.soon .site-shot .face { color: var(--faint); background: repeating-linear-gradient(135deg, transparent 0 10px, var(--line) 10px 11px); }
.badge { font: 500 11px var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-transform: none; letter-spacing: 0; }
.badge.live { border-color: transparent; background: var(--accent-soft); color: var(--accent); }

/* List rows (writing / links) */
.layout-list .card { flex-direction: row; align-items: center; border-radius: 0; border-width: 0 0 1px; background: transparent; }
.layout-list .card:hover { box-shadow: none; }
.layout-list .card-body { flex-direction: row; align-items: baseline; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.layout-list .meta { width: 110px; }
.layout-list h3 { flex: 1; min-width: 200px; }
.layout-list p { flex-basis: 100%; padding-left: 126px; }

/* ---------- Contact / footer ---------- */
.contact { margin: 56px 0 0; padding: 40px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.contact h2 { font: 400 32px/1.2 var(--serif); margin: 0 0 4px; }
.contact p { margin: 0; color: var(--muted); }
.contact .links { display: flex; flex-wrap: wrap; gap: 8px; }
footer { color: var(--faint); font-size: 13px; padding: 40px 0 56px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--muted); }

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

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .brand { flex: 1; }
  .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 20px; }
  .avatar { width: 84px; height: 84px; font-size: 34px; }
  .section-head { flex-direction: column; gap: 4px; }
  .section-head p { text-align: left; }
  .layout-featured .card { flex-direction: column; }
  .layout-featured .card-body { padding: 18px; }
  .layout-list .meta { width: auto; }
  .layout-list p { padding-left: 0; }
  .contact { padding: 24px; }
  .btn .label-long { display: none; }
}

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