/*
Theme Name: Fahim Teaz
Theme URI: https://fahimteaz.co.uk
Author: Imteaz Fahim
Description: A social-profile style personal brand site: stories, a journal feed, case studies, content and career. Everything is editable in the dashboard (Profile menu and Appearance → Customise → Profile settings).
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fahimteaz
Tags: blog, portfolio, one-column, two-columns, custom-logo, post-formats, translation-ready
*/

/* fahimteaz — social profile prototype */
:root {
  color-scheme: light;
  --bg: #FFFFFF; --bg-2: #F5F5F4; --bg-3: #ECECEA;
  --ink: #111111; --ink-2: #3F3F3D; --muted: #737370; --line: #E8E8E5;
  --accent: #E8590C; --accent-2: #F59F00; --accent-ink: #C2410C;
  --ring: conic-gradient(from 210deg, #F59F00, #E8590C, #D6336C, #F59F00);
  --seen: #D4D4D0;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0B0B; --bg-2: #161616; --bg-3: #222222;
  --ink: #F2F2F0; --ink-2: #C9C9C5; --muted: #8C8C88; --line: #242424;
  --accent: #FF7A33; --accent-ink: #FF8A4C; --seen: #3A3A3A;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .3s var(--ease), color .3s var(--ease); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* ---------- Rail (desktop left / mobile bottom) ---------- */
.rail { position: fixed; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); }
.rail__btn { position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 14px; padding: 12px; transition: background .2s var(--ease), transform .2s var(--ease); color: var(--ink); }
.rail__btn:hover { background: var(--bg-2); }
.rail__btn:active { transform: scale(.94); }
.rail__btn.is-active svg { stroke-width: 2.6; }
.rail__btn.is-active span { font-weight: 700; }
.rail__me img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.rail__me.is-active img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.rail__logo { font-weight: 700; letter-spacing: -0.04em; font-size: 1.35rem; text-decoration: none; padding: 12px; }
.rail__theme .moon { display: none; } [data-theme="dark"] .rail__theme .sun { display: none; } [data-theme="dark"] .rail__theme .moon { display: block; }
.badge { position: absolute; top: 9px; left: 26px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
@media (min-width: 900px) {
  .rail { left: 0; top: 0; bottom: 0; width: 88px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 0; }
  .rail__btn span { display: none; }
  .rail__theme { margin-top: auto; }
}
@media (min-width: 1280px) {
  .rail { width: 244px; align-items: stretch; padding: 24px 14px; }
  .rail__btn span { display: inline; font-size: 1rem; }
  .rail__logo { padding: 12px 12px 26px; }
  .badge { left: 26px; }
}
@media (max-width: 899px) {
  .rail { left: 0; right: 0; bottom: 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; }
  .rail__logo, .rail__btn span { display: none; }
  .rail__btn { justify-content: center; padding: 10px 0; }
  .badge { left: calc(50% + 4px); top: 8px; }
}

/* ---------- Shell ---------- */
.shell { max-width: 640px; margin: 0 auto; padding-bottom: 96px; }
@media (min-width: 900px) { .shell { margin-left: calc(88px + max(0px, (100vw - 88px - 640px) / 2)); } }
@media (min-width: 1280px) { .shell { margin-left: calc(244px + max(0px, (100vw - 244px - 640px) / 2)); } }

/* ---------- Profile ---------- */
.cover { height: 190px; background: #0B0B0B; position: relative; overflow: hidden; }
@media (min-width: 640px) { .cover { height: 220px; border-radius: 0 0 22px 22px; } }
.cover__art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 28px; color: #F2F2F0; font-weight: 700; letter-spacing: -0.05em; line-height: .9; font-size: clamp(2.6rem, 9vw, 4.2rem); }
.cover__art span:last-child { background: linear-gradient(90deg, #F59F00, #E8590C 55%, #D6336C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cover::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(232,89,12,.35), transparent 70%); }
.profile__row { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; margin-top: -52px; position: relative; }
.avatar-ring { width: 112px; height: 112px; border-radius: 50%; padding: 4px; border: 0; background: var(--ring); cursor: pointer; transition: transform .25s var(--spring); }
.avatar-ring:hover { transform: scale(1.04); } .avatar-ring:active { transform: scale(.96); }
.avatar-ring.is-seen { background: var(--seen); }
.avatar-ring picture, .avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 4px solid var(--bg); }
.profile__actions { display: flex; gap: 8px; padding-bottom: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; transition: transform .2s var(--spring), background .2s var(--ease); }
.btn:hover { background: var(--bg-3); } .btn:active { transform: scale(.95); }
.btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--icon { width: 38px; padding: 0; } .btn--icon svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.profile__text { padding: 12px 16px 4px; }
.profile__name { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.035em; margin: 0; line-height: 1.15; }
.profile__handle { color: var(--muted); margin: 2px 0 10px; font-size: .95rem; }
.profile__bio { margin: 0 0 8px; color: var(--ink); white-space: pre-line; }
.profile__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.profile__meta a { color: var(--accent-ink); text-decoration: none; }
.stats { list-style: none; display: flex; gap: 22px; padding: 0; margin: 0; font-size: .92rem; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }

/* Highlights */
.highlights { display: flex; gap: 16px; overflow-x: auto; padding: 18px 16px 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.highlights::-webkit-scrollbar { display: none; }
.hl { flex: none; width: 74px; text-align: center; background: none; border: 0; cursor: pointer; padding: 0; scroll-snap-align: start; }
.hl__ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: var(--ring); margin: 0 auto 6px; transition: transform .25s var(--spring); }
.hl:hover .hl__ring { transform: scale(1.06); } .hl:active .hl__ring { transform: scale(.94); }
.hl.is-seen .hl__ring { background: var(--seen); }
.hl__inner { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: -0.03em; overflow: hidden; }
.hl__inner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hl__label { font-size: .76rem; color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tabs */
.tabs { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.tabs a { text-align: center; padding: 14px 0 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; position: relative; transition: color .2s var(--ease); }
.tabs a[aria-selected="true"] { color: var(--ink); }
.tabs a[aria-selected="true"]::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 3px; border-radius: 3px; background: var(--ink); animation: tabIn .35s var(--spring); }
@keyframes tabIn { from { transform: scaleX(.2); } to { transform: none; } }
.panel { animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 14px; font-size: .88rem; cursor: pointer; font-weight: 500; transition: all .2s var(--ease); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:active { transform: scale(.95); }

/* ---------- Posts ---------- */
.post { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s var(--ease); position: relative; animation: fadeUp .45s var(--ease) both; }
.post:hover { background: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.post__av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.post__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .93rem; margin-bottom: 2px; }
.post__head b { font-weight: 650; }
.post__head .muted { color: var(--muted); }
.post__pin { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px; margin: -4px 0 6px; grid-column: 2; }
.post__pin svg { width: 13px; height: 13px; }
.dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,89,12,.5); } 50% { box-shadow: 0 0 0 5px rgba(232,89,12,0); } }
.tag-type { font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag-draft { background: #FFF1B8; color: #5A4500; } [data-theme="dark"] .tag-draft { background: #4A3F12; color: #FFE9A3; }
.post__text { white-space: pre-line; margin: 2px 0 0; overflow-wrap: anywhere; }
.post__text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.post__more { color: var(--muted); font-weight: 500; }
.post__title { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.02em; margin: 2px 0 4px; line-height: 1.3; }
.post__tags { display: flex; gap: 8px; margin-top: 8px; font-size: .85rem; color: var(--accent-ink); }
.post__actions { display: flex; gap: 4px; margin: 8px 0 -6px -8px; }
.act { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: .85rem; transition: color .2s var(--ease), background .2s var(--ease); }
.act svg { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.act:hover { background: var(--bg-2); color: var(--ink); }
.act:active svg { transform: scale(.8); }
.act.is-on { color: var(--accent); } .act.is-on svg { fill: currentColor; animation: popIn .45s var(--spring); }
@keyframes popIn { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Rich cards inside posts */
.cardlink { display: block; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .3s var(--ease); }
.cardlink:hover { transform: translateY(-2px); }
.case-art { padding: 22px; display: flex; justify-content: space-between; align-items: flex-end; min-height: 150px; position: relative; overflow: hidden; }
.case-art__num { font-size: 3.4rem; font-weight: 700; letter-spacing: -0.06em; line-height: .9; }
.case-art__sub { font-size: .8rem; font-weight: 600; opacity: .85; }
.case-art__cta { position: absolute; top: 16px; right: 16px; font-size: .72rem; font-weight: 600; background: rgba(255,255,255,.7); color: #111; padding: 4px 10px; border-radius: 999px; }
.cardlink__body { padding: 12px 16px 14px; }
.cardlink__body b { display: block; font-size: 1rem; letter-spacing: -0.01em; }
.cardlink__body span { color: var(--muted); font-size: .86rem; }
.essay-card { padding: 18px 18px 16px; background: var(--bg-2); }
.essay-card .kicker { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }
.essay-card b { display: block; font-size: 1.2rem; letter-spacing: -0.025em; line-height: 1.25; margin: 6px 0; }
.essay-card span { color: var(--muted); font-size: .86rem; }
.milestone { margin-top: 8px; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg-2)); }
.milestone i { font-style: normal; font-size: 1.6rem; }
.reel-card { margin-top: 10px; width: min(260px, 70%); aspect-ratio: 9/16; border-radius: var(--radius); background: #1E2A30; position: relative; display: grid; place-items: center; color: #fff; overflow: hidden; }
.reel-card .play, .reel .play { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); display: grid; place-items: center; }
.reel-card .play svg, .reel .play svg { fill: #fff; stroke: none; width: 22px; height: 22px; margin-left: 3px; }
.reel-card small { position: absolute; bottom: 12px; left: 12px; right: 12px; font-size: .74rem; opacity: .85; }

/* Burst (applause) */
.burst { position: absolute; pointer-events: none; z-index: 5; font-size: 64px; transform: translate(-50%, -50%) scale(0); animation: burst .8s var(--spring) forwards; }
@keyframes burst { 0% { transform: translate(-50%,-50%) scale(0); opacity: 0; } 30% { transform: translate(-50%,-50%) scale(1.2); opacity: 1; } 70% { transform: translate(-50%,-60%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-90%) scale(.9); opacity: 0; } }

/* Feed loading */
.feed-sentinel { padding: 8px 16px; }
.skeleton { height: 92px; border-radius: 14px; margin: 10px 0; background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.feed-end { text-align: center; color: var(--ink-2); padding: 28px 16px; font-weight: 600; }
.feed-end span { color: var(--muted); font-weight: 400; font-size: .9rem; }

/* ---------- Work grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding-top: 3px; }
.tile { aspect-ratio: 1; position: relative; border: 0; padding: 12px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; text-align: left; overflow: hidden; transition: filter .2s var(--ease); }
.tile__num { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 700; letter-spacing: -0.06em; line-height: .9; }
.tile__name { font-size: clamp(.68rem, 2.2vw, .82rem); font-weight: 600; }
.tile__hover { position: absolute; inset: 0; background: rgba(0,0,0,.62); color: #fff; display: grid; place-items: center; text-align: center; padding: 12px; font-size: .86rem; font-weight: 600; opacity: 0; transition: opacity .25s var(--ease); }
.tile:hover .tile__hover, .tile:focus-visible .tile__hover { opacity: 1; }
.tile__stack { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; }

/* ---------- Reels ---------- */
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding-top: 3px; }
.reel { aspect-ratio: 9/16; position: relative; display: grid; place-items: center; color: #fff; border: 0; cursor: pointer; overflow: hidden; }
.reel b { position: absolute; left: 10px; right: 10px; bottom: 26px; font-size: .78rem; text-align: left; line-height: 1.25; }
.reel small { position: absolute; left: 10px; bottom: 9px; font-size: .66rem; opacity: .75; }
.note { color: var(--muted); font-size: .85rem; text-align: center; padding: 16px; }

/* ---------- About ---------- */
.about { padding: 14px 16px; display: grid; gap: 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2 { font-size: 1.05rem; margin: 0 0 10px; letter-spacing: -0.01em; }
.card p { margin: 0 0 10px; color: var(--ink-2); }
.xp { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.xp li { display: grid; padding-left: 16px; position: relative; }
.xp li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.xp b { font-weight: 600; } .xp span { color: var(--muted); font-size: .88rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { background: var(--bg-2); padding: 6px 12px; border-radius: 999px; font-size: .86rem; }
.card blockquote { margin: 0 0 14px; font-size: 1.02rem; line-height: 1.45; }
.card cite { display: block; font-style: normal; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.more { color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.foot { color: var(--muted); font-size: .78rem; text-align: center; padding: 28px 16px; }

/* ---------- Story viewer ---------- */
.story { position: fixed; inset: 0; z-index: 100; background: #0B0B0B; color: #fff; display: flex; flex-direction: column; }
@media (min-width: 700px) { .story { inset: 3vh auto 3vh 50%; transform: translateX(-50%); width: min(430px, 92vw); border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 100vmax rgba(0,0,0,.85); } }
.story__bars { display: flex; gap: 4px; padding: 12px 12px 0; }
.story__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.story__bar i { display: block; height: 100%; width: 0; background: #fff; }
.story__bar.done i { width: 100%; }
.story__bar.run i { animation: fill var(--dur, 5s) linear forwards; }
.story.paused .story__bar.run i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }
.story__head { display: flex; align-items: center; gap: 10px; padding: 12px; font-size: .92rem; position: relative; z-index: 3; }
.story__head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.story__close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; padding: 4px 8px; }
.story__stage { flex: 1; position: relative; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 26px 44px; animation: slideIn .45s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.slide__kicker { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-bottom: 10px; }
.slide__big { font-size: clamp(2.2rem, 9vw, 3rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin: 0 0 12px; }
.slide__small { font-size: 1.05rem; opacity: .88; margin: 0; max-width: 28ch; }
.slide__photo { position: absolute; inset: 0; background-size: cover; background-position: 50% 30%; }
.slide__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1) 40%, rgba(0,0,0,.85)); }
.slide > *:not(.slide__photo):not(.slide__deco) { position: relative; z-index: 1; }
.slide__cta { margin-top: 20px; align-self: flex-start; background: #fff; color: #111; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 650; font-size: .95rem; position: relative; z-index: 4; }
.story__nav { position: absolute; top: 70px; bottom: 0; width: 35%; background: none; border: 0; cursor: pointer; z-index: 2; }
.story__nav--prev { left: 0; } .story__nav--next { right: 0; width: 65%; }

/* ---------- Sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 700px) { .sheet { align-items: center; } }
.sheet__card { background: var(--bg); width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; border-radius: 22px 22px 0 0; animation: up .4s var(--ease); }
@media (min-width: 700px) { .sheet__card { border-radius: 22px; } }
.sheet__card--post { max-width: 620px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.sheet__head h2 { font-size: 1.05rem; margin: 0; }
.sheet__head p { margin: 0; color: var(--muted); font-size: .8rem; }
.sheet__head img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sheet__head button { margin-left: auto; background: none; border: 0; font-size: 1.15rem; cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.sheet__head button:hover { background: var(--bg-2); }
.notifs { list-style: none; margin: 0; padding: 6px 0; }
.notifs a { display: flex; gap: 12px; align-items: center; padding: 12px 16px; text-decoration: none; }
.notifs a:hover { background: var(--bg-2); }
.notifs img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.notifs span { color: var(--muted); font-size: .82rem; display: block; }
.chat__body { padding: 16px; display: grid; gap: 10px; }
.bubble { background: var(--bg-2); padding: 10px 14px; border-radius: 18px 18px 18px 6px; max-width: 80%; animation: popBubble .35s var(--spring); }
.bubble--me { justify-self: end; background: var(--accent); color: #fff; border-radius: 18px 18px 6px 18px; }
@keyframes popBubble { from { transform: scale(.8); opacity: 0; } }
.chat__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.chat__topics button { border: 1px solid var(--line); background: var(--bg); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: .9rem; }
.chat__topics button:hover { border-color: var(--ink); }
.chat__compose { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat__compose textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); border-radius: 16px; padding: 10px 14px; font: inherit; }
.chat__fine { color: var(--muted); font-size: .75rem; padding: 0 16px 14px; margin: 0; }

/* Full post */
.full { padding: 18px; }
.full .post__text { font-size: 1.05rem; }
.full__top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.full__top img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.full__close { margin-left: auto; background: none; border: 0; font-size: 1.15rem; cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.full__nav { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.full__nav button { background: none; border: 0; color: var(--accent-ink); cursor: pointer; font-weight: 600; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all .3s var(--spring); z-index: 120; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* fixes */
.hl__ring, .hl__inner, .hl__label { display: block; }
.hl__inner { display: grid; }
.avatar-ring { display: block; flex: none; }
.avatar-ring picture { display: block; }
.btn { white-space: nowrap; }
.stats { flex-wrap: wrap; gap: 6px 18px; }
.stats li { white-space: nowrap; }
@media (max-width: 480px) {
  .avatar-ring { width: 96px; height: 96px; }
  .profile__row { margin-top: -44px; }
  .profile__actions { gap: 6px; }
  .btn { height: 34px; padding: 0 12px; font-size: .86rem; }
  .btn--icon { width: 34px; padding: 0; }
}
.slide__deco { position: absolute; right: -10px; top: 40px; font-size: 11rem; font-weight: 700; letter-spacing: -0.08em; opacity: .12; line-height: 1; pointer-events: none; }


/* ---------- Desktop sidebar (fills the right side) ---------- */
.side { display: none; }
@media (min-width: 1180px) {
  .layout { display: grid; grid-template-columns: minmax(0, 640px) 340px; gap: 36px; justify-content: center; margin-left: 88px; padding-right: 24px; }
  .layout .shell { margin: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; align-self: start; padding: 18px 0 24px; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .cover { border-radius: 0; }
}
@media (min-width: 1280px) { .layout { margin-left: 244px; } }
.side__card { background: var(--bg-2); border-radius: 20px; padding: 16px 18px; }
.side__card h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
.side__fine { color: var(--muted); font-size: .76rem; margin: 10px 0 0; }
.proofgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.proofgrid button { background: var(--s); color: var(--c); border: 0; border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; display: grid; gap: 2px; transition: transform .25s var(--spring); }
.proofgrid button:hover { transform: translateY(-2px) scale(1.02); } .proofgrid button:active { transform: scale(.96); }
.proofgrid b { font-size: 1.7rem; letter-spacing: -0.05em; line-height: 1; }
.proofgrid span { font-size: .78rem; font-weight: 600; color: #222; }
.proofgrid small { font-size: .7rem; opacity: .8; }
[data-theme="dark"] .proofgrid button { filter: saturate(.9) brightness(.92); }
.topics { list-style: none; margin: 0; padding: 0; }
.topics button { width: 100%; display: flex; justify-content: space-between; align-items: baseline; background: none; border: 0; padding: 9px 2px; cursor: pointer; border-radius: 10px; text-align: left; }
.topics button:hover { background: var(--bg-3); padding-inline: 8px; }
.topics b { font-weight: 650; }
.topics span { color: var(--muted); font-size: .8rem; }
.quote-rot figure { margin: 0; min-height: 132px; }
.quote-rot blockquote { margin: 0 0 8px; font-size: .98rem; line-height: 1.45; animation: fadeUp .5s var(--ease); }
.quote-rot figcaption { color: var(--muted); font-size: .78rem; animation: fadeUp .5s var(--ease); }
.qdots { display: flex; gap: 6px; margin-top: 10px; }
.qdots button { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.qdots button[aria-current="true"] { width: 20px; border-radius: 4px; background: var(--ink); }
.brands { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: .92rem; }
.brands i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; }
.side__cta { background: #111; color: #F2F2F0; }
[data-theme="dark"] .side__cta { background: var(--bg-3); }
.side__cta p { color: #B5B5B0; font-size: .9rem; margin: -4px 0 12px; }
.side__cta .btn--primary { background: #F2F2F0; color: #111; border-color: #F2F2F0; width: 100%; }
.side__cta .btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.side__foot { color: var(--muted); font-size: .75rem; padding: 0 6px; margin: 0; }
.side__foot a { color: inherit; }

@media (min-width: 1600px) { .layout { grid-template-columns: minmax(0, 680px) 380px; gap: 44px; } .shell { max-width: 680px; } }


/* ---------- v1.2: fill the width at every desktop/tablet size ---------- */
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr); margin-left: 88px; padding: 0 20px; gap: 24px; justify-content: stretch; }
  .layout .shell { margin: 0 auto; max-width: 760px; width: 100%; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
  .cover { border-radius: 0; }
}
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .layout .shell { max-width: none; }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; align-self: start; padding: 18px 0 24px; max-height: 100vh; overflow-y: auto; scrollbar-width: none; }
}
@media (min-width: 1180px) { .layout { grid-template-columns: minmax(0, 680px) 340px; justify-content: center; gap: 36px; } }
@media (min-width: 1280px) { .layout { margin-left: 244px; } }
@media (min-width: 1600px) { .layout { grid-template-columns: minmax(0, 720px) 380px; gap: 44px; } }
@media (max-width: 1099px) and (min-width: 1000px) { .proofgrid b { font-size: 1.45rem; } .side__card { padding: 14px; } }
@media (min-width: 700px) and (max-width: 899px) { .shell { max-width: 760px; } }

/* ===== v1.3: voice-call changes ===== */
/* Logo: bigger, swappable image or "IF." text mark */
.rail__logo { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.06em; line-height: 1; color: var(--ink); display: flex; align-items: center; }
.rail__logo i, .mbar__logo i { color: var(--accent); font-style: normal; }
.rail__logo img, .mbar__logo img { display: block; max-width: 100%; }
@media (min-width: 900px) and (max-width: 1279px) { .rail__logo { font-size: 1.6rem !important; padding: 8px 0 14px; } .rail__logo img { max-width: 60px; height: auto !important; } }
@media (min-width: 1280px) { .rail__logo { padding: 2px 12px 22px; } }
.rail__theme span { white-space: nowrap; }
/* Covers: one image per theme */
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.cover__img--dark { display: none; }
[data-theme="dark"] .cover.has-dark .cover__img--light { display: none; }
[data-theme="dark"] .cover.has-dark .cover__img--dark { display: block; }
.cover.has-light .cover__art, .cover.has-light::after { display: none; }
/* Mobile top bar (logo + light/dark) */
.mbar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
.mbar__logo { color: #F2F2F0; text-decoration: none; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.06em; line-height: 1; }
.mbar__logo img { height: 32px !important; }
.mbar__theme { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); color: #fff; }
.mbar__theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mbar__theme .moon { display: none; } [data-theme="dark"] .mbar__theme .sun { display: none; } [data-theme="dark"] .mbar__theme .moon { display: block; }
@media (min-width: 900px) { .mbar { display: none; } }
@media (max-width: 899px) { .rail__theme { display: none !important; } .rail { grid-template-columns: repeat(7, 1fr); } }
/* Results: swipeable row on mobile/tablet, sidebar on desktop */
.mresults { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 14px -16px 2px; padding: 0 16px 4px; scrollbar-width: none; }
.mresults::-webkit-scrollbar { display: none; }
.mresults button { flex: 0 0 auto; width: 138px; scroll-snap-align: start; background: var(--s); color: var(--c); border: 0; border-radius: 14px; padding: 11px 12px; text-align: left; cursor: pointer; display: grid; gap: 2px; }
.mresults b { font-size: 1.45rem; letter-spacing: -0.05em; line-height: 1; }
.mresults span { font-size: .76rem; font-weight: 600; color: #222; }
.mresults small { font-size: .68rem; opacity: .8; }
@media (min-width: 1000px) { .mresults { display: none; } }
/* Desktop: the left menu does the job, so hide the duplicate tab row */

/* Post topic labels (no hashtags) */
.post__tags span { background: var(--bg-2); color: var(--muted); border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 500; }
/* LinkedIn verification link */
.li-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: #0A66C2; font-weight: 600; font-size: .86rem; text-decoration: none; }
.li-link svg { width: 18px; height: 18px; fill: #0A66C2; flex: none; }
.li-link:hover { text-decoration: underline; }
[data-theme="dark"] .li-link { color: #70B5F9; } [data-theme="dark"] .li-link svg { fill: #70B5F9; }
/* Newsletter */
.nl h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
.nl p { color: var(--muted); font-size: .88rem; margin: 0 0 12px; line-height: 1.45; }
.nl input { width: 100%; box-sizing: border-box; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; font-size: .92rem; margin-bottom: 8px; }
.nl .btn { width: 100%; justify-content: center; }
.nl small { display: block; color: var(--muted); font-size: .72rem; margin-top: 8px; }
.nl--end { margin-top: 22px; padding: 18px; border-radius: 18px; background: var(--bg-2); }
/* Content: View more */
.more-btn { display: flex; justify-content: center; margin: 4px 16px 24px; }
@media (max-width: 899px) { .rail .rail__logo { display: none !important; } }
.mresults { margin: 14px 0 2px; padding: 0 0 4px; }
@media (min-width: 1000px) { .side { max-height: none !important; overflow: visible !important; } }

.xp--links a { display: grid; text-decoration: none; color: inherit; border-radius: 10px; }
.xp--links a:hover b { color: var(--accent-ink); }
.xp--links a span::after { content: " ›"; color: var(--accent-ink); }
.xp--links ~ .more { display: inline-block; margin-top: 16px; }

/* ===== WordPress additions ===== */
body { margin: 0; }
.topics a { width: 100%; display: flex; justify-content: space-between; align-items: baseline; padding: 9px 2px; border-radius: 10px; text-decoration: none; color: inherit; transition: background .2s var(--ease), padding .2s var(--ease); }
.topics a:hover { background: var(--bg-3); padding-inline: 8px; }
a.tile, a.reel { text-decoration: none; }
.reel { border-radius: 0; }
.post__tags a { background: var(--bg-2); color: var(--muted); border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 500; text-decoration: none; }
.post__tags a:hover { color: var(--ink); }
.post__img, .cardlink__img { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-top: 10px; aspect-ratio: 16/9; object-fit: cover; }
.cardlink__img { border-radius: 0; margin: 0; }
.post__html { font-size: 1rem; line-height: 1.6; }
.post__html p { margin: 0 0 .9em; }
a.reel-card { text-decoration: none; background-size: cover; background-position: center; }
.essay-card .more { color: var(--accent-ink); font-weight: 600; font-size: .9rem; }
.full__nav a { color: var(--muted); font-size: .85rem; text-decoration: none; align-self: center; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Message form with name + email */
.chat__compose--full { display: grid; gap: 8px; }
.chat__row { display: flex; gap: 8px; align-items: flex-end; }
.chat__row[hidden] { display: none; }
.chat__compose--full input { flex: 1; min-width: 0; height: 42px; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); border-radius: 14px; padding: 0 14px; font: inherit; }
.chat__compose--full textarea { min-height: 42px; box-sizing: border-box; }
.chat__compose--full .btn { height: 42px; }
.chat__fine a { color: var(--accent-ink); }
.chat__compose[hidden] { display: none; }

/* Single entry / case study / page */
.single__bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.single__back { text-decoration: none; color: var(--ink); font-weight: 600; }
.single__logo { text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.06em; }
.single__logo i { color: var(--accent); font-style: normal; }
.single__logo img { height: 28px !important; width: auto; display: block; }
@media (min-width: 900px) { .single__logo { visibility: hidden; } }
.mbar__theme--plain { background: var(--bg-2); color: var(--ink); width: 36px; height: 36px; }
@media (min-width: 900px) { .single__bar .mbar__theme--plain { display: none; } }
.entry { padding: 20px 18px 8px; }
@media (min-width: 640px) { .entry { padding: 28px 32px 8px; } }
.entry__by { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.entry__by img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.entry__by > div { display: grid; line-height: 1.25; margin-right: auto; }
.entry__by .muted { font-size: .85rem; }
.entry__title { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.08; letter-spacing: -0.04em; margin: 6px 0 18px; font-weight: 700; }
.entry__img { margin: 0 0 20px; } .entry__img img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.entry__video { margin: 0 0 20px; } .entry__video iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: var(--radius); }
.entry__content { font-size: 1.06rem; line-height: 1.7; }
.entry__content > * { margin: 0 0 1em; }
.entry__content h2 { font-size: 1.4rem; letter-spacing: -0.025em; line-height: 1.2; margin: 1.8em 0 .5em; }
.entry__content h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
.entry__content a { color: var(--accent-ink); }
.entry__content img { max-width: 100%; height: auto; border-radius: 12px; }
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content li { margin-bottom: .45em; }
.entry__content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-size: 1.15rem; line-height: 1.5; }
.entry__content .lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink); }
.entry__content .pull { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.35; margin: 1.4em 0; }
.entry__content .muted, .entry__content .footnote { color: var(--muted); font-size: .9rem; }
.entry__content .cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 1.4em; }
.entry__content .cs-facts div { background: var(--bg-2); border-radius: 14px; padding: 12px 14px; }
.entry__content .cs-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.entry__content .cs-facts dd { margin: 2px 0 0; font-weight: 600; font-size: .95rem; line-height: 1.4; }
.entry__content .role-box { background: var(--bg-2); border-radius: 16px; padding: 16px 18px; }
.entry__content .role-box h3 { margin-top: 0; }
.entry__content .role-box dt { font-weight: 700; margin-top: 8px; }
.entry__content .role-box dd { margin: 2px 0 0; }
.entry__content ul.results { list-style: none; padding: 0; display: grid; gap: 10px; }
.entry__content ul.results li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: baseline; background: var(--bg-2); border-radius: 14px; padding: 14px 16px; margin: 0; }
.entry__content ul.results .v { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.05em; color: var(--accent-ink); }
.entry__content ul.results .t { font-weight: 600; line-height: 1.35; }
.entry__content ul.results small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.case-hero { border-radius: var(--radius); padding: 24px; margin: 0 0 18px; position: relative; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; }
.case-hero .case-art__num { font-size: clamp(3.4rem, 10vw, 4.6rem); }
.case-hero__story { position: absolute; top: 16px; right: 16px; border: 0; border-radius: 999px; padding: 6px 12px; background: rgba(255,255,255,.85); color: #111; font-weight: 600; font-size: .8rem; cursor: pointer; }
.entry .post__tags { margin: 18px 0 4px; flex-wrap: wrap; }
.entry .post__actions { margin: 6px 0 0; }
.entry__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.entry__nav a { text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.3; }
.entry__nav a.r { text-align: right; }
.entry__nav small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.list span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.xp--links div { display: grid; }
.admin-bar .single__bar, .admin-bar .tabs { top: 32px; }
@media (max-width: 782px) { .admin-bar .single__bar, .admin-bar .tabs { top: 46px; } }
@media (max-width: 600px) { .admin-bar .single__bar, .admin-bar .tabs { top: 0; } }
/* Story: keep the slide button above the tap-to-skip areas */
.story__stage { z-index: 3; pointer-events: none; }
.story__stage .slide__cta { pointer-events: auto; }
