/*
Theme Name:   MBD 2026
Theme URI:    https://www.madebydhawal.com
Author:       Dhawal Mhatre
Author URI:   https://www.madebydhawal.com
Description:  Personal site theme for Made by Dhawal — a frontend-architecture blog with a portfolio and about page. Day/night themes, category-tinted accents, and per-post live demos.
Version:      1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  mbd-2026
*/

/* ============================================================
   Made by Dhawal — v2, display scale
   Production: self-host woff2, inline this file in <head>.
   ============================================================ */

:root {
  --paper:    #FCFBF9;
  --paper-2:  #F4F2EE;
  --paper-3:  #EAE7E1;
  --ink:      #14161B;
  --ink-2:    #4E5057;
  --ink-3:    #85858B;
  --rule:     #E2DFD8;
  --rule-2:   #EFECE6;

  --hue-frontend: #1F4BE0;
  --hue-vcs:      #0B7A57;
  --hue-strategy: #9C5411;
  --hue-perf:     #7B2FA6;

  --hue:    var(--hue-frontend);
  --hue-bg: color-mix(in srgb, var(--hue) 8%, var(--paper));

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --measure: 68ch;
  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
  --shell:   min(100%, 1180px);
  --column:  min(100%, 820px);

  --ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --swing: cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme="night"] {
  --paper:   #0D0F13;
  --paper-2: #161920;
  --paper-3: #1F232A;
  --ink:     #EAE9E5;
  --ink-2:   #A6A6A2;
  --ink-3:   #6F7075;
  --rule:    #2A2D34;
  --rule-2:  #1E2128;

  --hue-frontend: #7E9CFF;
  --hue-vcs:      #3FCB96;
  --hue-strategy: #E0A055;
  --hue-perf:     #C084E8;

  --hue-bg: color-mix(in srgb, var(--hue) 15%, var(--paper));
}

[data-cat="frontend"] { --hue: var(--hue-frontend); }
[data-cat="vcs"]      { --hue: var(--hue-vcs); }
[data-cat="strategy"] { --hue: var(--hue-strategy); }
[data-cat="perf"]     { --hue: var(--hue-perf); }

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 19px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

a { color: var(--hue); text-underline-offset: 3px; text-decoration-thickness: 1px; }

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

.skip {
  position: absolute; left: 0; top: 0; z-index: 40;
  transform: translateY(-140%);
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 14px;
  padding: 0.65rem 1rem; text-decoration: none; border-radius: 0 0 4px 0;
}
.skip:focus { transform: translateY(0); }

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

.wrap, .wrap .vce-col-content  { width: var(--shell);  margin: 0 auto; padding: 0 var(--gutter); }

.prose .vce-col-content  { width: var(--shell);  margin: 0 auto; padding: 0; }
.column { width: var(--column); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.masthead[data-stuck] { border-bottom-color: var(--rule-2); }
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0;
}
.wordmark { display: flex; align-items: center; text-decoration: none; }
.logo-img { display: block; height: 54px; width: auto; }
.logo-night { display: none; }
[data-theme="night"] .logo-day { display: none; }
[data-theme="night"] .logo-night { display: block; }
.mast-right { display: flex; align-items: center; gap: 1.4rem; }
.mast-nav { display: flex; gap: 1.4rem; font-family: var(--sans); font-size: 14px; }
.mast-nav a { color: var(--ink-2); text-decoration: none; transition: color 0.15s; }
.mast-nav a:hover, .mast-nav a[aria-current="page"] { color: var(--ink); }

