
/* Layout: the heymichal.com homepage (wave-divided full-width bands), plus an owner-only editing drawer on the right. Single light look by design. */
:root {
  color-scheme: light;
  --pink: #FF6893;
  --bg: #F6FDFE;
  --teal: #DFF6FA;
  --dark: #333333;
  --dark-teal: #033333;
  --white: #FFFFFF;
  --font-heading: 'Archivo Black', 'Arial Black', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --body-size: 17px;
  /* editor */
  --ed-bg: #FBFCFC;
  --ed-line: #DCE6E8;
  --ed-muted: #5E6B6E;
  --ed-ink: #1F2A2C;
  --ed-field: #FFFFFF;
  --ed-accent: #0D6B78;
  --ed-danger: #B3261E;
}
*, *::before, *::after { box-sizing: border-box; }
:where(#root, #editor) * { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } #root *, #editor * { transition: none !important; } }
@media (min-width: 1100px) { body.editing .modal { right: 460px; width: auto; left: 0; } }
body { font-family: var(--font-body); background: var(--bg); color: var(--dark); overflow-x: hidden; font-size: var(--body-size); line-height: 1.65; }
#root h1, #root h2, #root h3, #root h4 { font-family: var(--font-heading); font-weight: 400; line-height: 1.08; }
#root a { color: inherit; text-decoration: none; }
#root button { font-family: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--dark-teal); outline-offset: 3px; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: calc(20px + env(safe-area-inset-top, 0px)) 60px 20px; display: flex; align-items: center; justify-content: space-between; transition: background 0.3s, box-shadow 0.3s; }
.nav.scrolled, .nav.menu-open { background: rgba(246,253,254,0.96); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(0,0,0,0.07); }
.nav-logo a { display: flex; align-items: center; }
.nav-logo img { height: 44px; display: block; max-width: none; }
.nav-logo-text { font-family: var(--font-heading); font-size: 16px; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--dark); opacity: 0.72; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* BUTTONS */
.btn { display: inline-block; background: var(--dark); color: #fff; padding: 11px 24px; font-size: 15px; font-weight: 600; font-family: var(--font-body); cursor: pointer; border: none; transition: background 0.2s, color 0.2s; letter-spacing: 0.01em; border-radius: 8px; }
#root .btn { color: #fff; }
#root .nav-links a.btn-pink { background: var(--pink); color: #fff; opacity: 1; }
#root .nav-links a.btn-pink:hover { background: var(--teal); color: #1a1a1a; }
#root .btn-outline { background: transparent; border: 2px solid var(--dark); color: var(--dark); }
#root .btn-outline:hover { background: var(--dark); color: #fff; }

/* HERO */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 140px 60px 100px; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--teal) 0%, #C8EDF3 45%, var(--bg) 100%); }
.hero-inner { max-width: 780px; position: relative; z-index: 2; }
.hero-eyebrow { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; color: var(--dark); opacity: 0.75; margin-bottom: 28px !important; }
#root .hero h1 { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 800; font-size: clamp(44px, 5.6vw, 86px); line-height: 0.98; letter-spacing: -0.045em; text-wrap: balance; color: var(--dark); margin-bottom: 32px !important; }
.hero h1 em { display: block; font-family: 'DM Serif Display', Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.1em; letter-spacing: -0.02em; line-height: 1.02; color: var(--pink); padding-right: 0.08em; }
.hero-sub { font-size: 19px; line-height: 1.6; color: var(--dark); opacity: 0.82; max-width: 600px; text-wrap: pretty; margin-bottom: 40px !important; }
.hero-cta { display: flex; gap: 14px 36px; align-items: center; flex-wrap: wrap; }
#root .hero-cta .btn { display: inline-flex; align-items: center; gap: 12px; padding: 17px 28px; font-size: 18px; font-weight: 700; border-radius: 14px; letter-spacing: 0; }
#root .hero-cta .btn:hover { background: var(--dark-teal); }
.hero-link { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; color: var(--dark) !important; }
.hero-link span { border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.hero-cta svg { width: 20px; height: 20px; flex: none; transition: transform 0.2s; }
.hero-cta a:hover svg { transform: translateX(4px); }
.hero-tags { position: relative; margin-top: 72px !important; font-size: 15px; font-weight: 500; letter-spacing: 0.01em; color: var(--dark); opacity: 0.55; }
.hero-tags::before { content: ''; position: absolute; right: calc(100% + 24px); top: 50%; width: 72px; height: 1px; background: currentColor; }
body.inline-edit .hero-tags:empty::before { position: static; display: inline; width: auto; height: auto; background: none; }
.hero-blob { position: absolute; right: -120px; top: 56%; transform: translateY(-50%); width: 560px; height: 560px; border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; background: radial-gradient(closest-side, rgba(87,126,136,0.42) 0%, rgba(87,126,136,0.3) 50%, rgba(87,126,136,0) 100%); filter: blur(18px); }
.hero.has-photo .hero-blob2 { right: max(200px, calc(var(--photo-right, 0px) + 250px)); top: 54%; width: 320px; height: 320px; border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%; background: radial-gradient(closest-side, rgba(255,205,220,0.85) 0%, rgba(255,205,220,0.55) 50%, rgba(255,205,220,0) 100%); filter: blur(16px); }
.hero-blob2 { position: absolute; right: 160px; top: 30%; width: 280px; height: 280px; border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%; background: rgba(157,222,234,0.25); }

/* SECTIONS */
.band { padding: 96px 60px; }
.section-inner { max-width: 1200px; margin: 0 auto !important; }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: 0.01em;  opacity: 0.5; margin-bottom: 14px !important; }
.section-heading { font-size: clamp(32px, 3.5vw, 52px); color: var(--dark); margin-bottom: 16px !important; }
.section-sub { font-size: 18px; opacity: 0.7; max-width: 580px; margin-bottom: 56px !important; line-height: 1.65; }
.wave { display: block; width: 100%; line-height: 0; }
.wave svg { display: block; width: 100%; height: auto; }

/* QUICK BITES */
.bites { background: #fff; }
.bites-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .bites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bites-grid { grid-template-columns: minmax(0, 1fr); } }
.bite-card { border-radius: 20px; padding: 32px 32px 48px !important; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden; text-align: left; border: none; font: inherit; display: block; width: 100%; min-width: 0; }
.bite-card:nth-child(6n+1) { background: #DFF6FA; }
.bite-card:nth-child(6n+2) { background: #FFF0F5; }
.bite-card:nth-child(6n+3) { background: #FFF8EC; }
.bite-card:nth-child(6n+4) { background: #F0F4FF; }
.bite-card:nth-child(6n+5) { background: #F0FFF4; }
.bite-card:nth-child(6n+6) { background: #F5F0FF; }
.bite-card:hover, .bite-card:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.07); }
.bite-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.01em;  color: var(--dark-teal); opacity: 0.6; margin-bottom: 14px !important; }
.bite-card h3 { font-size: 19px; margin-bottom: 10px !important; line-height: 1.35; }
.bite-card p { font-size: 15px; opacity: 0.68; line-height: 1.6; }
.bite-read { position: absolute; bottom: 20px; right: 24px; font-size: 13px; font-weight: 600; opacity: 0.4; transition: opacity 0.2s; letter-spacing: 0.04em; }
.bite-card:hover .bite-read, .bite-card:focus-visible .bite-read { opacity: 0.85; }

/* SIDE PAGE (opens from the right, covers the homepage) */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(3,51,51,0.25); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-overlay.no-anim, .modal-overlay.no-anim .modal { transition: none !important; }
.modal { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; transform: translateX(100%); transition: transform 0.38s cubic-bezier(.2,.7,.2,1); padding-top: env(safe-area-inset-top, 0px) !important; }
.modal-overlay.open .modal { transform: translateX(0); }
.sp-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 16px 60px !important; background: rgba(246,253,254,0.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,0.07); }
.sp-back { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid rgba(0,0,0,0.12); border-radius: 999px; padding: 8px 16px 8px 12px !important; font: 600 14px var(--font-body); cursor: pointer; color: var(--dark) !important; transition: border-color 0.15s; }
.sp-back:hover { border-color: var(--dark); }
.sp-back svg { width: 16px; height: 16px; }
.sp-crumb { font-size: 13px; font-weight: 600; letter-spacing: 0.01em;  opacity: 0.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-hero { padding: 72px 60px 56px !important; }
.sp-hero-inner { max-width: 1120px; margin: 0 auto !important; }
.modal-tag { font-size: 13px; font-weight: 700; letter-spacing: 0.01em;  color: var(--dark-teal); opacity: 0.65; margin-bottom: 18px !important; }
.sp-hero h2 { font-size: clamp(34px, 4.6vw, 60px); max-width: 900px; margin-bottom: 20px !important; }
.project-tagline { font-size: 20px; line-height: 1.6; opacity: 0.75; max-width: 900px; margin-bottom: 24px !important; }
.sp-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-layout { max-width: 1240px; margin: 0 auto !important; padding: 0 60px 120px !important; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; align-items: start; }
.sp-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
.sp-layout.no-toc .sp-main, .past-modal .sp-main { max-width: 720px; }
.modal:focus { outline: none; }
.sp-toc { position: sticky; top: 96px; }
.sp-toc-label { font-size: 12px; font-weight: 700; letter-spacing: 0.01em;  opacity: 0.45; margin-bottom: 14px !important; }
.sp-toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; border-left: 2px solid rgba(0,0,0,0.08); }
.sp-toc button { display: block; width: 100%; text-align: left; background: none; border: none; border-left: 2px solid transparent; margin-left: -2px !important; padding: 7px 0 7px 16px !important; font: 500 15px/1.4 var(--font-body); color: var(--dark); opacity: 0.55; cursor: pointer; transition: opacity 0.15s, border-color 0.15s; }
.sp-toc button:hover { opacity: 0.9; }
.sp-toc button.active { opacity: 1; border-left-color: var(--pink); font-weight: 600; }
.sp-toc .sub button { padding-left: 30px !important; font-size: 14px; }
.sp-main { min-width: 0; max-width: 720px; }
.sp-section { scroll-margin-top: 96px; margin-bottom: 56px !important; }
.sp-section > h3 { font-family: var(--font-heading) !important; font-weight: 400 !important; font-size: 26px; line-height: 1.2; margin-bottom: 16px !important; }
.modal-body, .sp-section p { font-size: 18px; line-height: 1.75; color: var(--dark); opacity: 0.88; white-space: pre-line; margin-bottom: 20px !important; }
.modal-img, .sp-figure img { width: 100%; border-radius: 16px; display: block; box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.sp-figure { margin: 8px 0 32px !important; }
.modal-img-caption, .sp-figure figcaption { font-size: 14px; opacity: 0.55; margin-top: 10px !important; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 56px !important; }
.project-gallery figure img { width: 100%; border-radius: 14px; display: block; box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.project-gallery figcaption { font-size: 14px; opacity: 0.55; margin-top: 8px !important; }
.aspects { display: grid; gap: 20px; }
.aspect { background: var(--white); border-radius: 20px; padding: 32px !important; scroll-margin-top: 96px; box-shadow: 0 1px 0 rgba(0,0,0,0.04); }
.aspect h4 { font-size: 22px; margin-bottom: 10px !important; line-height: 1.3; }
.hl-phrase { background: linear-gradient(transparent 55%, rgba(242,190,70,0.7) 55%, rgba(242,190,70,0.7) 92%, transparent 92%); color: inherit; font-weight: 600; padding: 0 1px !important; }
.ed-sec-tools { display: flex; justify-content: flex-end; margin-bottom: 6px !important; position: relative; z-index: 2; }
.ed-sec-remove { font: 600 13px/1 var(--font-body, inherit); color: var(--ed-danger); background: var(--ed-field); border: 1px solid var(--ed-line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.ed-sec-remove:hover { border-color: var(--ed-danger); }
.ed-sec-note { font-size: 13px; color: var(--ed-muted); }
.sp-section.is-empty > h3, .sp-section.is-empty > p, .aspect.is-empty > h4, .aspect.is-empty > p { opacity: 0.45; }
.aspect > .ed-sec-tools { margin-bottom: 8px !important; }
.sp-section > .ed-slot, .sp-section > .ed-slot-wrap > .ed-slot { min-height: 0 !important; padding: 10px 14px !important; margin: 12px 0 0 !important; border-width: 1.5px; border-radius: 12px; font-size: 14px; justify-content: flex-start; }
.sub-h { display: block; font-family: var(--font-heading); font-weight: 400; font-size: 21px; line-height: 1.3; color: var(--dark); margin: 4px 0 6px; opacity: 1; }
.sub-h.sub-h3 { font-family: var(--font-body); font-weight: 700; font-size: 18px; margin: 8px 0 2px; }
.aspect .sub-h { font-size: 18px; } .aspect .sub-h.sub-h3 { font-size: 16px; }
.sp-section p > .sub-h:first-child { margin-top: 0; }
.md-list { display: block; margin: 14px 0; }
.md-list:first-child { margin-top: 0; }
.md-ol { counter-reset: mdli; }
.md-li { display: block; position: relative; padding-left: 30px; margin-bottom: 8px; }
.md-li:last-child { margin-bottom: 0; }
.md-ul > .md-li::before { content: ''; position: absolute; left: 9px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.md-ol > .md-li { counter-increment: mdli; }
.md-ol > .md-li::before { content: counter(mdli) '.'; position: absolute; left: 0; width: 22px; text-align: right; font-weight: 700; color: var(--dark-teal); }
.sp-section .aspect p { font-size: 17px; opacity: 0.82; line-height: 1.7; white-space: pre-line; margin-bottom: 0 !important; }
.aspect img { width: 100%; border-radius: 12px; margin-top: 20px !important; display: block; }
.past-talk-item { padding: 18px 0 !important; border-bottom: 1px solid rgba(0,0,0,0.07); }

.team-box { background: #FFF0F5; border-radius: 20px; padding: 32px !important; }
.team-box > h3 { font-size: 22px !important; }
.team-box blockquote { border-left: 3px solid var(--pink); padding: 2px 0 2px 20px !important; margin: 0 0 20px !important; }
.sp-section .team-box blockquote p, .team-box blockquote p { font-size: 19px; font-style: italic; opacity: 1; margin-bottom: 10px !important; }
.team-box cite { display: block; font-style: normal; font-size: 14px; font-weight: 600; opacity: 0.6; }
.sp-section.team-box > p:last-child { margin-bottom: 0 !important; }
@media (max-width: 760px) { .team-box { padding: 24px !important; } }
.client-name { background: linear-gradient(transparent 58%, rgba(255,104,147,0.3) 58%, rgba(255,104,147,0.3) 92%, transparent 92%); color: inherit; font-weight: 600; padding: 0 1px !important; }

.bites-more { display: flex; justify-content: center; margin-top: 40px !important; }
.bites-count { opacity: 0.55; font-weight: 500; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.related-link { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; background: var(--white); border: 1.5px solid rgba(0,0,0,0.08); border-radius: 18px; padding: 24px !important; cursor: pointer; font: inherit; color: var(--dark) !important; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.related-link:hover, .related-link:focus-visible { border-color: var(--pink); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.06); }
.related-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.01em;  color: var(--dark-teal); opacity: 0.6; }
.related-title { font-family: var(--font-heading); font-size: 20px; line-height: 1.3; }
.related-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; opacity: 0.6; margin-top: 4px !important; }
.related-meta svg, .related-pill svg { width: 15px; height: 15px; }
.related-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px !important; background: var(--white); border: 1.5px solid rgba(0,0,0,0.12); border-radius: 99px; padding: 8px 16px !important; font: 600 14px var(--font-body); color: var(--dark) !important; cursor: pointer; transition: border-color 0.15s; }
.related-pill:hover { border-color: var(--pink); }

.talks-list { display: flex; flex-direction: column; border-top: 1.5px solid rgba(0,0,0,0.08); }
.talk-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px 32px; padding: 28px 0 !important; border-bottom: 1.5px solid rgba(0,0,0,0.08); align-items: start; }
.talk-when { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.55; padding-top: 4px !important; }
.talk-main h3 { font-size: 22px; line-height: 1.3; margin-bottom: 6px !important; }
.talk-venue { font-size: 15px; font-weight: 600; color: var(--dark-teal); opacity: 0.75; margin-bottom: 8px !important; }
.talk-main p { font-size: 16px; opacity: 0.72; line-height: 1.6; max-width: 640px; }
.talk-side { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.talk-watch { display: inline-flex; align-items: center; gap: 8px; background: var(--dark); color: #fff !important; font-size: 14px; font-weight: 600; padding: 9px 18px 9px 14px !important; border-radius: 99px; transition: background 0.2s; }
.talk-watch:hover { background: var(--pink); }
.talk-watch span { font-size: 11px; }
.aspect .aspect-link { margin-top: 16px !important; }
.talk-row .event-tag { margin-top: 4px !important; white-space: nowrap; }
@media (max-width: 760px) { .talk-side { flex-direction: row; align-items: center; } .talk-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } .talk-row .event-tag { justify-self: start; margin-top: 8px !important; } }

.ed-hint-inline { font-size: 13px; color: var(--ed-accent); margin: -16px 0 22px !important; }
body.inline-edit .hero h1[data-edit] em { display: inline; font-family: 'DM Serif Display', Georgia, serif; font-style: italic; font-weight: 400; color: var(--pink); }
body.inline-edit .hero h1[data-edit] { white-space: pre-line; }

.hero-photo-wrap { position: absolute; right: 5%; bottom: 0; z-index: 1; pointer-events: none; height: min(80vh, 720px, calc(46vw / var(--photo-ar, 0.6236))); aspect-ratio: var(--photo-ar, 0.6236); }
.hero-photo { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.hero-photo-blob { display: none; position: absolute; left: 7%; top: -9%; width: 96%; aspect-ratio: 1 / 1.02; border-radius: 47% 53% 50% 50% / 53% 47% 53% 47%; background: radial-gradient(circle at 38% 32%, #0E4F4F 0%, var(--dark-teal) 72%); }
.hero.has-photo .hero-inner { max-width: 780px; }
@media (min-width: 901px) {
  :root { --gutter: max(7vw, calc((100vw - 1200px) / 2)); --photo-right: max(0px, calc(var(--gutter) - 100px)); }
  .nav { padding-left: var(--gutter); padding-right: var(--gutter); }
  .hero { padding-left: var(--gutter); padding-right: var(--gutter); }
  .band { padding-left: var(--gutter); padding-right: var(--gutter); }
  .hero-photo-wrap { right: var(--photo-right); height: min(88vh, 860px, calc((100vw - var(--gutter) - 780px - 32px - var(--photo-right)) / var(--photo-ar, 0.6236))); }
}
@media (min-width: 901px) and (max-width: 1199px) {
  .hero.has-photo .hero-inner { max-width: 600px; }
  .hero-sub { max-width: 560px; }
  .hero-photo-wrap { height: min(88vh, 860px, calc((100vw - var(--gutter) - 600px - 32px - var(--photo-right)) / var(--photo-ar, 0.6236))); }
}
@media (max-width: 900px) {
  .hero.has-photo { padding-bottom: 0 !important; }
  .hero-photo-wrap { position: relative; right: auto; height: auto; width: min(78%, 360px); margin: 72px auto 0 !important; }
  .hero-tags { margin-top: 48px !important; }
  .hero-tags::before { display: none; }
}

/* WORK */
.work { background: linear-gradient(180deg, #b8e8f0 0%, #ddf4f8 60%, #f0fbfd 100%); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-top: 56px !important; }
.project-card { background: #fff; border-radius: 20px; padding: 36px !important; cursor: pointer; transition: transform 0.2s, box-shadow 0.25s; position: relative; overflow: hidden; display: flex; flex-direction: column; text-align: left; border: none; font: inherit; min-width: 0; }
.project-card:hover, .project-card:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.08); }
.project-client { font-size: 12px; font-weight: 700; letter-spacing: 0.01em;  opacity: 0.45; margin-bottom: 12px !important; }
.project-question { font-family: var(--font-heading); font-size: 20px; line-height: 1.3; margin-bottom: 20px !important; color: var(--dark); }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px !important; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 14px !important; background: rgba(0,0,0,0.07); color: var(--dark); border-radius: 99px; }
.project-link { margin-top: auto !important; font-size: 14px; font-weight: 600; color: var(--dark); opacity: 0.5; transition: opacity 0.2s; }
.project-card:hover .project-link, .project-card:focus-visible .project-link { opacity: 1; }
.work-note { margin-top: 48px !important; text-align: center; font-size: 16px; opacity: 0.6; font-style: italic; }

/* INTERESTS */
.interests { background: #f9f5e8; overflow: hidden; }
.interests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 56px !important; }
.interest-item { padding: 36px 0 !important; border-bottom: 1.5px solid rgba(0,0,0,0.07); display: flex; gap: 24px; align-items: flex-start; }
.interest-item:nth-child(odd) { padding-right: 40px !important; }
.interest-num { font-family: var(--font-heading); font-size: 13px; color: var(--pink); min-width: 28px; padding-top: 4px !important; }
.interest-item h3 { font-size: 20px; margin-bottom: 8px !important; }
.interest-item p { font-size: 16px; opacity: 0.7; line-height: 1.6; }

/* EVENTS */
.events { background: #fff; }
.events-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px !important; flex-wrap: wrap; gap: 16px; }
.events-box { background: var(--teal); border-radius: 24px; padding: 40px !important; }
.events-box-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.event-card { background: rgba(255,255,255,0.55); border-radius: 16px; padding: 28px !important; display: flex; flex-direction: column; min-width: 0; }
.event-card-date { font-size: 12px; font-weight: 700; letter-spacing: 0.01em;  opacity: 0.5; margin-bottom: 10px !important; }
.event-card h4 { font-size: 18px; margin-bottom: 8px !important; line-height: 1.3; }
.event-card p { font-size: 14px; opacity: 0.7; line-height: 1.6; flex: 1; }
.event-card-footer { margin-top: 16px !important; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.01em;  background: rgba(0,0,0,0.08); color: var(--dark); padding: 3px 12px !important; border-radius: 99px; }
.event-cta-link { font-size: 13px; font-weight: 600; color: var(--dark); border-bottom: 1.5px solid rgba(0,0,0,0.25); padding-bottom: 1px !important; transition: border-color 0.15s; }
.event-cta-link:hover { border-color: var(--dark); }
.event-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; margin-bottom: 16px !important; }
.past-cta-btn { font-size: 15px; font-weight: 600; background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px; opacity: 0.6; transition: opacity 0.2s; }
.past-cta-btn:hover { opacity: 1; }
.past-talks-inline { margin-top: 40px !important; border-top: 1.5px solid rgba(0,0,0,0.08); padding-top: 32px !important; }
.past-talks-inline .past-cta-btn { margin-top: 24px !important; }
.past-talk-item { padding: 16px 0 !important; border-bottom: 1px solid rgba(0,0,0,0.06); }
.past-talk-item strong { display: block; font-size: 16px; margin-bottom: 3px !important; }
.past-talk-item span { font-size: 13px; opacity: 0.55; }
.events-empty { opacity: 0.5; font-style: italic; }

/* CONTACT */
.contact { background: var(--dark); color: #fff; }
.contact .section-heading { color: #fff; margin-bottom: 32px !important; }
.contact-copy { max-width: 560px; }
.contact-copy p { font-size: 20px; opacity: 0.82; line-height: 1.75; margin-bottom: 14px !important; }
.contact-copy p:last-of-type { margin-bottom: 40px !important; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.contact-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 16px !important; }
.contact-link { display: flex; align-items: center; gap: 16px; font-size: 18px; font-weight: 600; opacity: 0.9; transition: opacity 0.2s; min-width: 0; overflow-wrap: anywhere; }
.contact-link:hover { opacity: 1; }
.link-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.copy-btn { margin-left: auto !important; background: rgba(255,255,255,0.1); border: none; color: #fff !important; font-size: 13px; font-weight: 600; padding: 6px 12px !important; border-radius: 6px; cursor: pointer; flex-shrink: 0; }
.copy-btn:hover { background: rgba(255,255,255,0.18); }

/* FOOTER */
.footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,0.08); padding: 28px 60px calc(28px + env(safe-area-inset-bottom, 0px)) !important; display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,0.45); font-size: 14px; gap: 16px; }
#root .footer a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
#root .footer a:hover { color: var(--pink); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 900px) {
  .nav { padding: calc(16px + env(safe-area-inset-top, 0px)) 24px 16px; }
  .band { padding: 72px 24px; }
  .hero { padding: 120px 24px 80px; }
  .footer { flex-direction: column; text-align: center; padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px)) !important; }
  .hero-blob, .hero-blob2 { display: none; }
  .hero-cta .btn, .hero-link { font-size: 17px; }
  .nav-links { gap: 20px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px !important; background: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
  .nav.menu-open .nav-links { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(0,0,0,0.06); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 14px 0 !important; font-size: 16px; }
  #root .nav-links a.btn-pink { text-align: center; margin-top: 12px !important; padding: 12px 24px !important; }
  .projects-grid { grid-template-columns: 1fr; }
  .interests-grid { grid-template-columns: 1fr; }
  .interest-item:nth-child(odd) { padding-right: 0 !important; }
  .events-box { padding: 24px !important; }
  .sp-bar { padding: 12px 18px !important; }
  .sp-hero { padding: 40px 18px 32px !important; }
  .sp-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 18px 80px !important; }
  .sp-toc { position: sticky; top: 61px; z-index: 4; margin: 0 -18px 32px !important; padding: 10px 18px !important; background: rgba(246,253,254,0.96); border-bottom: 1px solid rgba(0,0,0,0.06); overflow-x: auto; scrollbar-width: none; }
  .sp-toc-label { display: none; }
  .sp-toc ol { flex-direction: row; border-left: none; gap: 6px; }
  .sp-toc li { flex: none; }
  .sp-toc .sub { display: none; }
  .sp-toc button { border: 1px solid rgba(0,0,0,0.1); border-radius: 999px; margin: 0 !important; padding: 6px 14px !important; font-size: 13px; white-space: nowrap; }
  .sp-toc button.active { border-color: var(--pink); background: #FFF0F5; }
  .sp-section { scroll-margin-top: 120px; }
  .aspect { padding: 24px !important; }
  .modal-body, .sp-section p { font-size: 17px; }
  .project-card, .bite-card { padding: 28px 24px 44px !important; }
}

/* ============ ON-PAGE EDITING (owner only) ============ */
body.inline-edit [data-edit] { outline: 1.5px dashed rgba(13,107,120,0.2); outline-offset: 4px; border-radius: 3px; cursor: text; transition: outline-color 0.15s, background 0.15s; }
body.inline-edit [data-edit]:hover { outline-color: var(--ed-accent); }
body.inline-edit [data-edit]:focus { outline: 2px solid var(--ed-accent); background: rgba(255,255,255,0.7); }
body.inline-edit .contact [data-edit]:focus { background: rgba(255,255,255,0.08); }
body.inline-edit [data-edit]:empty::before { content: attr(data-ph); opacity: 0.4; font-style: italic; }
body.inline-edit .bite-card, body.inline-edit .project-card { transform: none !important; }
body.inline-edit .edit-fab { display: none; }
body.inline-edit { padding-bottom: 88px; }
.ed-slot { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 120px; margin: 8px 0 32px !important; border: 2px dashed rgba(13,107,120,0.35); border-radius: 16px; background: rgba(255,255,255,0.5); color: var(--ed-accent) !important; font: 600 15px var(--font-body); cursor: pointer; }
.ed-slot:hover { border-color: var(--ed-accent); background: #fff; }
.aspect .ed-slot { margin: 20px 0 0 !important; min-height: 96px; }
.ed-slot-wrap { position: relative; margin: 8px 0 32px !important; }
.ed-slot-wrap > .ed-slot { margin: 0 !important; padding-right: 96px !important; padding-left: 96px !important; }
.aspect .ed-slot-wrap { margin: 20px 0 0 !important; }
.sp-section > .ed-slot-wrap { margin: 12px 0 0 !important; }
.sp-section > .ed-slot-wrap > .ed-slot { padding-left: 14px !important; }
.ed-paste-chip { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #fff; border: 1px solid var(--ed-line); border-radius: 8px; padding: 6px 12px !important; font: 600 13px var(--font-body); color: var(--ed-ink) !important; cursor: pointer; }
.ed-paste-chip:hover { border-color: var(--ed-accent); }
.paste-armed { outline: 2px dashed var(--ed-accent) !important; outline-offset: 3px; }
.ed-imgtools { display: flex; gap: 8px; margin-top: 10px !important; }
.ed-imgtools button { background: #fff; border: 1px solid var(--ed-line); border-radius: 8px; padding: 6px 12px !important; font: 600 13px var(--font-body); color: var(--ed-ink) !important; cursor: pointer; }
.ed-imgtools button:hover { border-color: var(--ed-accent); }
.ed-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1150; width: min(760px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ed-ink); color: #fff; border-radius: 16px; padding: 10px 10px 10px 18px !important; box-shadow: 0 12px 36px rgba(0,0,0,0.25); font: 400 13px/1.4 var(--font-body); }
.ed-bar .ed-status { flex: 1; min-width: 180px; color: rgba(255,255,255,0.75); }
.ed-bar .ed-status strong { color: #fff; }
.ed-bar .ed-status.error { color: #FFB4AB; }
.ed-bar .ed-btn { background: transparent; border-color: rgba(255,255,255,0.25); color: #fff; }
.ed-bar .ed-btn:hover { border-color: #fff; }
.ed-bar .ed-publish { background: var(--pink); }
.ed-stale { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #FFF6DA; color: var(--ed-ink); border-radius: 10px; padding: 10px 12px !important; font-size: 13px; }
.ed-stale span { flex: 1 1 260px; }
.ed-bar .ed-stale .ed-btn { color: var(--ed-ink); border-color: rgba(0,0,0,0.2); background: #fff; }
#editor .ed-stale { margin: 0 20px 10px !important; }
@media (min-width: 1100px) { body.editing .ed-bar { left: calc(50% - 230px); } }

/* ============ EDITOR (owner only) ============ */
.edit-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 1100; background: var(--ed-ink); color: #fff; border: none; border-radius: 999px; padding: 12px 20px; font: 600 14px/1 var(--font-body); cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.18); display: flex; align-items: center; gap: 8px; }
.edit-fab:hover { background: #000; }
.edit-fab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
body.editing .edit-fab { display: none; }
#editor { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 1200; background: var(--ed-bg); color: var(--ed-ink); border-left: 1px solid var(--ed-line); box-shadow: -12px 0 40px rgba(0,0,0,0.12); display: flex; flex-direction: column; font: 400 14px/1.5 var(--font-body); padding-top: env(safe-area-inset-top, 0px); }
@media (min-width: 1100px) { body.editing { padding-right: 460px; } body.editing .nav { right: 460px; } }
.ed-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0 !important; gap: 12px; }
.ed-head h2 { font: 700 16px/1.2 var(--font-body); }
.ed-close { background: none; border: 1px solid var(--ed-line); border-radius: 8px; padding: 6px 12px !important; font: 600 13px var(--font-body); cursor: pointer; color: var(--ed-ink); }
.ed-tabs { display: flex; gap: 4px; padding: 12px 20px 0 !important; border-bottom: 1px solid var(--ed-line); overflow-x: auto; scrollbar-width: none; }
.ed-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 10px 10px !important; font: 600 13px var(--font-body); color: var(--ed-muted); cursor: pointer; white-space: nowrap; }
.ed-tab[aria-selected="true"] { color: var(--ed-ink); border-bottom-color: var(--ed-accent); }
.ed-body { flex: 1; overflow-y: auto; padding: 16px 20px 32px !important; display: flex; flex-direction: column; gap: 14px; }
.ed-notice { background: #FFF6DA; border-radius: 8px; padding: 10px 12px !important; font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.ed-field { display: flex; flex-direction: column; gap: 5px; }
.ed-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ed-ink); }
.ed-hint { font-size: 12px; color: var(--ed-muted); }
.ed-input, .ed-textarea, .ed-select { width: 100%; font: 400 14px/1.45 var(--font-body); color: var(--ed-ink); background: var(--ed-field); border: 1px solid var(--ed-line); border-radius: 8px; padding: 8px 10px !important; }
.ed-textarea { resize: vertical; min-height: 72px; }
.ed-input:focus, .ed-textarea:focus, .ed-select:focus { outline: 2px solid var(--ed-accent); outline-offset: 0; border-color: transparent; }
.ed-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ed-check input { width: 16px; height: 16px; accent-color: var(--ed-accent); }
.ed-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-color { width: 44px; height: 36px; padding: 2px !important; border: 1px solid var(--ed-line); border-radius: 8px; background: var(--ed-field); cursor: pointer; }
.ed-group { border: 1px solid var(--ed-line); border-radius: 12px; padding: 14px !important; display: flex; flex-direction: column; gap: 12px; background: var(--ed-field); }
.ed-group-title { font: 700 14px var(--font-body); color: var(--ed-muted); }
.ed-list { display: flex; flex-direction: column; gap: 8px; }
.ed-item { border: 1px solid var(--ed-line); border-radius: 10px; background: var(--ed-field); }
.ed-item.drag-over { outline: 2px dashed var(--ed-accent); }
.ed-item.dragging { opacity: 0.4; }
.ed-item > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 6px !important; cursor: pointer; }
.ed-item > summary::-webkit-details-marker { display: none; }
.ed-handle { cursor: grab; color: var(--ed-muted); padding: 4px 6px !important; font-size: 16px; line-height: 1; user-select: none; }
.ed-sum { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sum.hidden-item { color: var(--ed-muted); font-weight: 500; }
.ed-iconbtn { background: none; border: 1px solid transparent; border-radius: 6px; padding: 3px 7px !important; font: 600 12px var(--font-body); color: var(--ed-muted); cursor: pointer; }
.ed-iconbtn:hover { border-color: var(--ed-line); color: var(--ed-ink); }
.ed-iconbtn.confirm { color: #fff; background: var(--ed-danger); }
.ed-item-body { padding: 4px 12px 14px !important; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--ed-line); padding-top: 12px !important; }
.ed-add { align-self: flex-start; background: none; border: 1px dashed var(--ed-accent); color: var(--ed-accent); border-radius: 8px; padding: 7px 12px !important; font: 600 13px var(--font-body); cursor: pointer; }
.ed-add:hover { background: #E8F4F6; }
.ed-img { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ed-img img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--ed-line); background: #eee; }
.ed-btn { background: var(--ed-field); border: 1px solid var(--ed-line); border-radius: 8px; padding: 7px 12px !important; font: 600 13px var(--font-body); color: var(--ed-ink); cursor: pointer; }
.ed-btn:hover { border-color: var(--ed-muted); }
.ed-foot { border-top: 1px solid var(--ed-line); padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)) !important; display: flex; align-items: center; gap: 10px; background: var(--ed-bg); flex-wrap: wrap; }
.ed-status { flex: 1; min-width: 150px; font-size: 12px; color: var(--ed-muted); }
.ed-status strong { color: var(--ed-ink); }
.ed-status.error { color: var(--ed-danger); }
.ed-publish { background: var(--ed-accent); color: #fff; border: none; border-radius: 8px; padding: 9px 16px !important; font: 700 14px var(--font-body); cursor: pointer; }
.ed-publish:disabled { opacity: 0.45; cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* PUBLIC PAGE: portfolio teaser (replaces the work and quick bytes bands) */
.teaser-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 56px; background: var(--white); border-radius: 24px; padding: 48px 56px !important; box-shadow: 0 12px 40px rgba(3,51,51,0.07); }
.teaser-copy { flex: 1 1 420px; min-width: 0; max-width: 640px; }
.teaser-copy .section-heading { margin-bottom: 14px !important; }
.teaser-text { font-size: 18px; line-height: 1.65; opacity: 0.78; white-space: pre-line; }
.teaser-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; flex: 0 1 auto; }
#root .teaser-btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; font-size: 17px; font-weight: 700; border-radius: 14px; }
#root .teaser-btn:hover { background: var(--dark-teal); }
.teaser-ask { font-size: 16px !important; }
.lock-ico { width: 18px; height: 18px; flex: none; }
.teaser-ask svg, .lock-ask svg { width: 18px; height: 18px; flex: none; transition: transform 0.2s; }
.teaser-ask:hover svg, .lock-ask:hover svg { transform: translateX(4px); }

/* PORTFOLIO PAGE: short top band and lock screen */
.hero.portfolio-hero { min-height: 0; padding: 150px 60px 64px; }
.portfolio-hero .hero-inner { max-width: 1200px; width: 100%; margin: 0 auto !important; }
#root .portfolio-title { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 800; font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.04em; text-wrap: balance; color: var(--dark); margin-bottom: 20px !important; }
.portfolio-title:focus { outline: none; }
.portfolio-hero .hero-sub { margin-bottom: 0 !important; }
.hero.lock-hero { min-height: 88vh; justify-content: center; align-items: center; }
.lock-hero .hero-inner { display: flex; justify-content: center; }
.lock-card { width: 100%; max-width: 520px; background: var(--white); border-radius: 24px; padding: 44px 44px 36px !important; box-shadow: 0 18px 50px rgba(3,51,51,0.10); display: flex; flex-direction: column; align-items: flex-start; }
.lock-badge { width: 52px; height: 52px; border-radius: 16px; background: #FFF0F5; color: var(--pink); display: grid; place-items: center; margin-bottom: 22px !important; }
.lock-badge .lock-ico { width: 24px; height: 24px; }
#root .lock-title { font-family: var(--font-heading); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; text-wrap: balance; margin-bottom: 12px !important; }
.lock-text { font-size: 17px; line-height: 1.6; opacity: 0.78; margin-bottom: 26px !important; white-space: pre-line; }
.lock-label { font-size: 14px; font-weight: 700; margin-bottom: 8px !important; }
.lock-row { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.lock-input { flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 16px !important; font: 500 17px var(--font-body); color: var(--dark); background: var(--bg); border: 1.5px solid rgba(0,0,0,0.16); border-radius: 12px; }
.lock-input:focus { outline: none; border-color: var(--dark-teal); box-shadow: 0 0 0 3px rgba(3,51,51,0.12); }
#root .lock-btn { height: 52px; padding: 0 26px; font-size: 16px; font-weight: 700; border-radius: 12px; flex: 0 0 auto; }
#root .lock-btn:hover { background: var(--dark-teal); }
#root .lock-btn:disabled { opacity: 0.6; cursor: progress; }
.lock-msg { min-height: 1.5em; margin-top: 12px !important; font-size: 15px; color: var(--ed-muted); }
.lock-msg.error { color: var(--ed-danger); font-weight: 600; }
.lock-ask { margin-top: 10px !important; font-size: 16px !important; }
@media (max-width: 900px) {
  .hero.portfolio-hero { padding: 120px 24px 48px; }
  .teaser-card { padding: 32px 24px !important; }
  .lock-card { padding: 32px 24px 28px !important; }
  #root .lock-btn { flex: 1 1 100%; }
}

/* PORTFOLIO: header with page switcher, two pages (Work / Quick bytes) */
.hero.portfolio-hero:not(.lock-hero) { padding: 168px 60px 72px; }
.portfolio-hero .hero-eyebrow { margin-bottom: 22px !important; }
.portfolio-hero .hero-sub { max-width: 640px; }
.view-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 40px !important; padding: 5px !important; background: rgba(255,255,255,0.72); border: 1px solid rgba(3,51,51,0.08); border-radius: 999px; box-shadow: 0 6px 20px rgba(3,51,51,0.06); }
.view-tab { display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px !important; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--dark); opacity: 0.7; transition: background 0.2s, color 0.2s, opacity 0.2s; }
.view-tab:hover { opacity: 1; }
#root .view-tab.on { background: var(--dark); color: #fff; opacity: 1; }
.view-count { font-size: 13px; font-weight: 700; min-width: 24px; height: 24px; padding: 0 7px !important; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(3,51,51,0.08); font-variant-numeric: tabular-nums; }
.view-tab.on .view-count { background: rgba(255,255,255,0.18); }
.view-band { padding-top: 56px; }
.view-band .projects-grid { margin-top: 0 !important; }
.view-next { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; margin-top: 64px !important; padding: 26px 30px !important; border-radius: 20px; background: rgba(255,255,255,0.75); border: 1px solid rgba(3,51,51,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.bites .view-next { background: var(--bg); }
.view-next:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.view-next-label { font-size: 13px; font-weight: 600; opacity: 0.55; flex-basis: 100%; }
.view-next-title { font-family: var(--font-heading); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; flex: 1 1 auto; min-width: 0; }
.view-next svg { width: 22px; height: 22px; flex: none; transition: transform 0.2s; }
.view-next:hover svg { transform: translateX(4px); }
@media (max-width: 900px) {
  .hero.portfolio-hero:not(.lock-hero) { padding: 128px 24px 56px; }
  .view-band { padding-top: 40px; }
}
@media (max-width: 480px) {
  .view-switch { display: flex; }
  .view-tab { flex: 1 1 0; justify-content: center; padding: 11px 12px !important; }
}

/* The first wave overlaps the bottom of the hero, so there's no straight edge or pale strip
   between them, and the photo sits behind the curve. The wave is 1440x72, so its height is 5vw. */
#root .hero + .wave { position: relative; z-index: 3; margin-top: calc(-5vw + 1px) !important; background: transparent !important; pointer-events: none; }
#root .hero { padding-bottom: calc(100px + 3vw); }
#root .hero.portfolio-hero:not(.lock-hero) { padding-bottom: calc(72px + 3vw); }
@media (max-width: 900px) {
  #root .hero { padding-bottom: calc(80px + 3vw); }
  #root .hero.portfolio-hero:not(.lock-hero) { padding-bottom: calc(56px + 3vw); }
}

/* PORTFOLIO header image: text left, devices right, standing on the bottom edge of the header.
   The image carries its own contact shadows, so no CSS shadow here. */
.portfolio-hero.has-art .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 40px 64px; max-width: 1320px; }
.ph-copy { min-width: 0; }
.ph-art { margin: 0 !important; min-width: 0; align-self: end; }
.ph-art img { display: block; width: 100%; height: auto; max-width: 720px; margin-left: auto !important; }
#root .hero.portfolio-hero.has-art { padding-bottom: calc(24px + 3vw); }
@media (max-width: 1000px) {
  .portfolio-hero.has-art .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .ph-art img { margin: 16px auto 0 !important; max-width: 560px; }
}

/* Docked copy of the Work / Quick bytes switch, under the fixed menu */
#root .view-dock { position: fixed; left: 50%; top: 96px; z-index: 90; margin: 0 !important; transform: translate(-50%, -10px); opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.2s; background: rgba(255,255,255,0.94); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(3,51,51,0.12); }
#root .view-dock.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.2s, transform 0.2s, visibility 0s; }
#root .view-dock .view-tab { padding: 9px 18px !important; font-size: 15px; }
body.editing #root .view-dock { left: calc((100% - 460px) / 2); }
@media (max-width: 480px) { #root .view-dock { width: calc(100% - 32px); display: flex; } }
@media (prefers-reduced-motion: reduce) { #root .view-dock { transition: none; } }

/* Close the hairline seam where a wave meets the band under it */
#root .wave + .band { margin-top: -1px !important; }
#root .wave svg { margin-bottom: -1px !important; }

/* Edit mode: hide / show cards without deleting them */
.vis-wrap { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.vis-btn { font: 600 13px/1 var(--font-body); color: var(--ed-ink) !important; background: var(--ed-field); border: 1px solid var(--ed-line); border-radius: 999px; padding: 8px 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.vis-btn:hover { border-color: var(--ed-ink); }
.vis-badge { font: 600 12px/1 var(--font-body); color: #fff; background: var(--ed-ink); border-radius: 999px; padding: 7px 11px; }
#root .is-hidden > :not(.vis-wrap) { opacity: 0.35; }
#root .is-hidden { outline: 2px dashed rgba(31,42,44,0.25); outline-offset: -2px; }
.project-card, .bite-card { position: relative; }

/* Image viewer for case studies and quick bytes */
#root img.zoomable { cursor: zoom-in; transition: box-shadow 0.2s, transform 0.2s; }
#root img.zoomable:hover { box-shadow: 0 12px 34px rgba(0,0,0,0.14); }
#root img.zoomable:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.lb { position: fixed; inset: 0; z-index: 3000; background: rgba(12,22,24,0.96); display: none; flex-direction: column; align-items: center; justify-content: center; padding: calc(56px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.lb.open { display: flex; }
.lb-stage { max-width: 100%; max-height: calc(100% - 64px); display: flex; align-items: center; justify-content: center; }
.lb-img { display: block; max-width: 94vw; max-height: calc(100vh - 150px); width: auto; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.lb.can-zoom .lb-img { cursor: zoom-in; }
.lb.full .lb-stage { width: 100%; height: calc(100% - 64px); overflow: auto; display: block; overscroll-behavior: contain; }
.lb.full .lb-img { max-width: none; max-height: none; cursor: zoom-out; margin: 0 auto; }
.lb-cap { margin: 14px 0 0; max-width: 760px; color: rgba(255,255,255,0.86); font: 15px/1.5 var(--font-body); text-align: center; }
.lb-hint { margin: 6px 0 0; color: rgba(255,255,255,0.55); font: 13px/1.4 var(--font-body); text-align: center; min-height: 1em; }
.lb-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px; width: 44px; height: 44px; border-radius: 999px; border: none; background: rgba(255,255,255,0.14); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-close:hover { background: rgba(255,255,255,0.26); }
.lb-close svg { width: 20px; height: 20px; }
.lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Portfolio header: a longer headline that stays readable next to the image */
#root .portfolio-hero .portfolio-title { font-size: clamp(36px, 3.7vw, 58px); line-height: 1.04; letter-spacing: -0.035em; max-width: 15ch; }
#root .portfolio-hero .portfolio-title em { display: inline; font-size: 1.06em; line-height: 1; padding-right: 0.04em; }
#root .portfolio-hero .hero-sub { font-size: 18px; max-width: 34em; }
@media (min-width: 1001px) { .portfolio-hero.has-art .hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 32px 56px; } }
.ph-art img { max-width: 660px; }
@media (max-width: 1000px) {
  #root .portfolio-hero .portfolio-title { max-width: 18ch; }
}

/* Tags: one pastel per discipline */
#root .tag { background: var(--tag, rgba(0,0,0,0.07)); color: #22343A; box-shadow: inset 0 0 0 1px rgba(3,51,51,0.07); }

/* Previous / next in the side page top bar */
.sp-crumb { flex: 1 1 auto; }
.sp-steps { display: flex; gap: 8px; margin-left: auto !important; flex: none; }
.sp-step { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border: 1.5px solid rgba(0,0,0,0.12); border-radius: 999px; padding: 8px 14px !important; font: 600 14px var(--font-body); color: var(--dark) !important; cursor: pointer; transition: border-color 0.15s; white-space: nowrap; }
.sp-step:hover { border-color: var(--dark); }
.sp-step svg { width: 15px; height: 15px; flex: none; }
.sp-step.is-off { visibility: hidden; padding: 0 !important; border: none; }
@media (max-width: 760px) {
  .sp-crumb { display: none; }
  .sp-step span { display: none; }
  .sp-step { width: 40px; height: 40px; padding: 0 !important; justify-content: center; }
  .sp-step.is-off { display: none; }
}

/* Short laptop screens: keep hero CTAs, photo and the lock field above the fold */
@media (min-width: 901px) {
  .hero:not(.portfolio-hero) { padding-top: clamp(96px, 15vh, 140px); padding-bottom: clamp(48px, 9vh, 100px); }
  #root .hero h1 { font-size: clamp(40px, min(5.6vw, 8.4vh), 86px); margin-bottom: clamp(18px, 3.2vh, 32px) !important; }
  .hero-eyebrow { margin-bottom: clamp(14px, 2.6vh, 28px) !important; }
  .hero-sub { margin-bottom: clamp(24px, 4vh, 40px) !important; }
  .hero-tags { margin-top: clamp(28px, 6vh, 72px) !important; }
  .hero.lock-hero { padding-top: clamp(96px, 13vh, 140px); padding-bottom: 40px; }
  #root .hero .lock-title { font-size: clamp(30px, min(3.4vw, 5.8vh), 50px); line-height: 1.08; margin-bottom: 12px !important; }
}
