/* ==========================================================================
   Deepaklal KB — portfolio design system
   Mobile-first. Every layout starts as a single column and only becomes
   multi-column at an explicit breakpoint.
   ========================================================================== */

/* --- design tokens ------------------------------------------------------ */
:root {
  color-scheme: dark;

  --bg: #0a0e14;
  --bg-elev: #0f151e;
  --surface: #121a24;
  --surface-2: #172130;
  --line: rgba(148, 178, 214, 0.14);
  --line-strong: rgba(148, 178, 214, 0.26);

  --txt: #e7eef6;
  --txt-dim: #a6b6cc;
  --muted: #7d8ea6;

  --accent: #4ea8de;
  --accent-soft: rgba(78, 168, 222, 0.14);
  --accent-line: rgba(78, 168, 222, 0.42);
  --accent-2: #7c9cf5;

  --ok: #4ade80;
  --warn: #fbbf24;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 12px rgba(0, 0, 0, .18);

  --max: 1120px;
  --gutter: 1.25rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f8fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --line: rgba(15, 34, 60, 0.10);
  --line-strong: rgba(15, 34, 60, 0.20);

  --txt: #0f1c2e;
  --txt-dim: #3d4f66;
  --muted: #64748b;

  --accent: #0369a1;
  --accent-soft: rgba(3, 105, 161, 0.09);
  --accent-line: rgba(3, 105, 161, 0.30);
  --accent-2: #4f46e5;

  --shadow: 0 1px 2px rgba(15, 34, 60, .06), 0 12px 28px rgba(15, 34, 60, .08);
  --shadow-sm: 0 1px 2px rgba(15, 34, 60, .05), 0 4px 12px rgba(15, 34, 60, .06);
}

/* --- reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;           /* mobile: nothing may cause sideways scroll */
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: .3rem 0; }

button { font: inherit; color: inherit; cursor: pointer; }

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

/* --- layout primitives -------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding: 3rem 0; }
@media (min-width: 768px) { section { padding: 4.5rem 0; } }

.section-head { margin-bottom: 1.75rem; }
.section-head h2 { font-size: 1.5rem; margin: 0 0 .35rem; }
.section-head p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (min-width: 768px) { .section-head h2 { font-size: 1.85rem; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-line);
}

.grid { display: grid; gap: 1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 9998;
}
.skip:focus { left: 0; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.15rem;
  min-height: 44px;                /* comfortable mobile tap target */
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #04121d; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
[data-theme="light"] .btn-primary { color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--txt);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); }

/* --- chips / tags ------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: .3rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--txt-dim);
  white-space: nowrap;
}
.chip--accent { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 60px;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--txt); }
.brand:hover { text-decoration: none; }
.brand img {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  object-fit: cover;
}
.brand-name { font-weight: 650; font-size: .95rem; letter-spacing: -0.01em; }
.brand-role {
  display: block;
  font-family: var(--mono);
  font-size: .66rem;
  color: var(--muted);
  letter-spacing: .06em;
}

.nav-links { display: none; }
.nav-actions { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--txt-dim);
}
.icon-btn:hover { border-color: var(--accent-line); color: var(--accent); }

@media (min-width: 900px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: .2rem;
  }
  .nav-links a {
    padding: .45rem .7rem;
    border-radius: 8px;
    color: var(--txt-dim);
    font-size: .9rem;
  }
  .nav-links a:hover { color: var(--txt); background: var(--surface-2); text-decoration: none; }
  .nav-links a.is-active { color: var(--accent); }
  #menuToggle { display: none; }
}

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: var(--bg);
  padding: 1rem var(--gutter) 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s;
}
body.nav-open .drawer { transform: none; visibility: visible; }
body.nav-open { overflow: hidden; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.drawer nav { display: flex; flex-direction: column; margin-top: 1rem; }
.drawer nav a {
  padding: .95rem .25rem;
  border-bottom: 1px solid var(--line);
  color: var(--txt);
  font-size: 1.05rem;
}
.drawer nav a:hover { text-decoration: none; color: var(--accent); }

/* --- hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 80% -20%, var(--accent-soft), transparent 70%);
}
@media (min-width: 900px) { .hero { padding: 4.5rem 0 4rem; } }

.hero-inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 3rem; }
}

.hero h1 {
  font-size: clamp(1.75rem, 6.5vw, 2.9rem);
  letter-spacing: -0.02em;
  margin: 0 0 .75rem;
}
.hero h1 .accent { color: var(--accent); }

.hero-lede {
  color: var(--txt-dim);
  font-size: 1.02rem;
  max-width: 56ch;
  margin-bottom: 1.5rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.5rem; }
@media (max-width: 380px) { .hero-cta .btn { width: 100%; } }

/* professional headshot — restrained, circular, never full-bleed */
.portrait {
  position: relative;
  width: clamp(150px, 42vw, 240px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  order: -1;                       /* photo above the copy on small screens */
}
@media (min-width: 900px) { .portrait { order: 0; width: min(100%, 280px); } }

.portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.portrait::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  opacity: .45;
}

