:root {
  --bg: #f7f7f7;
  --card: #fff;
  --text: #161616;
  --muted: #5c5c5c;
  --line: #e4e4e4;
  --bar: #fff;
  --soft: #f5f5f2;
  --group: #e9edf2;
  --group-line: #d9dfe7;
  --body-text: #333;
  --dot: #b5b5b5;
  --logo-bg: #f1f1f1;
  --logo-fg: #8a8a8a;
  --logo-filter: brightness(0) opacity(0.8);
  --mock-a: #ffffff;
  --mock-b: #f6f6f6;
  --mock-c: #e9e9e9;
  --green: #14924a;
  --blue: #3a74d0;
  --radius: 6px;
  --measure: 760px;
  --gutter: 1.25rem;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --card: #1f242c;
  --text: #f0f2f5;
  --muted: #a3a9b3;
  --line: #2d333d;
  --bar: #15181d;
  --soft: #252b34;
  --group: #171b22;
  --group-line: #272d37;
  --body-text: #d3d7dd;
  --dot: #5a606a;
  --logo-bg: #2c323c;
  --logo-fg: #9aa1ab;
  --logo-filter: brightness(0) invert(1) opacity(0.85);
  --mock-a: #2c323c;
  --mock-b: #1d2128;
  --mock-c: #12151a;
}
* { box-sizing: border-box; }
button, input, textarea { font-family: Tahoma, sans-serif; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 76px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: var(--measure);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  padding: 0.25rem 0.9rem 0.25rem 0;
}
.brand img {
  width: 51px;
  height: 51px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 2px solid var(--blue);
  flex: none;
}
.brand span { font-size: 0.92rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
nav { display: flex; gap: 0.4rem; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
nav a:hover, nav a[aria-current="page"] { color: var(--blue); border-color: var(--blue); }
.actions { display: flex; align-items: center; gap: 0.4rem; }
.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--blue); border-color: var(--blue); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
body, .bar, .card, .item, .mockup, nav a, .theme-toggle, .ticker-wrap, .ticker-chip { transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem var(--gutter) 5rem;
}
h1 {
  font-size: clamp(calc(2rem + 2px), 5vw, calc(2.7rem + 2px));
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
}
.focus {
  margin: 0.45rem 0 1.1rem;
  font-size: calc(0.95rem + 1px);
  font-weight: 700;
}
.focus .green { color: var(--green); }
.focus .blue { color: var(--blue); }
.dot { color: var(--dot); font-weight: 400; }
.lede {
  margin: 0 0 2rem;
  color: var(--body-text);
  max-width: 42em;
}
.top { margin-bottom: 0; }
.top .card h1 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}
@media (min-width: 760px) {
  .top .card h1 { white-space: nowrap; }
}
.top .card {
  padding: 1.4rem 1.6rem 1.6rem 1.75rem;
  border-left: 5px solid var(--green);
  border-image: none;
  position: relative;
}
.top .card::before {
  content: "";
  position: absolute;
  left: -5px; top: 50%;
  width: 5px; height: 50%;
  background: var(--blue);
  border-radius: 0 0 0 var(--radius);
}
.top .card .focus {
  margin: 0.45rem 0 1.1rem;
  font-size: calc(0.95rem + 1px);
  font-weight: 700;
  color: inherit;
}
.top .card .lede { margin: 0; color: var(--body-text); font-size: 1rem; }
.focus-line2 {
  display: inline-block;
  margin-top: 0.2rem;
  color: var(--text);
  font-weight: 700;
}
.focus-line2.blue { color: var(--blue); }
.stat-num {
  font-size: calc(0.64rem + 2px);
  font-weight: 700;
  color: var(--text);
}
.hero-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
}
.hero-slot {
  border-radius: 18px;
  border: 2px solid var(--blue);
  background: var(--soft);
  min-height: 0;
  overflow: hidden;
  height: 100%;
}
.hero-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.mockup.freelance-shot {
  height: 118px;
  margin: 0 0 0.65rem;
}
.case-list { display: grid; gap: 0.5rem; }
.case-list button {
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: var(--text);
}
.case-list button b { display: block; font-size: 1.02rem; letter-spacing: -0.02em; }
.case-list button:nth-child(odd) b { color: var(--green); }
.case-list button:nth-child(even) b { color: var(--blue); }
.case-list button > span:last-child { flex: 1; min-width: 0; }
.case-list button > span:last-child span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.case-list button:hover { border-color: var(--blue); }
body.has-portrait:not(.portrait-docked) .bar {
  height: 76px;
  opacity: 1;
  visibility: visible;
}
body.has-portrait:not(.portrait-docked) .brand img {
  width: 0;
  height: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
}
body.has-portrait:not(.portrait-docked) .brand { gap: 0; padding-left: 0; }
body.has-portrait.portrait-docked .bar {
  height: 76px;
  opacity: 1;
  visibility: visible;
}
.portrait-fly { display: none; }
body.has-portrait .brand img { opacity: 0; }
body.has-portrait.portrait-docked .brand img { opacity: 1; }
.hero-row > .card { min-width: 0; }
.stat-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.55rem 0.4rem !important;
  border-left: 1px solid var(--line) !important;
}
.stat-card::before { display: none !important; }
.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: calc(0.64rem + 1px);
  line-height: 1.25;
  font-weight: 600;
}
.stat-lead {
  display: block;
  font-size: calc(0.64rem + 5px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.stat-card:first-child .stat-lead { color: var(--blue); }
.stat-card:last-child .stat-lead { color: var(--green); }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: stretch;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
}
.card b { display: block; font-weight: 700; font-size: calc(1rem + 2px); }
.card .role {
  font-size: calc(0.86rem + 1px);
  margin: 0.15rem 0 0.4rem;
  font-weight: 700;
  font-style: italic;
}
.card .role.green { color: var(--green); }
.card .role.blue { color: var(--blue); }
.card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.card a { color: var(--blue); font-weight: 700; }

.head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.head .role { margin-bottom: 0; }
.logo {
  position: relative;
  flex: none;
  width: 55px;
  height: 55px;
  border-radius: var(--radius);
  background: var(--logo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--logo-fg);
  overflow: hidden;
}
.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 7px;
  object-fit: contain;
  background: var(--logo-bg);
  filter: var(--logo-filter);
}
.logo.full img { filter: none; padding: 4px; background: #fff; }

.item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--group);
  border: 1px solid var(--group-line);
  border-radius: calc(var(--radius) + 4px);
}
.item .card { flex: 1; }
.grid:not(.three) .item .head { min-height: 55px; align-items: center; }
.mockup {
  height: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 30% 20%, var(--mock-a) 0%, var(--mock-b) 55%, var(--mock-c) 100%);
  perspective: 1000px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet {
  position: relative;
  width: var(--w, 130px);
  aspect-ratio: var(--ar, 0.7727);
  transform: translate(6px, 4px) rotateX(52deg) rotateZ(-32deg);
  transform-style: preserve-3d;
  background: #fff;
  box-shadow:
    1px 1px 0 #f0f0f0, 2px 2px 0 #e4e4e4, 3px 3px 0 #f2f2f2,
    4px 4px 0 #e0e0e0, 5px 5px 0 #eee, 6px 6px 0 #dadada,
    14px 18px 22px rgba(0, 0, 0, 0.2);
}
.sheet img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
}
.sheet.cutout { background: none; box-shadow: none; }
.sheet.cutout::after { display: none; }
.sheet.cutout img {
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 #dcdcdc) drop-shadow(12px 16px 14px rgba(0,0,0,0.22));
}
.sheet.alt {
  transform: translate(-10px, 8px) rotateX(38deg) rotateZ(18deg);
}
.mockup.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  align-self: stretch;
}
.section > .grid + .callout { margin-top: 0.45rem; }
.mockup.photo video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item.fit .card { padding: 0.62rem 0.75rem; }
.item.fit .head { margin-bottom: 0.28rem; gap: 0.6rem; }
.item.fit .logo { width: 44px; height: 44px; }
.item.fit .logo.full { width: 86px; }
.item.fit b { font-size: 0.92rem; }
.item.fit .role { font-size: 0.74rem; line-height: 1.25; margin-top: 0.05rem; }
.item.fit p { font-size: 0.8rem; line-height: 1.35; }
.spec {
  margin: 0.05rem 0 0;
  color: #b0b0b0;
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 400;
}
:root[data-theme="dark"] .spec { color: #7e868f; }
.top .card .spec + .focus { margin-top: 0.02rem; }
.menu-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-toggle:hover { color: var(--blue); border-color: var(--blue); }
.menu-pop {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: calc(36px + 0.4rem);
  min-width: 148px;
  padding: 0.4rem;
  background: var(--bar);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  z-index: 32;
}
.menu-pop.open { display: grid; gap: 0.3rem; }
.menu-pop a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.menu-pop a:hover, .menu-pop a[aria-current="page"] { color: var(--blue); border-color: var(--blue); }
body.about-page .bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  pointer-events: none;
  background: transparent;
  border-bottom-color: transparent;
  height: auto;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
body.about-page .bar-inner { pointer-events: none; height: auto; }
body.about-page .actions { pointer-events: auto; position: relative; }
body.about-page .brand,
body.about-page nav {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
body.about-page:not(.bar-in) .brand {
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}
body.about-page:not(.bar-in) nav {
  display: none;
}
body.about-page:not(.bar-in) .bar-inner {
  justify-content: flex-end;
  min-height: 0;
  padding-top: 0.7rem;
  padding-bottom: 0;
}
body.about-page:not(.bar-in) .menu-toggle { display: inline-flex; }
body.about-page.bar-in .bar {
  pointer-events: auto;
  height: 76px;
  background: var(--bar);
  border-bottom-color: var(--line);
}
body.about-page.bar-in .bar-inner { pointer-events: auto; height: 100%; }
body.about-page.bar-in .brand { opacity: 1; visibility: visible; }
body.about-page.bar-in .menu-pop { display: none; }
body.about-page .top > .standalone-section-header { margin-top: -1.3rem; }
.callout.wide { max-width: none; text-align: center; }
.case-dialog .case-media video.contain {
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: #000;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.85;
}
.label {
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.85;
  letter-spacing: 0;
  margin: 1.6rem 0 0.6rem;
}

.section-label-box {
  text-transform: uppercase;
  position: relative;
  display: block;
  width: fit-content;
  min-width: 220px;
  padding: 0.45rem 5rem 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(to right, var(--card) 0%, var(--card) 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0%, #000 70%, transparent 100%);
  color: var(--muted);
  text-decoration: none;
  opacity: 1;
  line-height: 1.35;
  overflow: hidden;
  pointer-events: none;
  cursor: default;
  font-size: 0.95rem;
}
.section-label-box::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 4px; height: 50%;
  background: var(--green);
}
.section-label-box::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 4px; height: 50%;
  background: var(--blue);
}
.eyebrow.section-label-box { margin: 0 0 0.65rem; font-weight: 700; }
.label.section-label-box { margin: 1.85rem 0 0.8rem; }

.timeline {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 17px; top: 18px; bottom: 18px;
  width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--blue));
  opacity: 0.45;
}
.timeline li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.55rem 0;
}
.timeline .node {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  background: var(--card);
  border: 2px solid currentColor;
  position: relative;
}
.timeline li.green .node { color: var(--green); }
.timeline li.blue .node { color: var(--blue); }
.timeline li div {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child div { border-bottom: 0; padding-bottom: 0; }
.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin-top: 1.15rem;
}
.label.section-label-box + .notes { margin-top: 0; margin-bottom: 0.9rem; }
.notes div {
  padding-left: 0.7rem;
  border-left: 2px solid var(--green);
}
.notes div:nth-child(even) { border-left-color: var(--blue); }
.notes b { display: block; font-size: 0.92rem; letter-spacing: -0.01em; }
.notes span { display: block; margin-top: 0.12rem; color: var(--muted); font-size: 0.84rem; }
.pdf-note { margin: 1.6rem 0 0; }
.pdf-note a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pdf-note svg { width: 15px; height: 15px; flex: none; }
.pdf-note a:hover { color: var(--blue); }
.timeline li b { font-size: 1rem; }
.timeline li span:not(.node) { color: var(--muted); font-size: 0.9rem; }