.hamburger {
  display: none; background: none; border: 1px solid var(--rule); border-radius: 6px;
  width: 34px; height: 34px; cursor: pointer; align-items: center; justify-content: center;
  padding: 0; color: var(--ink-2); flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.hamburger:hover { border-color: var(--ink-3); color: var(--ink); }
.hamburger svg { width: 18px; height: 18px; }

@media (max-width: 680px) {
  .hamburger { display: inline-flex; }
  .mast-nav {
    flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .mast-nav.open { max-height: 260px; opacity: 1; }
  .mast-nav a {
    padding: 0.95rem var(--gutter); font-size: 15px;
    border-top: 1px solid var(--rule-2);
  }
  .mast-nav a[aria-current="page"]::after { display: none; }
  .logo-img{height:50px; padding:0.2rem 0;}
  .mast-right{margin-right:10px;}
}

.themer {
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  width: 30px; height: 30px; cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center; padding: 0;
  transition: border-color 0.15s, color 0.15s, transform 0.25s var(--ease);
}
.themer:hover { border-color: var(--ink-3); color: var(--ink); transform: rotate(-20deg); }
.themer svg { width: 15px; height: 15px; }

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

.hero {
  min-height: 92svh;
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--rule);
}
.hero-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  display: flex; gap: 0.85rem; align-items: center; justify-content: center;
}

.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  line-height: 1.06; letter-spacing: -0.03em;
  margin: 0 auto clamp(1.25rem, 3vw, 2rem);
  max-width: 18ch;
}
.hero h1 em { font-style: italic; color: var(--ink-2); }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .ln > span { display: block; }

.hero .standfirst {
  font-family: var(--sans); font-size: clamp(14px, 1.4vw, 16px); line-height: 1.65;
  color: var(--ink-2); margin: 0 auto; max-width: 40ch;
}

/* ---------- subscribe ---------- */

.subscribe { display: flex; gap: 8px; margin: 2rem auto 0; max-width: 420px; justify-content: center; }
.subscribe input {
  flex: 1; min-width: 0;
  font-family: var(--sans); font-size: 14px; padding: 0 0.85rem; height: 44px;
  border: 1px solid var(--rule); border-radius: 5px;
  background: var(--paper); color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.subscribe input::placeholder { color: var(--ink-3); }
.subscribe input:focus { border-color: var(--hue); outline: none; box-shadow: 0 0 0 3px var(--hue-bg); }
.subscribe button {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  height: 44px; padding: 0 1.3rem; white-space: nowrap;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 5px; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.subscribe button:hover { opacity: 0.86; }
.subscribe button:active { transform: scale(0.98); }
.sub-note { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); margin: 0.7rem auto 0; text-align: center; }

/* ---------- instrument bar (signature) ---------- */

.instrument { border-top: 1px solid var(--rule); background: var(--paper-2); }

.readout {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3);
}
.readout b { color: var(--hue); font-weight: 500; font-variant-numeric: tabular-nums; font-size: 12px; }

.track { position: relative; height: 52px; }
.track-line { position: absolute; inset: 25px 0 auto; height: 1px; background: var(--rule); }
.tick { position: absolute; top: 17px; opacity: 0; }
.tick.on { opacity: 1; transition: opacity 0.35s var(--ease); }
.tick i { display: block; width: 1px; height: 9px; background: var(--ink-3); opacity: 0.6; }
.tick span {
  position: absolute; top: 13px; left: 0; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.needle { position: absolute; top: 11px; left: 0; width: 2px; height: 24px; background: var(--hue); border-radius: 1px; }
.needle.sweep { transition: left 0.95s var(--swing); }
.needle.live  { transition: left 0.09s linear; }
.needle::after {
  content: ''; position: absolute; top: -4px; left: -3px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--hue);
}
.needle::before {
  content: ''; position: absolute; inset: -7px -8px;
  border-radius: 999px; background: var(--hue); opacity: 0.14;
}

.demo-grid { display: grid; gap: 8px; padding-bottom: 1.1rem; grid-template-columns: 1fr; }
.demo-grid div {
  height: clamp(44px, 6vw, 60px); border-radius: 5px;
  background: var(--hue-bg); border: 1px solid var(--hue);
}
@media (min-width: 768px)  { .demo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .demo-grid { grid-template-columns: repeat(4, 1fr); } }