.portrait-badge {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--txt-dim);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
}

/* key figures strip */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 620px) { .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.metric { background: var(--bg-elev); padding: 1rem .9rem; }
.metric b {
  display: block;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--txt);
  letter-spacing: -0.02em;
}
.metric span { font-size: .78rem; color: var(--muted); line-height: 1.4; display: block; }

/* --- expertise / about -------------------------------------------------- */
.two-col { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); } }

.col-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .col-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.col-4 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .col-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.domain-card h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .75rem;
}
.domain-card .num {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  padding: .05rem .35rem;
}
.domain-card ul { padding-left: 1.1rem; margin: 0; color: var(--txt-dim); font-size: .9rem; }

/* --- blog cards --------------------------------------------------------- */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  height: 100%;
  transition: border-color .18s ease, transform .18s ease;
}
.post-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.post-meta .tag { color: var(--accent); }

.post-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.post-card h3 a { color: var(--txt); }
.post-card h3 a:hover { color: var(--accent); text-decoration: none; }
/* the whole card is the tap target, not just the 20px-tall heading */
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card .read-more { position: relative; }
.post-card p { color: var(--txt-dim); font-size: .92rem; flex: 1; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 32px;               /* keeps the tap target reachable on touch */
  font-size: .88rem;
  font-weight: 600;
  margin-top: .25rem;
}
.read-more .arw { transition: transform .18s ease; }
.post-card:hover .read-more .arw { transform: translateX(3px); }

/* --- timeline ----------------------------------------------------------- */
.tl-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tl-filters button {
  padding: .45rem .9rem;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--txt-dim);
  font-size: .85rem;
}
.tl-filters button[aria-selected="true"] {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.timeline { position: relative; padding-left: 1.35rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: .5rem; bottom: .5rem;
  width: 1px;
  background: linear-gradient(var(--accent-line), transparent);
}

.tl-item { position: relative; margin-bottom: 1rem; }
/* The reveal animation only applies when JS is running, so a failed script
   can never leave the timeline permanently invisible. */
.js .tl-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease;
}
.tl-item.is-visible { opacity: 1; transform: none; }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1.35rem + 1px);
  top: 1.35rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; }
.tl-card h3 { font-size: 1rem; margin-bottom: .1rem; }
.tl-where { color: var(--accent); font-size: .88rem; }
.tl-when { font-family: var(--mono); font-size: .74rem; color: var(--muted); display: block; margin: .3rem 0 .6rem; }
.tl-card ul { padding-left: 1.05rem; margin: 0; color: var(--txt-dim); font-size: .89rem; }

/* --- contact ------------------------------------------------------------ */
.field { display: grid; gap: .35rem; margin-bottom: .85rem; }
.field label { font-size: .82rem; color: var(--txt-dim); font-weight: 600; }