.section { margin-top: 3rem; }
.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}
.section .intro {
  margin: 0 0 1.25rem;
  color: var(--body-text);
  max-width: 42em;
}
.label.section-label-box + .section { margin-top: 0; }
.label.section-label-box + .timeline,
.standalone-section-header + .timeline { margin-top: 0.2rem; }
.callout + .callout { margin-top: -0.8rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.contact { margin-top: 2.5rem; color: var(--muted); font-size: calc(0.92rem - 2px); }
.standalone-section-header { margin-left: 0; margin-bottom: 0.7rem; }
.top .standalone-section-header { margin-bottom: 0.7rem; }
#contact { scroll-margin-top: 96px; }
.callout {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem 0.9rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  color: var(--body-text);
  font-size: 0.95rem;
  max-width: 42em;
}
.contact-form .card { padding: 1.15rem 1.2rem 1.25rem; }
.contact-form form { display: grid; gap: 0.8rem; max-width: none; }
.contact-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.btn {
  justify-self: start;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.skills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skills span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
}
.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
}
.page-foot .contact { margin: 0; }
.to-top {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  color: var(--muted);
  text-decoration: none;
  font-size: calc(0.92rem - 2px);
  font-weight: 700;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  white-space: nowrap;
}
.to-top:hover { color: var(--blue); border-color: transparent; }
.mockup.flat img { max-width: 88%; max-height: 88%; object-fit: contain; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
.entry { margin-bottom: 0.65rem; }
.entry p { margin-top: 0.3rem; }
.entry-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.entry-top b { margin: 0; }
.resume-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.resume-top .eyebrow { margin: 0; flex: none; }
.resume-freelance {
  flex: 1 1 auto;
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: #e4e4e1;
}
:root[data-theme="dark"] .resume-freelance { background: #171b21; }
.resume-freelance b { font-size: 0.82rem; }
.resume-freelance .role { font-size: 0.72rem; margin-top: 0.05rem; }
.resume-freelance .when { font-size: 0.68rem; }
.resume-freelance p { font-size: 0.72rem; line-height: 1.35; margin-top: 0.15rem; }
.studies-card { margin-bottom: 0.7rem; }
.when {
  flex: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ticker-wrap {
  margin: 0.65rem 0 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 0.5rem;
  padding: 0.55rem 0.5rem;
  animation: ticker-scroll 42s linear infinite;
}
.ticker-wrap:hover .ticker-track,
.ticker-wrap.is-paused .ticker-track { animation-play-state: paused; }
.ticker-chip {
  flex: none;
  min-width: 90px;
  height: 55px;
  padding: 0 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--logo-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--logo-fg);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s, background-color 0.16s;
}
.ticker-chip.has-logo {
  min-width: 120px;
  padding: 4px 10px;
  background: #fff;
}
.ticker-chip.has-logo img {
  display: block;
  height: 33px;
  width: auto;
  max-width: 108px;
  object-fit: contain;
}
.ticker-chip:hover,
.ticker-chip.is-active {
  color: var(--text);
  border-color: var(--blue);
  background: var(--card);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.ticker-chip.has-logo:hover,
.ticker-chip.has-logo.is-active { background: #fff; }
.brand-tip {
  position: fixed;
  z-index: 20;
  width: min(268px, calc(100vw - 24px));
  padding: 0.75rem 0.85rem 0.8rem 1rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s, background-color 0.2s, border-color 0.2s, color 0.2s;
  pointer-events: none;
}
.brand-tip::before {
  content: "";
  position: absolute;
  left: -5px; top: 0;
  width: 5px; height: 50%;
  background: var(--green);
  border-radius: var(--radius) 0 0 0;
}
.brand-tip::after {
  content: "";
  position: absolute;
  left: -5px; bottom: 0;
  width: 5px; height: 50%;
  background: var(--blue);
  border-radius: 0 0 0 var(--radius);
}
.brand-tip.show { opacity: 1; visibility: visible; transform: none; }
.brand-tip-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.28rem;
}
.brand-tip-note {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}
.brand-tip-caret {
  position: absolute;
  bottom: -6px;
  width: 10px; height: 10px;
  background: var(--card);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.brand-tip.below .brand-tip-caret {
  bottom: auto; top: -6px;
  border-right: 0; border-bottom: 0;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.phrase-swap {
  position: relative;
  height: 3.4rem;
  margin: 0 0 1.25rem;
  overflow: hidden;
}
.phrase-swap p {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.phrase-swap p.is-on {
  opacity: 1;
  transform: none;
}

.reel {
  margin: 0.65rem 0 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.reel-stage { position: relative; }
.reel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.reel-nav.prev { left: 0.55rem; }
.reel-nav.next { right: 0.55rem; }
.reel-nav:hover { border-color: var(--blue); color: var(--blue); }
.reel-frame {
  position: relative;
  height: 317px;
  background: var(--soft);
  overflow: hidden;
  cursor: zoom-in;
}
.reel-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.7s ease, transform 6s linear;
}
.reel-frame img.is-in {
  opacity: 1;
  transform: scale(1);
}
.reel-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.95rem;
  border-top: 1px solid var(--line);
}
.reel-index {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.reel-meta b { font-size: 0.95rem; }
.reel-dots {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.95rem 0.8rem;
}
.reel-dots button {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
}
.reel-dots button.is-on { background: var(--blue); }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.86);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox img {
  max-width: min(1080px, 78vw);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-nav:hover { border-color: #fff; }
.lightbox-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.item.js-case, .card.js-case { cursor: pointer; }
.item.js-case:hover, .card.js-case:hover { border-color: var(--blue); }
.item.js-case:focus-visible, .card.js-case:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.case-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 17, 21, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.case-layer.show { opacity: 1; visibility: visible; }
.case-dialog {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  position: relative;
}
.case-dialog::before {
  content: "";
  position: absolute;
  left: -5px; bottom: 0;
  width: 5px; height: 50%;
  background: var(--blue);
}
.mockup.flat video {
  width: 92%;
  height: 86%;
  object-fit: contain;
  background: #111;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.case-dialog .case-media img,
.case-dialog .case-media video {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: #111;
}
.case-dialog .case-media img.contain {
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: var(--soft);
}
.case-dialog .case-body { padding: 1.05rem 1.15rem 1.25rem; }
.case-dialog h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.case-dialog .role {
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 600;
  margin: 0.05rem 0 0.45rem;
}
.case-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.75rem; }
.case-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--soft);
}
.case-tag.g { color: var(--green); }
.case-tag.b { color: var(--blue); }
.case-tag.k { color: var(--text); }
.case-dialog p {
  margin: 0 0 0.7rem;
  color: var(--body-text);
  font-size: 0.92rem;
}
.case-dialog p:last-child { margin-bottom: 0; }
.case-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .bar { height: auto; }
  body.about-page.bar-in .bar { height: auto; }
  .bar-inner { min-height: 76px; padding: 0.55rem var(--gutter); flex-wrap: wrap; position: relative; }
  nav { gap: 0.4rem; flex-wrap: wrap; }
  .actions { flex-wrap: wrap; }
  .theme-toggle { position: absolute; top: 0.9rem; right: var(--gutter); }
  body.about-page:not(.bar-in) .theme-toggle { position: static; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .hero-row { grid-template-columns: 160px minmax(0, 1fr); }
  .notes { grid-template-columns: 1fr; }
  .resume-top { flex-direction: column; }
  .resume-freelance { margin-left: 0; flex-basis: auto; width: 100%; }
  .hero-slot { aspect-ratio: auto; max-width: none; min-height: 132px; }
  .stat-stack { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 88px; }
  .reel-frame { height: 259px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel-frame img { transition: opacity 0.2s; transform: none; }
  .scope-marker { transition: none; }
  body.about-page .bar { transition: none; }
}
