/* =========================================================
   Sir Umar Qureshi — design system
   White / light-gray, ink typography, one quiet accent.
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --bg-softer: #fbfbfb;
  --line: #e8e8eb;
  --line-strong: #d9d9de;
  --ink: #0d0d10;
  --ink-2: #34343b;
  --muted: #6c6c75;
  --accent: #2f5bea;
  --accent-soft: #eef2ff;
  --green: #12a150;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .04), 0 1px 1px rgba(16, 16, 24, .03);
  --shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 8px 24px -8px rgba(16, 16, 24, .10);
  --shadow-lg: 0 2px 4px rgba(16, 16, 24, .04), 0 24px 60px -20px rgba(16, 16, 24, .18);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p a, .lead a, .prose a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: text-decoration-color .2s; }
p a:hover, .lead a:hover, .prose a:hover { text-decoration-color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 780px; }
.muted { color: var(--muted); }

/* ---------- Type ---------- */
em { font-style: normal; }
h1 em, h2 em, .display-xl em, .display-lg em, .display-md em, blockquote em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.display-xl { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.02; letter-spacing: -0.04em; }
.display-lg { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -0.035em; }
.display-md { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -0.03em; }
.display-sm { font-size: clamp(1.45rem, 2.4vw, 1.85rem); letter-spacing: -0.025em; }
.display-xl em, .display-lg em, .display-md em { font-size: 1.06em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-2); line-height: 1.6; max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 550; font-size: .97rem; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s, border-color .2s;
}
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-sm { height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -6px rgba(13,13,16,.45); }
.btn-dark:hover { background: #24242a; transform: translateY(-1px); }
.btn-light { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-light:hover { border-color: var(--ink); transform: translateY(-1px); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; font-size: .95rem; white-space: nowrap; }
.link-arrow svg { transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,.9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -0.02em; font-size: 1.02rem; }
.logo-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .02em; flex: none;
}
.logo-mark.sm { width: 34px; height: 34px; border-radius: 10px; font-size: .75rem; }
.logo-sir { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.15em; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav ul a {
  display: block; padding: 8px 14px; border-radius: 999px; font-size: .94rem; color: var(--ink-2); font-weight: 500;
  transition: background .2s, color .2s;
}
.main-nav ul a:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav ul a.active { color: var(--ink); background: var(--bg-soft); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; place-items: center; }
.menu-close { display: none; }

@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 16px;
    background: #fff; padding: 16px var(--gutter) 28px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
  }
  .main-nav ul { flex-direction: column; }
  .main-nav ul a { padding: 14px 12px; font-size: 1.05rem; border-radius: 12px; }
  .nav-open .main-nav { opacity: 1; transform: none; pointer-events: auto; }
  .nav-open .menu-open { display: none; }
  .nav-open .menu-close { display: block; }
  .nav-cta { height: 50px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy .display-xl { margin: 22px 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(18,161,80,.14); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(18,161,80,0); } }

.hero-visual { position: relative; max-width: 440px; justify-self: end; width: 100%; }
.portrait {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 20%, #fff 0, transparent 55%),
    radial-gradient(circle at 80% 90%, #e9ecf6 0, transparent 50%),
    linear-gradient(160deg, #f4f4f6, #e9e9ee);
}
.portrait-placeholder.tall { aspect-ratio: 4/5; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.portrait-placeholder span {
  font-family: var(--font-serif); font-style: italic; font-size: clamp(6rem, 14vw, 9rem); color: var(--ink); line-height: 1; letter-spacing: -0.04em;
}
.portrait-caption {
  position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 14px 18px; border-radius: 16px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.9); display: flex; flex-direction: column; gap: 2px;
}
.portrait-caption strong { font-size: 1rem; letter-spacing: -0.01em; }
.portrait-caption span { font-size: .85rem; color: var(--muted); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.float-card div { display: flex; flex-direction: column; line-height: 1.25; }
.float-card strong { font-size: .93rem; }
.float-card span { font-size: .78rem; color: var(--muted); }
.fc-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft); color: var(--ink); }
.fc-1 { top: 8%; left: -18%; }
.fc-2 { top: 24%; right: -14%; animation-delay: -2s; }
.fc-3 { bottom: 22%; left: -22%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { justify-self: center; max-width: 360px; margin-top: 12px; }
  .fc-1 { left: -6%; top: 4%; } .fc-2 { right: -6%; top: 19%; } .fc-3 { display: none; }
}
@media (max-width: 480px) {
  .hero-visual { max-width: 300px; }
  .fc-1, .fc-3 { left: -4%; } .fc-2 { right: -4%; }
  .float-card { padding: 9px 12px 9px 9px; }
  .fc-icon { width: 30px; height: 30px; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Stats ---------- */
.stats-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-softer); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 24px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { font-size: clamp(2rem, 3.4vw, 2.75rem); letter-spacing: -0.04em; line-height: 1; font-weight: 600; }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(48px, 7vw, 88px) 0; }
.section-top-0 { padding-top: 0; }
.section-gray { background: var(--bg-soft); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .display-md { max-width: 760px; }
.section-text { margin-top: 18px; color: var(--muted); max-width: 600px; font-size: 1.05rem; }
@media (max-width: 760px) { .section-head { flex-direction: column; align-items: flex-start; } }
.two-col { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.two-col .section-head { position: sticky; top: 110px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } .two-col .section-head { position: static; margin-bottom: 8px; } }
.center-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 48px; }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 6vw, 72px); }
.page-hero .display-lg { margin-bottom: 22px; max-width: 900px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a:hover { color: var(--ink); }
.crumb-sep { margin-left: 8px; color: var(--line-strong); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento-card {
  position: relative; overflow: hidden; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg);
  background: var(--bg-soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento-card h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); max-width: 420px; }
.bento-card p { color: var(--muted); max-width: 440px; }
.bento-card .link-arrow { margin-top: auto; padding-top: 8px; }
.bento-teach { grid-column: span 3; }
.bento-build { grid-column: span 3; grid-row: span 2; background: var(--ink); color: #fff; border-color: var(--ink); }
.bento-build p { color: #a9a9b3; }
.bento-build .chip { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.12); }
.bento-mentor { grid-column: span 3; }
.bento-skills { grid-column: span 6; padding-bottom: 28px; }
.chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; font-weight: 550; }
.code-snippet {
  margin-top: 18px; padding: 20px 22px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.8; color: #e6e6ea; overflow-x: auto;
}
.c-k { color: #9db4ff; } .c-s { color: #9ee6b8; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 500; font-size: .95rem; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .bento-teach, .bento-build, .bento-mentor, .bento-skills { grid-column: auto; grid-row: auto; }
}

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) { .project-grid { grid-template-columns: 1fr; } }
.project-card {
  display: flex; flex-direction: column; gap: 22px; padding: 14px 14px 26px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-card:hover .round-arrow { background: var(--ink); color: #fff; }
.project-meta { display: flex; justify-content: space-between; gap: 20px; padding: 0 12px; }
.project-meta .eyebrow { margin-bottom: 8px; }
.project-name { font-size: 1.6rem; margin-bottom: 8px; }
.round-arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .25s, color .25s; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px; }
.tags li { font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }

/* CSS product visual */
.pv { --pv: var(--accent); border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--pv) 12%, #f4f4f6), #eeeef1); padding: clamp(18px, 4vw, 40px) clamp(18px, 4vw, 40px) 0; overflow: hidden; aspect-ratio: 16 / 10; display: flex; align-items: flex-end; }
.pv-lg { aspect-ratio: 16 / 8; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.pv-window { width: 100%; height: 92%; background: #fff; border-radius: 12px 12px 0 0; box-shadow: 0 -2px 30px -8px rgba(20,20,40,.18); overflow: hidden; display: flex; flex-direction: column; }
.pv-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pv-bar > span { width: 9px; height: 9px; border-radius: 50%; background: #e3e3e7; }
.pv-url { margin: 0 auto; font-size: 10px; color: var(--muted); background: var(--bg-soft); padding: 2px 14px; border-radius: 6px; }
.pv-body { flex: 1; display: flex; min-height: 0; }
.pv-side { width: 22%; border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.pv-logo { width: 22px; height: 22px; border-radius: 7px; background: var(--pv); margin-bottom: 6px; }
.pv-side b { height: 7px; border-radius: 4px; background: #ececf0; }
.pv-side b:first-of-type { background: color-mix(in srgb, var(--pv) 35%, #fff); }
.pv-main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pv-row { display: flex; justify-content: space-between; align-items: center; }
.pv-title { width: 40%; height: 10px; border-radius: 5px; background: var(--ink); opacity: .85; }
.pv-pill { width: 18%; height: 16px; border-radius: 8px; background: var(--pv); }
.pv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pv-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pv-card em { width: 50%; height: 5px; border-radius: 3px; background: #e6e6ea; }
.pv-card strong { width: 70%; height: 9px; border-radius: 4px; background: #cfcfd6; }
.pv-chart { flex: 1; display: flex; align-items: flex-end; gap: 5%; padding: 8px 4px 0; border-top: 1px dashed var(--line); min-height: 30px; }
.pv-chart span { flex: 1; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--pv) 70%, #fff); }
.pv-chart span:nth-child(even) { background: color-mix(in srgb, var(--pv) 30%, #fff); }

/* Case study */
.case-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin: 32px 0 clamp(48px, 7vw, 80px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case-facts > div { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.case-facts > div:last-child { border-right: 0; }
.case-facts span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.case-facts strong { font-weight: 500; font-size: .97rem; line-height: 1.45; }
.case-facts a { display: inline-flex; gap: 4px; align-items: center; text-decoration: underline; }
.case-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.case-aside { position: sticky; top: 100px; padding: 28px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.case-aside h3 { font-size: 1.15rem; }
@media (max-width: 860px) { .case-body { grid-template-columns: 1fr; } .case-aside { position: static; } .case-facts > div { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }
.service-card, .value-card, .subject-card {
  padding: 30px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; transition: transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.section-gray .service-card, .section-gray .value-card { background: #fff; }
.section:not(.section-gray) .service-card { background: var(--bg-softer); }
.service-card:hover, .value-card:hover, .subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.service-card h3, .value-card h3, .subject-card h3 { font-size: 1.22rem; }
.service-card p, .value-card p, .subject-card p { color: var(--muted); }
.service-card .checklist { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.icon-box { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); flex: none; }
.section-gray .icon-box { background: var(--bg-softer); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .value-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }
.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .subject-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .subject-grid { grid-template-columns: 1fr; } }
.subject-card { background: var(--bg-soft); }
.subject-num { font-family: var(--font-serif); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--muted); margin-bottom: 16px; }

.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .97rem; }
.checklist svg { flex: none; margin-top: 3px; color: var(--green); }

.principle-list { display: flex; flex-direction: column; }
.principle { display: flex; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line-strong); }
.principle:first-child { padding-top: 0; }
.principle svg { flex: none; margin-top: 4px; color: var(--green); }
.principle h3 { font-size: 1.2rem; margin-bottom: 6px; }
.principle p { color: var(--muted); }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 960px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.process li { padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.step-num { display: block; font-family: var(--font-serif); font-style: italic; font-size: 2.4rem; line-height: 1; margin-bottom: 22px; color: var(--muted); }
.process h3 { font-size: 1.2rem; margin-bottom: 8px; }
.process p { color: var(--muted); font-size: .97rem; }

/* ---------- Quote ---------- */
.big-quote { margin: 0; text-align: center; max-width: 920px; margin-inline: auto; }
.big-quote blockquote { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.2; letter-spacing: -0.03em; font-weight: 500; }
.big-quote figcaption { margin-top: 24px; color: var(--muted); }

/* ---------- Posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .post-grid, .post-grid-2 { grid-template-columns: 1fr; } }
.post-card {
  display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card h3 { font-size: 1.28rem; line-height: 1.25; }
.post-card p { color: var(--muted); font-size: .97rem; }
.post-foot { margin-top: auto; padding-top: 10px; font-size: .85rem; color: var(--muted); }
.tag { align-self: flex-start; display: inline-block; font-size: .76rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); letter-spacing: .01em; }
.post-feature {
  display: flex; justify-content: space-between; gap: 32px; align-items: flex-end; margin-bottom: 16px;
  padding: clamp(28px, 5vw, 56px); border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line);
  transition: box-shadow .35s;
}
.post-feature:hover { box-shadow: var(--shadow); }
.post-feature:hover .round-arrow { background: var(--ink); color: #fff; }
.post-feature > div { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.post-feature p { color: var(--muted); font-size: 1.05rem; }

/* Article */
.article-hero .tag { margin-bottom: 20px; }
.article-hero .display-lg { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.byline div { display: flex; flex-direction: column; line-height: 1.35; }
.byline span { color: var(--muted); font-size: .9rem; }
.prose { color: var(--ink-2); font-size: 1.08rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { color: var(--ink); font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-top: 1.9em; letter-spacing: -0.025em; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding-left: 24px; margin-top: .5em; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.prose .checklist li { padding-left: 0; } .prose .checklist li::before { display: none; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--ink); font-family: var(--font-serif); font-style: italic; font-size: 1.6rem; line-height: 1.35; color: var(--ink); }
.article-body { padding-bottom: 48px; }
.author-box { display: flex; gap: 18px; padding: 28px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line); }
.author-box div { display: flex; flex-direction: column; gap: 8px; }
.author-box p { color: var(--muted); font-size: .97rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-photo img { border-radius: var(--radius-lg); border: 1px solid var(--line); }
.about-grid .prose h2 { margin-bottom: 4px; }
.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px !important; }
.about-facts div { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); font-size: .95rem; color: var(--ink); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-photo { max-width: 420px; } }
@media (max-width: 480px) { .about-facts { grid-template-columns: 1fr; } }
.timeline { position: relative; display: flex; flex-direction: column; gap: 36px; padding-left: 28px; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.tl-period { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.timeline h3 { font-size: 1.3rem; margin: 6px 0 6px; }
.timeline p { color: var(--muted); }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-cloud li { padding: 12px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } }
.faq { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-size: 1.15rem; font-weight: 550; letter-spacing: -0.015em; line-height: 1.35; }
.faq-item p { padding: 0 48px 26px 0; color: var(--muted); }
.faq-icon { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); transition: transform .3s var(--ease), background .2s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s var(--ease); }
.faq-item[open] .faq-icon { background: var(--ink); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: #fff; }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: .88rem; font-weight: 550; color: var(--ink-2); }
.field em { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: #fff;
  font-size: 1rem; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%236c6c75' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(13,13,16,.06); }
.field .invalid { border-color: #d93a3a; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .95rem; min-height: 1.2em; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #d93a3a; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.contact-aside { display: flex; flex-direction: column; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: border-color .2s, box-shadow .25s; min-width: 0; }
a.contact-item:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.contact-item div { display: flex; flex-direction: column; min-width: 0; }
.contact-item span { font-size: .82rem; color: var(--muted); }
.contact-item strong { font-weight: 550; overflow-wrap: anywhere; }
.note-card { margin-top: 8px; padding: 22px; border-radius: var(--radius); background: var(--accent-soft); color: #1d2b6b; }
.note-card p { margin-top: 6px; font-size: .95rem; color: #3a4785; }

.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; transition: border-color .2s, background .2s, color .2s; }
.socials a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding-top: clamp(64px, 9vw, 112px); }
.footer-cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: clamp(48px, 7vw, 80px); border-bottom: 1px solid var(--line-strong); }
.footer-cta h2 { max-width: 700px; }
@media (max-width: 760px) { .footer-cta { flex-direction: column; align-items: flex-start; } }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding: 56px 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: 18px; }
.footer-brand p { color: var(--muted); max-width: 320px; }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--ink-2); overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0 32px; border-top: 1px solid var(--line-strong); font-size: .88rem; color: var(--ink-2); }

/* ---------- Utilities ---------- */
.small { font-size: .88rem; }
.h3 { font-size: 1.22rem; }
.center-block { text-align: center; display: flex; flex-direction: column; align-items: center; }
.center-block .section-text { margin-inline: auto; }
.row-actions-lg { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stretched::after { content: ""; position: absolute; inset: 0; }

/* Header: 6 links + CTA */
@media (max-width: 1140px) and (min-width: 961px) { .main-nav ul a { padding: 8px 10px; font-size: .9rem; } .main-nav { gap: 16px; } }

/* Hero additions */
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-tags li { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; }
.portrait picture, .portrait img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 12%; }

/* Featured project */
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 960px) { .feature { grid-template-columns: 1fr; } }
.feature-list { display: flex; flex-direction: column; }
.feature-list li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.feature-list li:first-child { padding-top: 0; }
.feature-list strong { font-size: 1.05rem; letter-spacing: -0.01em; }
.feature-list span { color: var(--muted); font-size: .97rem; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.feature-pills span { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; padding: 7px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }

/* Expertise */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.exp-grid-sm { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .exp-grid-sm { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) { .exp-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .exp-grid, .exp-grid-sm { grid-template-columns: 1fr; } }
.exp-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s, border-color .3s; }
.exp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.exp-card h2, .exp-card h3 { font-size: 1.22rem; }
.exp-card p { color: var(--muted); }
.exp-card .link-arrow { margin-top: auto; padding-top: 6px; }
.exp-card:hover .icon-box { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-box { transition: background .25s, color .25s; }
.exp-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .exp-detail { grid-template-columns: 1fr; } }
.exp-detail .service-card { background: var(--bg-softer); }
.tool-row { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.tags-flush { padding: 0; }
.aside-label { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

/* Project cards v2 */
.project-card { position: relative; }
.pc-visual { display: block; border-radius: 20px; overflow: hidden; }
.project-name a { color: inherit; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 12px; }
.pc-foot .tags { padding: 0; }
.live-link { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; transition: border-color .2s, background .2s; }
.live-link:hover { border-color: var(--ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(18,161,80,.15); flex: none; }

/* Shop & academy mockups */
.pv-col { flex-direction: column; padding: 10px; gap: 8px; }
.pv-nav { display: flex; align-items: center; gap: 8px; }
.pv-nav .pv-logo { margin: 0; width: 20px; height: 20px; }
.pv-search { flex: 1; height: 14px; border-radius: 7px; background: var(--bg-soft); border: 1px solid var(--line); display: block; }
.pv-nav em { width: 14px; height: 14px; border-radius: 50%; background: #ececf0; }
.pv-banner { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 8px; background: linear-gradient(120deg, var(--pv), color-mix(in srgb, var(--pv) 60%, #ffcf99)); min-height: 30%; }
.pv-banner div { display: flex; flex-direction: column; gap: 6px; width: 50%; }
.pv-banner strong { height: 9px; width: 90%; border-radius: 4px; background: rgba(255,255,255,.95); }
.pv-banner span { height: 6px; width: 60%; border-radius: 3px; background: rgba(255,255,255,.7); }
.pv-banner > i { width: 18%; height: 14px; border-radius: 7px; background: #fff; }
.pv-products { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; min-height: 0; }
.pv-prod { border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.pv-prod i { flex: 1; border-radius: 6px; background: linear-gradient(160deg, #f1f1f4, #e3e3e8); min-height: 20px; }
.pv-prod b { height: 5px; width: 80%; border-radius: 3px; background: #dcdce2; }
.pv-prod em { height: 7px; width: 45%; border-radius: 3px; background: var(--pv); }
.pv-courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pv-course { border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.pv-course i { height: 26px; border-radius: 6px; background: color-mix(in srgb, var(--pv) 22%, #fff); }
.pv-course b { height: 5px; width: 85%; border-radius: 3px; background: #d6d6dc; }
.pv-course em { height: 5px; width: 50%; border-radius: 3px; background: #ececf0; }
.pv-shop { background: linear-gradient(160deg, color-mix(in srgb, var(--pv) 16%, #f6f6f7), #eeeef1); }

/* Case study extras */
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 0 clamp(48px, 7vw, 80px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.highlights > div { padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.highlights > div:last-child { border-right: 0; }
.highlights strong { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.03em; line-height: 1.1; }
.highlights span { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .highlights { grid-template-columns: 1fr 1fr; } .highlights > div:nth-child(2) { border-right: 0; } .highlights > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.case-aside > div p { color: var(--ink-2); font-size: .97rem; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .module-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .module-grid { grid-template-columns: 1fr; } }
.module-card { padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.module-card .subject-num { margin-bottom: 8px; font-size: 2rem; }
.module-card h3 { font-size: 1.18rem; }
.module-card p { color: var(--muted); }

/* About */
.about-photos { position: relative; padding-bottom: 18%; }
.about-photo-main img { border-radius: var(--radius-lg); border: 1px solid var(--line); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-photo-small { position: absolute; right: -6%; bottom: 0; width: 42%; }
.about-photo-small img { border-radius: 18px; border: 6px solid #fff; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; object-position: top; width: 100%; }
@media (max-width: 860px) { .about-photos { max-width: 460px; } .about-photo-small { right: 0; } }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .live-grid { grid-template-columns: 1fr; } }
.live-card { --pv: var(--accent); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 30px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.live-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--pv); }
.live-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.live-card h3 { font-size: 1.6rem; }
.live-card p { color: var(--muted); }
.live-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #eaf7ef; color: #0e6b37; }

/* Gallery + lightbox */
.gallery-masonry { columns: 3 280px; column-gap: 16px; }
.gallery-masonry .gallery-item { break-inside: avoid; margin-bottom: 16px; }
.gallery-item { display: block; border-radius: 18px; overflow: hidden; background: var(--bg-soft); position: relative; }
.gallery-item img { width: 100%; height: auto; display: block; transition: transform .6s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-strip { display: grid; grid-template-columns: 1.1fr 1.5fr 1.1fr 1.5fr 1.1fr; gap: 12px; }
.gallery-strip .gallery-item { aspect-ratio: 3/4; }
.gallery-strip .gallery-item:nth-child(even) { aspect-ratio: auto; }
.gallery-strip .gallery-item picture, .gallery-strip .gallery-item img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .gallery-strip { grid-template-columns: 1fr 1fr; } .gallery-strip .gallery-item { aspect-ratio: 4/5 !important; } .gallery-strip .gallery-item:nth-child(5) { display: none; } }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,10,12,.92); display: none; align-items: center; justify-content: center; padding: 24px 64px; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 1100px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; object-fit: contain; }
.lightbox figcaption { color: #cfcfd6; font-size: .95rem; text-align: center; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 20px 12px; } .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; } }

/* Quote with avatar */
.big-quote figcaption { display: inline-flex; align-items: center; gap: 12px; }
.quote-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; }

/* Footer extras */
.footer-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-h2 { margin-top: 26px; }
.footer-grid { grid-template-columns: 1.4fr 1.2fr .9fr 1.2fr; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Post cards with cover */
.post-cover { width: calc(100% + 56px); margin: -28px -28px 6px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-width: none; }

/* ---------- Blog (PHP) ---------- */
.blog-hero { padding-bottom: 40px; }
.blog-search { display: flex; gap: 8px; margin-top: 30px; max-width: 560px; }
.blog-search input { flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-size: 1rem; }
.blog-search input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(13,13,16,.06); }
.blog-search .btn { height: 50px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: border-color .2s, background .2s; }
.chips a:hover { border-color: var(--ink); }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips b { font-weight: 600; opacity: .55; margin-left: 4px; }
.blog-featured { margin-bottom: 20px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { display: flex; flex-direction: column; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.bc-img { aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.bc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.blog-card:hover .bc-img img { transform: scale(1.04); }
.bc-ph { display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #fff, transparent 50%), linear-gradient(140deg, #f1f2f6, #e4e6ee); }
.bc-ph span { font-family: var(--font-serif); font-style: italic; font-size: 1.6rem; color: var(--ink-2); padding: 0 20px; text-align: center; }
.bc-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bc-body h3 { font-size: 1.25rem; line-height: 1.25; }
.bc-body p { color: var(--muted); font-size: .96rem; }
.bc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.bc-foot .logo-mark.sm, .byline-avatar { width: 28px; height: 28px; border-radius: 50%; font-size: .62rem; object-fit: cover; flex: none; }
.dot-sep { opacity: .5; }
.blog-card-lg { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; }
.blog-card-lg .bc-img { aspect-ratio: 16/9; height: 100%; }
.blog-card-lg .bc-body { padding: clamp(24px, 4vw, 44px); justify-content: center; }
.blog-card-lg h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -0.03em; }
@media (max-width: 860px) { .blog-card-lg { grid-template-columns: 1fr; } .blog-card-lg .bc-img { height: auto; } }
.blog-pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.blog-pager a { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 500; }
.blog-pager a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty-state { text-align: center; padding: 60px 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.preview-bar { background: #fff6e0; color: #6b4a07; text-align: center; padding: 10px 16px; font-size: .92rem; border-bottom: 1px solid #f1dcb4; }
.preview-bar a { text-decoration: underline; }
.article-hero .tag { margin-bottom: 20px; }
.article-hero .byline .byline-avatar, .article-hero .byline .logo-mark { width: 44px; height: 44px; }
.article-cover { margin: 0 auto 8px; }
.article-cover img { width: 100%; max-height: 620px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.article-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(32px, 5vw, 72px); justify-content: center; padding-top: 40px; padding-bottom: 72px; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 720px); } .article-aside { order: 2; } }
.article-aside { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 1000px) { .article-aside { position: static; } .article-aside .toc { display: none; } }
.toc-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: .9rem; color: var(--muted); line-height: 1.4; }
.toc li.toc-h3 a { padding-left: 26px; font-size: .86rem; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--ink); font-weight: 550; }
.share-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btns a, .share-btns button { font: inherit; font-size: .82rem; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.share-btns a:hover, .share-btns button:hover { border-color: var(--ink); color: var(--ink); }
.article-body { padding-bottom: 32px; }
.article-body img { border-radius: 14px; margin: 1.6em 0; border: 1px solid var(--line); }
.article-body h2, .article-body h3 { scroll-margin-top: 100px; }
.article-body h3 { color: var(--ink); font-size: 1.3rem; margin-top: 1.6em; letter-spacing: -0.02em; }
.article-body ol { padding-left: 1.3em; }
.article-body ol li { margin-top: .5em; }
.article-body pre { background: #0f1115; color: #e6e6ea; padding: 18px 20px; border-radius: 14px; overflow-x: auto; font-size: .9rem; line-height: 1.6; }
.article-body code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
.article-body :not(pre) > code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .97rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.article-body th { background: var(--bg-soft); }
.article-body iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 14px; }
.article-body .ql-align-center { text-align: center; }
.article-body .ql-align-right { text-align: right; }
.article-body li[data-list="bullet"] { list-style: none; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 28px; }
.post-tags a { font-size: .88rem; padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }
.post-tags a:hover { background: var(--ink); color: #fff; }
.author-box .byline-avatar, .author-box .logo-mark { width: 64px; height: 64px; border-radius: 50%; }
.article-cta { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 30px; border-radius: var(--radius-lg); background: var(--ink); color: #fff; }
.article-cta .muted { color: #a9a9b3; margin-top: 6px; }
.article-cta .btn-dark { background: #fff; color: var(--ink); }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound .display-xl { margin-bottom: 20px; }

/* ---------- Reveal on scroll ---------- */
.reveal.pre { opacity: 0; transform: translateY(18px); }
.reveal.pre.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal.pre { opacity: 1; transform: none; }
}
@media (max-width: 480px) { .fc-2 { display: none; } .fc-1 { top: -2%; } }