input, textarea, select {
  width: 100%;
  padding: .75rem .85rem;
  font: inherit;
  font-size: 16px;                 /* iOS: prevents zoom-on-focus */
  color: var(--txt);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 120px; }

.notice { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); margin-bottom: 1rem; font-size: .92rem; }
.notice.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.notice.err { border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .08); }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .k { font-family: var(--mono); font-size: .72rem; color: var(--muted); min-width: 72px; text-transform: uppercase; letter-spacing: .06em; padding-top: .35rem; }
.contact-list .v { word-break: break-word; }
.contact-list .v a { display: inline-flex; align-items: center; min-height: 28px; }

/* --- footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  font-size: .85rem;
}
.foot-inner { display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
@media (min-width: 720px) { .foot-inner { flex-direction: row; justify-content: space-between; text-align: left; } }
.foot-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: center; }
.foot-links a { display: inline-flex; align-items: center; min-height: 32px; padding-inline: .15rem; }

/* ==========================================================================
   Article (blog post) styles
   ========================================================================== */
.article-head {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(800px 300px at 20% -30%, var(--accent-soft), transparent 70%);
}
.article-head h1 { font-size: clamp(1.6rem, 5.5vw, 2.4rem); margin-bottom: .75rem; max-width: 22ch; }
.article-head .post-meta { margin-bottom: 1rem; }
.article-head .lede { color: var(--txt-dim); max-width: 62ch; margin: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

/* Source order is TOC → body so the jump links come first on a phone.
   On desktop the TOC is explicitly placed into the right-hand column. */
.article-layout { display: grid; gap: 2rem; padding: 2.5rem 0 3rem; }
@media (min-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 3rem; align-items: start; }
  .article-layout .article-body { grid-column: 1; grid-row: 1; }
  .article-layout .toc { grid-column: 2; grid-row: 1; }
}

.article-body { max-width: 72ch; min-width: 0; }
.article-body h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 .75rem;
  padding-top: .5rem;
  scroll-margin-top: 80px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; scroll-margin-top: 80px; }
.article-body p, .article-body li { color: var(--txt-dim); }
.article-body strong { color: var(--txt); font-weight: 650; }

.article-body code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .35em;
  color: var(--accent);
  overflow-wrap: break-word;
}

.article-body pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-x: auto;               /* wide code scrolls, page never does */
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  font-size: .82rem;
  line-height: 1.6;
}
.article-body pre code {
  background: none; border: 0; padding: 0; color: var(--txt-dim);
  white-space: pre; overflow-wrap: normal;
}
.article-body pre .c { color: var(--muted); font-style: italic; }
.article-body pre .k { color: var(--accent); }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .9rem 1.1rem;
  margin: 1.5rem 0;
  font-size: .93rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout b { color: var(--txt); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: .88rem; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--txt-dim); font-weight: 650; }
td { color: var(--txt-dim); }
tr:last-child td { border-bottom: 0; }

/* table of contents */
.toc { position: static; }
@media (min-width: 1000px) { .toc { position: sticky; top: 84px; } }
.toc-inner { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--surface); }
.toc h2 { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .6rem; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a { display: block; padding: .35rem 0; font-size: .85rem; color: var(--txt-dim); }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.toc a:hover { color: var(--accent); text-decoration: none; }

.article-nav {
  display: grid;
  gap: .75rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 620px) { .article-nav { grid-template-columns: 1fr 1fr; } }
.article-nav a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  color: var(--txt);
}
.article-nav a:hover { border-color: var(--accent-line); text-decoration: none; }
.article-nav .dir { display: block; font-family: var(--mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.article-nav .next { text-align: right; }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2rem;
  padding: .6rem 1rem .6rem .85rem;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--txt);
}
.back-home:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); text-decoration: none; }

/* --- motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .tl-item { opacity: 1; transform: none; }
}

/* --- print -------------------------------------------------------------- */
@media print {
  .site-header, .drawer, .site-footer, .hero-cta, #loader { display: none !important; }
  body { background: #fff; color: #000; }
}