.hint { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); padding-bottom: 1rem; margin: 0; }

/* ---------- load orchestration ---------- */

@keyframes rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.js .hero h1 .ln > span { transform: translateY(105%); animation: rise 0.75s var(--ease) forwards; }
.js .hero h1 .ln:nth-child(1) > span { animation-delay: 0.06s; }
.js .hero h1 .ln:nth-child(2) > span { animation-delay: 0.14s; }
.js .hero h1 .ln:nth-child(3) > span { animation-delay: 0.22s; }
.js .hero h1 .ln:nth-child(4) > span { animation-delay: 0.30s; }

.js .eyebrow, .js .hero .standfirst, .js .subscribe, .js .sub-note {
  opacity: 0; animation: fade 0.6s var(--ease) forwards;
}
.js .eyebrow { animation-delay: 0.02s; }
.js .hero .standfirst { animation-delay: 0.38s; }
.js .subscribe { animation-delay: 0.46s; }
.js .sub-note { animation-delay: 0.52s; }

/* ---------- section label ---------- */

.label {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--ink);
  margin: 0; font-weight: 400;
}

/* ---------- posts ---------- */

.posts { padding: clamp(3rem, 7vw, 5rem) 0 1rem; }

.featured {
  display: block; text-decoration: none; color: inherit;
  padding: 2rem 0 2.25rem; border-bottom: 1px solid var(--rule-2);
}

.featured .wp-post-image{width:100%;}
.plate-lg {
  display: block; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper-2); overflow: hidden; margin-bottom: 1.5rem;
  transition: border-color 0.25s var(--ease);
}
.plate-lg svg { display: block; width: 100%; height: clamp(120px, 20vw, 200px); }
.featured:hover .plate-lg { border-color: var(--hue); }
.featured:hover .featured-t { color: var(--hue); }
.featured-t {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.1;
  letter-spacing: -0.026em; margin: 0 0 0.6rem;
  max-width: 100%; transition: color 0.15s;
}
.featured-d {
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  color: var(--ink-2); margin: 0 0 0.9rem; max-width: 100%;
}

.post-row {
  display: grid; grid-template-columns: 92px 1fr auto;
  gap: 1.4rem; align-items: start;
  padding: 1.6rem 0; border-bottom: 1px solid var(--rule-2);
  text-decoration: none; color: inherit;
}
.post-row:hover .post-t { color: var(--hue); }
.post-row:hover .plate { border-color: var(--hue); transform: translateY(-3px); }

.plate {
  width: 92px; height: 68px; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--paper-2); overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease);
}
.plate svg { display: block; width: 100%; height: 100%; }

.chip {
  display: inline-block; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--hue); background: var(--hue-bg);
  border: 1px solid color-mix(in srgb, var(--hue) 35%, transparent);
  border-radius: 3px; padding: 2px 6px; margin-bottom: 0.6rem;
}
.post-t {
  font-family: var(--serif); font-size: 24px; line-height: 1.25; font-weight: 400;
  margin: 0 0 0.35rem; letter-spacing: -0.017em; transition: color 0.15s;
}
.post-d { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; max-width: 50ch; }
.post-meta {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em; padding-top: 0.35rem;
}

@media (max-width: 640px) {
  .post-row { grid-template-columns: 64px 1fr; }
  .plate { width: 64px; height: 48px; }
  .post-meta { grid-column: 2; padding-top: 0.6rem; }
  .post-t { font-size: 20px; }
}

.rise-in { opacity: 0; transform: translateY(12px); }
.rise-in.in { opacity: 1; transform: none; transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }

/* ---------- colophon ---------- */

.colophon {
  margin-top: clamp(3rem, 6vw, 4.5rem); padding: 2.25rem 0 3.5rem;
  border-top: 1px solid var(--rule);
  display: flex; gap: 1rem; align-items: flex-start;
}
.colophon .dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper-2); border: 1px solid var(--rule);
  flex-shrink: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
}
.colophon p { font-family: var(--sans); font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 0; max-width: 62ch; }

/* ---------- article ---------- */

.article { padding: clamp(2.5rem, 6vw, 4rem) 0 0; }
.article-head { border-bottom: 1px solid var(--rule); padding-bottom: 2.25rem; margin-bottom: 2.75rem; }
.article-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.06;
  letter-spacing: -0.03em; margin: 0.85rem 0 1rem;
}
.article-head .standfirst {
  font-family: var(--serif); font-size: 21px; line-height: 1.5;
  color: var(--ink-2); font-style: italic; font-weight: 300;
  margin: 0 0 1.4rem; max-width: 52ch;
}
.byline {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0;
}

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--hue); z-index: 30; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.45rem; }
.prose h2 {
  font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.28;
  letter-spacing: -0.017em; margin: 1rem 0 1rem;
}
.prose > div > p:first-of-type::first-letter, 
.prose .vce-row-container:first-of-type p:first-of-type::first-letter {
  float: left; font-size: 3.9em; line-height: 0.8;
  padding: 0.06em 0.09em 0 0; font-weight: 400; color: var(--ink);
}
.prose blockquote {
  margin: 2.2rem 0; padding-left: 1.35rem;
  border-left: 2px solid var(--hue); border-radius: 0;
  font-style: italic; color: var(--ink-2);
}
.prose code {
  font-family: var(--mono); font-size: 0.83em;
  background: var(--paper-2); border: 1px solid var(--rule-2);
  border-radius: 3px; padding: 0.1em 0.35em;
}

.codeblock { margin: 1.9rem 0; border: 1px solid var(--rule); border-radius: 7px; background: var(--paper-2); overflow: hidden; }
.codeblock header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.45rem 0.55rem 0.45rem 0.85rem; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
}
.codeblock button {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase;
  background: none; border: 1px solid var(--rule); border-radius: 3px;
  color: var(--ink-3); cursor: pointer; padding: 3px 8px;
  transition: color 0.15s, border-color 0.15s;
}
.codeblock button:hover { color: var(--ink); border-color: var(--ink-3); }
.codeblock pre {
  margin: 0; padding: 0.95rem 0.85rem; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.65; color: var(--ink);
}
.codeblock .k { color: var(--hue); }
.codeblock .c { color: var(--ink-3); font-style: italic; }

.demo-slot { margin: 2.2rem 0; border: 1px solid var(--hue); border-radius: 7px; overflow: hidden; }
.demo-slot header {
  background: var(--hue-bg); padding: 0.45rem 0.85rem; border-bottom: 1px solid var(--hue);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hue);
}
.demo-slot .body { padding: 1.7rem 0.85rem; text-align: center; font-family: var(--sans); font-size: 13px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .hero h1 .ln > span { transform: none; }
  .js .eyebrow, .js .hero .standfirst, .js .subscribe, .js .sub-note { opacity: 1; }
  .js .about-head h1 { opacity: 1; }
  .rise-in { opacity: 1; transform: none; }
  .tick { opacity: 1; }
}

/* ============================================================
   Expertise
   ============================================================ */

.expertise { padding: clamp(2rem, 7vw, 4rem) 0 clamp(2rem, 7vw, 4rem); }

.domains { margin: 0; padding: 0; list-style: none; }

.domain {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 1.25rem; align-items: baseline;
  padding: 1.5rem 0; border-bottom: 1px solid var(--rule-2);
  text-decoration: none; color: inherit;
}
.domain .bead {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--hue); align-self: center;
  transition: transform 0.25s var(--ease);
}
.domain:hover .bead { transform: scale(1.5); }
.domain:hover .domain-t { color: var(--hue); }
.domain-t {
  font-family: var(--serif); font-size: 23px; font-weight: 400;
  line-height: 1.3; letter-spacing: -0.016em; margin: 0 0 0.3rem;
  transition: color 0.15s;
}
.domain-d {
  font-family: var(--sans); font-size: 14px; line-height: 1.6;
  color: var(--ink-2); margin: 0; max-width: 56ch;
}
.domain-n {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.05em; white-space: nowrap; align-self: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .domain { grid-template-columns: auto 1fr; gap: 0.9rem; }
  .domain-n { grid-column: 2; align-self: start; padding-top: 0.5rem; }
  .domain-t { font-size: 20px; }
}

.stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 1.75rem 0 0; padding: 0; list-style: none;
}
.stack li {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--ink-2); background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 4px; padding: 4px 8px;
}
.stack-note {
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-3);
  margin: 1rem 0 0;
}

/* ============================================================
   Writing index
   ============================================================ */

.filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 1.5rem 0 0; padding: 0; list-style: none;
}
.filters button {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em;
  text-transform: uppercase; cursor: pointer;
  color: var(--ink-2); background: none;
  border: 1px solid var(--rule); border-radius: 4px; padding: 5px 10px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filters button:hover { border-color: var(--ink-3); color: var(--ink); }
.filters button[aria-pressed="true"] {
  color: var(--hue); border-color: var(--hue); background: var(--hue-bg);
}

.index { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.index li { border-bottom: 1px solid var(--rule-2); }
.index li[hidden] { display: none; }

.index-row {
  display: grid; grid-template-columns: 78px 1fr auto;
  gap: 1.25rem; align-items: baseline;
  padding: 0.95rem 0; text-decoration: none; color: inherit;
}
.index-row:hover .index-t { color: var(--hue); }
.index-date {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em; white-space: nowrap;
}
.index-t {
  font-family: var(--serif); font-size: 19px; line-height: 1.35;
  font-weight: 400; letter-spacing: -0.012em; margin: 0;
  transition: color 0.15s;
}
.index-t .dot-live {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--hue); margin-left: 0.45rem; vertical-align: 0.12em;
}
.index-cat {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hue); white-space: nowrap;
}

@media (max-width: 640px) {
  .index-row { grid-template-columns: 1fr auto; gap: 0.75rem; row-gap: 0.35rem; }
  .index-date { grid-column: 1; grid-row: 2; }
  .index-t { grid-column: 1 / -1; grid-row: 1; font-size: 17px; }
  .index-cat { grid-column: 2; grid-row: 2; }
}

.empty {
  font-family: var(--sans); font-size: 14px; color: var(--ink-3);
  padding: 2.5rem 0; margin: 0; text-align: center;
}

/* ============================================================
   About
   ============================================================ */

.about-head { padding: clamp(3rem, 7vw, 5rem) 0 0; }
.about-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 6.5vw, 4rem); line-height: 1.02;
  letter-spacing: -0.032em; margin: 0.85rem 0 1.25rem; max-width: 16ch;
}
.js .about-head h1 { opacity: 0; animation: fade 0.6s var(--ease) forwards; animation-delay: 0.06s; }
.about-head .standfirst, .writing-head .standfirst {
  font-family: var(--serif); font-size: 21px; line-height: 1.5;
  color: var(--ink-2); font-style: italic; font-weight: 300;
  margin: 0; max-width: 50ch;
}

.cv { margin: clamp(2rem, 6vw, 3rem) 0 0; padding: 0; list-style: none; }
.cv-item {
  display: grid; grid-template-columns: 98px 1fr;
  gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--rule-2);
}
.cv-item:first-child { border-top: 1px solid var(--ink); }
.cv-when {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.05em; font-variant-numeric: tabular-nums; padding-top: 0.4rem;
}
.cv-what { font-family: var(--serif); font-size: 20px; line-height: 1.35; margin: 0 0 0.3rem; letter-spacing: -0.014em; }
.cv-note { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; max-width: 56ch; }

@media (max-width: 640px) {
  .cv-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .cv-when { padding-top: 0; }
}

.clients {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 1.5rem 0 0; border-top: 1px solid var(--rule);
}
.clients p {
  font-family: var(--sans); font-size: 14px; line-height: 1.75;
  color: var(--ink-2); margin: 0.75rem 0 0; max-width: 62ch;
}

/* ============================================================
   Color wash + dot-grid backdrop
   ============================================================ */

body {
  background-image:
    radial-gradient(circle at 1px 1px, var(--rule-2) 1px, transparent 1.6px);
  background-size: 26px 26px;
  background-attachment: fixed;
}
[data-theme="night"] body { background-image: radial-gradient(circle at 1px 1px, var(--rule) 1px, transparent 1.6px); }

@supports (animation-timeline: scroll()) {
  @keyframes driftgrid { from { background-position: 0 0; } to { background-position: -260px -520px; } }
  body { animation: driftgrid linear both; animation-timeline: scroll(root); }
}
@media (prefers-reduced-motion: reduce) { body { animation: none; } }

.hero {
  position: relative;
  background: var(--paper);
  overflow: hidden;
}

.tagfield { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.ghost {
  position: absolute; width: 90px; height: 32px; border-radius: 999px;
  filter: blur(8px); opacity: 0.28; transform: translate(-50%, -50%);
}

.tag {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center;
  transition: opacity 0.4s ease;
  will-change: transform, opacity;
}
.tag-ic {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--hue-solid); color: var(--on-hue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.tag-ic svg { width: 15px; height: 15px; }
.tag-label {
  font-family: var(--sans); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  color: var(--ink);
  background: color-mix(in srgb, var(--hue) 15%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--hue) 32%, transparent);
  padding: 6px 15px 6px 20px; margin-left: -14px; border-radius: 999px;
}
[data-theme="night"] .tag-label { background: color-mix(in srgb, var(--hue) 24%, var(--paper)); }

@media (max-width: 800px) {
  .tagfield { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tag { transition: none; }
}

.hero-body, .instrument { position: relative; z-index: 1; }

.rule-accent {
  height: 3px; width: 64px; border-radius: 2px; margin: 0 auto 1.4rem;
  background: linear-gradient(90deg, var(--hue), color-mix(in srgb, var(--hue) 30%, transparent));
}

.tinted { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tinted .wrap, .tinted .column { position: relative; }

/* ============================================================
   Portrait
   ============================================================ */

.portrait {
  width: clamp(120px, 22vw, 168px); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--rule); background: var(--paper-2);
  flex-shrink: 0;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-top {
  display: flex; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: flex-start;
  flex-wrap: wrap;
}

/* ============================================================
   Work grid + detail
   ============================================================ */

.work-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none;
}
.work-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--paper-2); overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.work-card:hover { border-color: var(--hue); transform: translateY(-3px); }
.work-plate { display: block; width: 100%; height: 132px; }
.work-body { padding: 1rem 1.1rem 1.2rem; }
.work-name {
  font-family: var(--serif); font-size: 19px; font-weight: 400;
  letter-spacing: -0.012em; margin: 0 0 0.3rem;
}
.work-cat {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hue); margin: 0;
}

.wd-head { padding: clamp(3rem, 7vw, 5rem) 0 0; }
.wd-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.05;
  letter-spacing: -0.03em; margin: 0.85rem 0 1rem;
}
.wd-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.75rem 0 0;
  padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.wd-meta div { min-width: 130px; }
.wd-meta dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.3rem;
}
.wd-meta dd { font-family: var(--sans); font-size: 14px; color: var(--ink); margin: 0; }

.wd-plate { border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); margin: 2.5rem 0; }
.wd-plate svg { display: block; width: 100%; height: clamp(160px, 26vw, 280px); }

.placeholder-note {
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-3);
  background: var(--paper-2); border: 1px dashed var(--rule);
  border-radius: 6px; padding: 0.7rem 0.9rem; margin: 0 0 2rem;
}

.wd-next {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding: 1.5rem 0; border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: 14px;
}

/* ============================================================
   Feature image
   ============================================================ */

.feature-image {
  margin: 1.75rem 0 0; border: 1px solid var(--rule); border-radius: 10px;
  background: #fff; text-align:center; overflow: hidden;
}
.feature-image svg, .feature-image img { display: block; width: 100%; height: clamp(180px, 32vw, 340px); }
.feature-image img {height:auto;}
.feature-cap {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.03em; margin: 0.6rem 0 0;
}

/* ============================================================
   Table of contents
   ============================================================ */

.toc {
  margin: 2rem 0 2.5rem; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--paper-2); padding: 1.1rem 1.3rem; max-width: var(--measure);
}
.toc p {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.75rem;
}
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0 0 0.5rem; }
.toc li:last-child { margin-bottom: 0; }
.toc a {
  display: flex; gap: 0.6rem; align-items: baseline;
  font-family: var(--sans); font-size: 14px; color: var(--ink-2);
  text-decoration: none; transition: color 0.15s;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex-shrink: 0;
}
.toc a:hover, .toc a.active { color: var(--hue); }
.toc a.active::before { color: var(--hue); }

.prose h2 { scroll-margin-top: 5.5rem; }

/* ============================================================
   Bright pass — vivid tokens, solid fills, brand stripe
   ============================================================ */

:root {
  --hue-frontend: #B34F00;
  --hue-vcs:      #046B48;
  --hue-strategy: #8A6A00;
  --hue-perf:     #8A2FC4;

  --solid-frontend: #FF7500; --on-frontend: #14161B;
  --solid-vcs:      #067A55; --on-vcs:      #FFFFFF;
  --solid-strategy: #E8B400; --on-strategy: #14161B;
  --solid-perf:     #6D28D9; --on-perf:     #FFFFFF;

  --hue-solid: var(--solid-frontend);
  --on-hue:    var(--on-frontend);
  --hue-bg: color-mix(in srgb, var(--hue) 15%, var(--paper));
}

[data-theme="night"] {
  --hue-frontend: #FF7500;
  --hue-vcs:      #2FE0A0;
  --hue-strategy: #F0C852;
  --hue-perf:     #B87FEF;
  --hue-bg: color-mix(in srgb, var(--hue) 24%, var(--paper));
}

[data-cat="frontend"] { --hue-solid: var(--solid-frontend); --on-hue: var(--on-frontend); }
[data-cat="vcs"]      { --hue-solid: var(--solid-vcs);      --on-hue: var(--on-vcs); }
[data-cat="strategy"] { --hue-solid: var(--solid-strategy); --on-hue: var(--on-strategy); }
[data-cat="perf"]     { --hue-solid: var(--solid-perf);     --on-hue: var(--on-perf); }

.stripe {
  height: 3px; width: 100%;
  background: linear-gradient(90deg,
    var(--hue-frontend) 0 25%, var(--hue-vcs) 25% 50%,
    var(--hue-strategy) 50% 75%, var(--hue-perf) 75% 100%);
}

.chip {
  background: var(--hue-solid); color: var(--on-hue);
  border: none; font-weight: 500; padding: 3px 8px;
}

.subscribe button {
  background: var(--hue-solid); color: var(--on-hue); border-color: var(--hue-solid);
}
.subscribe button:hover { opacity: 0.9; }
.subscribe input:focus { border-color: var(--hue-solid); box-shadow: 0 0 0 3px var(--hue-bg); }

.colophon .dot { background: var(--hue-solid); color: var(--on-hue); border-color: var(--hue-solid); }

.mast-nav a[aria-current="page"] {
  color: var(--ink); position: relative;
}
.mast-nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -13px; height: 2px;
  background: var(--hue-frontend);
}

.themer:hover { border-color: var(--hue-frontend); color: var(--hue-frontend); }

.filters button[aria-pressed="true"] {
  background: var(--hue-solid); color: var(--on-hue); border-color: var(--hue-solid);
}

.demo-grid div:nth-child(1) { background: color-mix(in srgb, var(--hue-frontend) 16%, var(--paper)); border-color: var(--hue-frontend); }
.demo-grid div:nth-child(2) { background: color-mix(in srgb, var(--hue-vcs) 16%, var(--paper)); border-color: var(--hue-vcs); }
.demo-grid div:nth-child(3) { background: color-mix(in srgb, var(--hue-strategy) 16%, var(--paper)); border-color: var(--hue-strategy); }
.demo-grid div:nth-child(4) { background: color-mix(in srgb, var(--hue-perf) 16%, var(--paper)); border-color: var(--hue-perf); }

.domains .domain:nth-child(1) .bead { background: var(--hue-frontend); }
.domains .domain:nth-child(2) .bead { background: var(--hue-perf); }
.domains .domain:nth-child(3) .bead { background: var(--hue-strategy); }
.domains .domain:nth-child(4) .bead { background: var(--hue-vcs); }

.rule-accent {
  background: linear-gradient(90deg, var(--hue-frontend), var(--hue-perf));
}

.portrait { border-width: 2px; border-color: var(--hue-frontend); }

/* ============================================================
   About page — one-off layout overrides pulled out of inline style
   ============================================================ */

.about-title { font-size: clamp(1.9rem, 5.2vw, 3.2rem); max-width: 14ch; }
.about-standfirst { margin-top: 1.5rem; }
.about-prose { margin-top: clamp(1.5rem, 5vw, 2.5rem); }
.skills-section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.clients-followup { margin-top: 1.25rem; }

/* ---------- skill bars ---------- */

.skills { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.skill-row {
  display: grid; grid-template-columns: 160px 1fr 34px;
  align-items: center; gap: 0.9rem;
}
.skill-name { font-family: var(--sans); font-size: 13px; color: var(--ink-2); }
.skill-track { height: 5px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.skill-fill { display: block; height: 100%; width: var(--pct, 0%); background: var(--hue); }
.skill-pct { font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-align: right; }

@media (max-width: 480px) {
  .skill-row { grid-template-columns: 108px 1fr 32px; gap: 0.6rem; }
}

/* ============================================================
   Small one-off modifiers pulled out of inline style
   ============================================================ */

.tinted-bleed { margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
.placeholder-note-lg { margin-top: 2rem; }
.wd-summary { font-family: var(--serif); }
.wd-next-label {
  color: var(--ink-3); font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
/* ============================================================
   Newsletter plugin — restyle the [newsletter_form type="minimal"]
   markup to match the original .subscribe design.
   ============================================================ */

.subscribe .tnp-subscription-minimal form {
  display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.subscribe .tnp-email, .tnp-subscription-minimal input.tnp-email {
  flex: 1; min-width: 300px !important; width: 100% !important;
  font-family: var(--sans); font-size: 14px !important; padding: 0 0.85rem !important; height: 44px;
  border: 1px solid var(--rule) !important; border-radius: 5px !important;
  background: var(--paper); color: var(--ink) !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.subscribe .tnp-email::placeholder { color: var(--ink-3); }
.subscribe .tnp-email:focus { border-color: var(--hue-solid); outline: none; box-shadow: 0 0 0 3px var(--hue-bg); }
.subscribe .tnp-submit, .tnp-subscription-minimal input.tnp-submit {
  font-family: var(--sans); font-size: 14px !important; font-weight: 500;
  height: 44px; padding: 0 1.3rem; white-space: nowrap; width:10% !important;
  background: var(--hue-solid) !important; color: var(--on-hue) !important;
  border: 1px solid var(--hue-solid) !important; border-radius: 5px !important; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.subscribe .tnp-submit:hover { opacity: 0.86; }
.subscribe .tnp-submit:active { transform: scale(0.98); }
.subscribe .tnp-field.tnp-privacy-field {
  flex-basis: 100%; text-align: center; margin-top: 0.5rem;
  font-family: var(--sans); font-size: 11.5px; color: var(--ink-3);
}
