/* SUNARROW V21 — person-first composition */
:root {
  --shell: min(1600px, calc(100vw - clamp(40px, 5vw, 96px)));
  --v21-section-y: clamp(72px, 8vw, 128px);
  --v21-panel-pad: clamp(28px, 4.2vw, 68px);
  --v21-card-pad: clamp(22px, 2vw, 32px);
  --v21-gap: clamp(16px, 2vw, 28px);
  --v21-radius: clamp(22px, 2.2vw, 30px);
  --header-height: 78px;
}

html { scroll-padding-top: calc(var(--header-h) + 20px); }
body { overflow-x: clip; }
#projects.section-shell,
#experience.section-shell {
  width: min(1280px, calc(100% - 64px));
  margin-inline: auto;
}
#projects { scroll-margin-top: calc(var(--header-height) + 20px); }
#experience { scroll-margin-top: calc(var(--header-height) + env(safe-area-inset-top) + 24px); }
main { display: flex; flex-direction: column; gap: clamp(18px, 2.2vw, 34px); }
.section-shell { min-width: 0; }
.section-heading { margin-bottom: clamp(30px, 4vw, 58px) !important; }
.section-heading h2,
#about h2,
#finance h2,
#contact h2 {
  max-width: 22ch;
  font-size: clamp(48px, 5vw, 72px) !important;
  line-height: .96 !important;
  text-wrap: balance;
}
.section-id { margin-bottom: clamp(28px, 3.6vw, 46px) !important; }
.section-id span { font-size: 14px !important; }
#projects .section-heading { grid-template-columns: minmax(0, 1fr) !important; }
#projects .section-heading h2 {
  width: 100%;
  max-width: 860px;
  font-size: clamp(54px, 6vw, 82px) !important;
  line-height: .96 !important;
}
.brand-copy small,
.main-nav a,
.section-menu-toggle span,
.language-switch button,
.section-drawer-head small,
.section-drawer-nav b,
.section-drawer-contact,
.availability-line span,
.scroll-indicator,
.scroll-indicator span,
#manifesto-kicker,
.native-details > summary,
.native-details > summary span,
.button,
.button span,
.card-code span,
.project-type,
.project-count,
.project-pause span,
.site-footer,
.footer-notes span { font-size: 14px !important; }
.brand-copy strong,
.site-footer strong,
.button i,
.back-to-top span { font-size: 14px !important; }
.back-to-top {
  right: max(24px, calc((100vw - min(1280px, calc(100vw - 64px))) / 2 + 24px)) !important;
}
#project-image:not([src]) { visibility: hidden !important; }

/* Header and drawer */
.site-header { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important; }
.section-drawer-settings {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.section-drawer-settings > button,
.drawer-language-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-2);
  font: 750 15px/1.2 var(--body);
}
.section-drawer-settings > button { width: 100%; cursor: pointer; }
.section-drawer-settings i { font-style: normal; font-size: 20px; }
.drawer-language-switch { display: flex; gap: 6px; }
.drawer-language-switch button {
  min-width: 48px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: transparent;
  font: 800 14px/1 var(--display);
  cursor: pointer;
}
.drawer-language-switch button.active { color: #fffaf0; background: var(--orange); border-color: var(--orange); }

/* Hero: person above the system */
#hero {
  min-height: min(920px, calc(100svh - 20px)) !important;
  padding-top: clamp(120px, 12vh, 170px) !important;
  padding-bottom: clamp(80px, 9vh, 124px) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr) !important;
  align-items: center !important;
  gap: clamp(30px, 5vw, 90px) !important;
  isolation: isolate;
}
#hero::before {
  content: "";
  position: absolute;
  inset: 7% -6% 2% 42%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle at 58% 45%, rgba(226, 119, 49, .22), transparent 58%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 3; max-width: 980px !important; }
.hero-copy .eyebrow:empty { display: none; }
.hero h1 {
  max-width: 12.5ch !important;
  margin: clamp(24px, 3vw, 42px) 0 28px !important;
  font-size: clamp(72px, 6.5vw, 100px) !important;
  line-height: .91 !important;
  letter-spacing: -.055em !important;
  text-wrap: balance;
}
.hero h1 span,
.hero h1 em { display: block; }
.hero h1 em { margin-top: .12em; color: var(--orange-soft) !important; font-style: normal; }
.hero-lead {
  max-width: 720px !important;
  margin: 0 !important;
  font-size: clamp(19px, 1.45vw, 23px) !important;
  line-height: 1.52 !important;
}
.hero-aside {
  max-width: 560px;
  margin: 20px 0 0 !important;
  color: var(--green-2) !important;
  font-size: 18px !important;
  font-weight: 750;
}
.hero-actions { margin-top: clamp(30px, 4vw, 46px) !important; gap: 12px !important; }
.hero-actions .button { min-height: 52px; padding-inline: 24px; font-size: 15px !important; }
.hero-codes { display: none !important; }
.hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 640px;
  display: grid;
  place-items: end center;
  overflow: visible;
  isolation: isolate;
}
.hero-visual.reveal { opacity: 1 !important; }
.hero-visual-orbit {
  position: absolute;
  inset: 10% -8% 7% 2%;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--orange) 46%, transparent);
  border-radius: 50%;
  transform: rotate(-16deg);
}
.hero-visual-orbit::after {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid color-mix(in srgb, var(--green-2) 38%, transparent);
  border-radius: inherit;
}
/* Two soft glow accents that fade/scale in once on load -- opacity and
   transform only (no filter:blur, no fixed-position full-page element),
   contained inside the hero visual itself rather than a page-spanning
   backdrop. Finite (not infinite) animation-iteration-count, and no
   !important on it, so prefers-reduced-motion's site-wide killswitch
   (*{animation-duration:.01ms!important} in styles.css) still collapses
   it correctly for anyone who needs that. */
.hero-visual::before,
.hero-visual-orbit::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: scale(.55);
}
.hero-visual::before {
  top: 6%;
  right: 4%;
  width: clamp(120px, 14vw, 190px);
  height: clamp(120px, 14vw, 190px);
  background: radial-gradient(circle, color-mix(in srgb, var(--orange) 55%, transparent) 0%, transparent 72%);
  animation: heroGlowIn 1s ease-out .15s 1 forwards;
}
.hero-visual-orbit::before {
  top: 58%;
  left: -6%;
  width: clamp(90px, 10vw, 150px);
  height: clamp(90px, 10vw, 150px);
  background: radial-gradient(circle, color-mix(in srgb, var(--green-bright) 50%, transparent) 0%, transparent 72%);
  animation: heroGlowIn 1s ease-out .35s 1 forwards;
}
@keyframes heroGlowIn {
  to { opacity: .38; transform: scale(1); }
}
.hero-visual .operator-photo-wrap {
  width: min(100%, 630px) !important;
  height: 100% !important;
  min-height: 640px;
  display: grid;
  place-items: end center;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.hero-visual .operator-photo-wrap::before,
.hero-visual .operator-photo-wrap::after { content: none !important; }
.hero-visual #hero-photo {
  width: 100% !important;
  height: 100% !important;
  max-height: 760px;
  object-fit: contain !important;
  object-position: center bottom !important;
  filter: drop-shadow(0 28px 30px rgba(24, 34, 26, .18)) !important;
}
.scroll-indicator { bottom: 26px !important; }

/* Compact editorial purpose */
#manifesto {
  min-height: 0 !important;
  padding: clamp(30px, 4vw, 52px) 0 !important;
  background: color-mix(in srgb, var(--surface) 96%, transparent) !important;
  border-block: 1px solid var(--line);
  backdrop-filter: none !important;
}
.manifesto-grid {
  display: grid !important;
  grid-template-columns: minmax(150px, .3fr) minmax(0, 1.7fr) !important;
  gap: 18px clamp(26px, 5vw, 80px) !important;
  align-items: start !important;
}
.manifesto-grid > div { grid-row: 1 / span 2; }
#manifesto-text {
  grid-column: 2 !important;
  max-width: 850px !important;
  margin: 0 !important;
  font-size: clamp(24px, 2.4vw, 38px) !important;
  line-height: 1.18 !important;
  color: var(--text) !important;
  text-wrap: balance;
}
.manifesto-details { grid-column: 2 !important; margin-top: 4px !important; }
.manifesto-details > p { max-width: 760px; font-size: 18px; }

/* Shared calm sections */
#workflow,
#experience,
#about,
#finance {
  box-sizing: border-box;
  padding: var(--v21-panel-pad) !important;
  border: 1px solid var(--v20-border);
  border-radius: var(--v21-radius) !important;
  background: var(--v20-section) !important;
  box-shadow: none !important;
  content-visibility: visible !important;
}
/* .native-details summary's beige-on-tan text is a hair under WCAG AA
   (4.42:1, needs 4.5:1) on the --v20-section background these four
   sections share, light theme only -- dark theme already passes at
   6-7:1 with the default --beige and must NOT get this override (the
   same swap on the dark --v20-section background drops to ~2:1). */
html[data-theme="light"] #workflow .native-details summary,
html[data-theme="light"] #experience .native-details summary,
html[data-theme="light"] #about .native-details summary,
html[data-theme="light"] #finance .native-details summary { color: var(--brown-dark); }
#projects { padding-block: var(--v21-section-y) 0 !important; }
#contact { padding-block: var(--v21-section-y) !important; }
#workflow,
#experience,
#about,
#finance { margin-block: clamp(18px, 2vw, 30px); }

/* Featured projects */
#projects { position: relative; isolation: isolate; }
#projects::before {
  content: "";
  position: absolute;
  inset: 2% -15% 6%;
  z-index: -1;
  background: radial-gradient(circle at 82% 30%, rgba(216, 108, 34, .18), transparent 42%);
  pointer-events: none;
}
#projects .project-console {
  max-height: none !important;
  overflow: visible !important;
  border-radius: var(--v21-radius) !important;
  box-shadow: none !important;
}
#projects .project-tabs {
  width: 100%;
  min-height: 54px !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  overflow: visible !important;
  border-bottom: 1px solid var(--line);
}
#projects .project-tabs.has-hidden-tabs {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 32px), transparent 100%);
}
#projects .project-tab {
  width: 100%;
  min-width: 0 !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 14px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  white-space: nowrap;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  color: rgba(255, 244, 221, .7) !important;
}
#projects .project-tab::after {
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--orange);
  box-shadow: none;
}
#projects .project-tab:hover,
#projects .project-tab:focus-visible,
#projects .project-tab.active { color: #fff4dd !important; background: color-mix(in srgb, var(--orange) 9%, transparent) !important; }
#projects .project-tab-index { display: inline; color: var(--orange-soft); font: 800 10px/1 var(--display); letter-spacing: .08em; }
#projects .project-tab-label { width: auto !important; height: auto !important; font: 600 15px/1 var(--display); letter-spacing: .01em; }
#projects .project-view { min-height: 0 !important; touch-action: pan-y; }
#projects .project-view--with-media {
  display: grid !important;
  grid-template-columns: minmax(0, 56fr) minmax(340px, 44fr) !important;
  align-items: stretch;
}
#projects .project-view--without-media { display: block !important; }
#projects .project-media {
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10 !important;
  align-self: start !important;
  border-right: 1px solid var(--line);
}
#projects .project-media[hidden] { display: none !important; }
#projects .project-media-placeholder { position: absolute; inset: 0; background: radial-gradient(circle at 72% 24%, rgba(229,121,47,.14), transparent 38%), #10251a; }
#projects .project-media.has-image .project-media-placeholder,
#projects .project-media.has-video .project-media-placeholder { display: none; }
#projects .project-media[data-preview="false"] .media-phase-dots { display: none; }
#projects .project-media.manual-preview .media-phase-dots { display: none; }
#projects .project-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--bg-deep);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35), 0 0 0 10px rgba(244, 239, 228, .12);
  transition: transform .18s ease, background .18s ease;
  z-index: 3;
}
#projects .project-video-play:hover { background: var(--orange-soft); transform: translate(-50%, -50%) scale(1.06); }
#projects .project-video-play i {
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  transform: translateX(2px);
}
#projects .project-media:not(.manual-preview) .project-video-play,
#projects .project-video-play[hidden] { display: none; }

.ambient-audio-control { position: relative; display: flex; }
.ambient-audio-toggle.is-playing {
  animation: ambient-audio-pulse 2.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ambient-audio-toggle.is-playing { animation: none; }
}
@keyframes ambient-audio-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 45%, transparent); }
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--orange) 0%, transparent); }
}
.ambient-audio-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
.ambient-audio-panel[hidden] { display: none; }
.ambient-audio-panel input[type="range"] {
  width: 100%;
  accent-color: var(--orange);
  cursor: pointer;
}
#projects .project-copy { max-height: none !important; overflow: visible !important; }
#projects .project-copy--with-media {
  min-height: 100% !important;
  padding: clamp(30px, 3.4vw, 50px) !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
}
#projects .project-copy--without-media {
  min-height: 0 !important;
  padding: 40px 48px 28px !important;
  display: grid !important;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  grid-template-areas: "brand description" "facts facts" "links links";
  row-gap: 0;
  column-gap: 48px;
  align-items: center;
}
#projects .project-copy h3 { font-size: clamp(38px, 3.6vw, 58px) !important; line-height: .98 !important; }
#projects .project-copy--without-media h3 { grid-area: brand; margin: 0 !important; }
#projects .project-copy.has-project-lockup h3 {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#projects .project-brandline {
  grid-area: brand;
  min-height: 72px;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
#projects .project-brandline[hidden] { display: none !important; }
#projects .project-brand-badge,
#projects .project-brand-badge-host,
#projects .project-lockup { width: 100% !important; max-width: none !important; min-height: 72px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
#projects .project-lockup .themed-logo-panel {
  width: 100% !important;
  height: 72px !important;
  min-height: 72px !important;
  padding: 0 !important;
  justify-items: start !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#projects .project-lockup img {
  width: auto !important;
  height: auto !important;
  max-inline-size: min(340px, 88%) !important;
  max-block-size: 68px !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: left center !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
}
#projects [data-logo-surface="dark"] .themed-logo-light { display: none !important; }
#projects [data-logo-surface="dark"] .themed-logo-dark { display: grid !important; }
#projects .project-description { grid-area: description; margin: 0 !important; color: var(--cream-soft); font-size: 18px !important; line-height: 1.5 !important; }
#projects .project-copy--with-media .project-description { margin-top: 16px !important; }
#projects .project-summary-list { grid-area: facts; margin: 24px 0 0 !important; display: grid !important; gap: 16px !important; }
#projects .project-copy--without-media .project-summary-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px !important;
  margin-top: 28px !important;
}
#projects .project-summary-list > div { min-height: 0 !important; padding-top: 16px !important; }
#projects .project-summary-list dt { font-size: 14px !important; }
#projects .project-summary-list dd { margin-top: 9px !important; font-size: 17px !important; line-height: 1.45 !important; }
#projects .project-links { grid-area: links; position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px !important; padding-top: 0 !important; }
#projects .project-copy--with-media .project-links { margin-top: 24px !important; }
#projects .project-links:empty { display: none !important; }
#projects .project-links .mini-link { min-height: 48px; font-size: 14px !important; }
#projects .project-controls {
  min-height: 64px !important;
  padding: 8px 20px !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto 44px auto;
  align-items: center;
  gap: 12px;
}
#projects .project-controls #project-prev { grid-column: 1; }
#projects .project-controls #project-progress-track { grid-column: 2; }
#projects .project-controls #project-pause { grid-column: 3; }
#projects .project-controls .project-count { grid-column: 4; }
#projects .project-controls #project-next { grid-column: 5; }
#projects .project-controls:not(.has-preview) { grid-template-columns: 44px minmax(0, 1fr) auto 44px; }
#projects .project-controls:not(.has-preview) #project-prev { grid-column: 1; }
#projects .project-controls:not(.has-preview) .project-count { grid-column: 3; }
#projects .project-controls:not(.has-preview) #project-next { grid-column: 4; }
#projects .project-controls button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
#projects .project-controls [hidden] { display: none !important; }
#projects .project-progress { width: auto; margin: 0 !important; }
#projects .project-pause { width: auto !important; min-width: 44px !important; min-height: 44px !important; padding-inline: 14px !important; font-size: 14px !important; }
#projects .project-count { min-width: 64px; text-align: right; }
.video-platform-selector { position: relative; z-index: 8; }
.video-platform-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 180px;
  padding: 7px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(245, 235, 211, .22);
  border-radius: 12px;
  background: #10251a;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .24);
}
.video-platform-menu[hidden] { display: none !important; }
.video-platform-menu a { min-height: 44px; padding: 12px; border-radius: 8px; color: #fff4dd; font: 750 14px/1.2 var(--body); }
.video-platform-menu a:hover,
.video-platform-menu a:focus-visible { background: #1b3527; }
.other-projects-details {
  width: 100%;
  max-width: none;
  margin: 24px 0 48px;
  padding: 0 !important;
}
.other-projects-details.reveal {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
.other-projects-details > summary {
  min-height: 44px;
  margin-inline: 0;
  display: inline-flex;
  align-items: center;
  font-size: 15px !important;
}
/* Setting `display` here unconditionally beats the native <details> collapse
   rule (an author declaration always wins over the UA stylesheet's, whatever
   the specificity), so the grid must stay hidden itself while collapsed. */
.other-projects-details:not([open]) .other-projects-grid,
.finance-details:not([open]) .finance-topic-grid { display: none !important; }
.other-projects-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--v21-gap); }
.other-project-card {
  min-width: 0;
  padding: var(--v21-card-pad);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}
.other-project-card h3 { margin: 0; font: 800 clamp(24px, 2.2vw, 31px)/1 var(--display); }
.other-project-card > p { margin: 14px 0 20px; color: var(--muted); font-size: 18px; line-height: 1.48; }
.other-project-card dl { margin: 0; display: grid; gap: 16px; }
.other-project-card dt { color: var(--orange-soft); font: 800 14px/1 var(--display); letter-spacing: .08em; }
.other-project-card dd { margin: 8px 0 0; color: var(--text); font-size: 17px; line-height: 1.45; }
.other-project-card .mini-link { margin-top: 20px; }

/* Workflow */
#workflow .profile-cards { gap: var(--v21-gap) !important; border: 0 !important; background: transparent !important; }
#workflow .profile-card {
  min-height: 390px !important;
  padding: var(--v21-card-pad) !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--v20-border) !important;
  border-radius: 16px !important;
  background: var(--v20-card) !important;
  box-shadow: none !important;
}
#workflow .profile-card .card-code { width: 100%; }
#workflow .profile-card .card-icon {
  width: 168px !important;
  height: 118px !important;
  margin: 30px auto 26px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#workflow .profile-card .workflow-illustration { width: 168px !important; height: 118px !important; object-fit: contain; }
html[data-theme="light"] #workflow .profile-card .workflow-illustration { filter: brightness(.56) contrast(1.42) saturate(1.5) drop-shadow(0 8px 15px rgba(23, 51, 40, .1)) !important; }
html[data-theme="dark"] #workflow .profile-card .workflow-illustration { filter: brightness(1.16) saturate(1.08) !important; }
#workflow .profile-card h3 { margin: 0 !important; font-size: clamp(28px, 2.4vw, 34px) !important; min-height: 0 !important; }
#workflow .profile-card > p { margin: 12px 0 0 !important; color: var(--muted) !important; font-size: 18px !important; line-height: 1.5 !important; }
.workflow-note {
  min-height: 190px !important;
  margin-top: var(--v21-gap) !important;
  padding: 28px clamp(28px, 3.5vw, 52px) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 24px;
  overflow: hidden !important;
  border: 1px solid var(--v20-border) !important;
  border-radius: 16px !important;
  background: var(--v20-card-soft) !important;
}
.workflow-note .formula-copy p { max-width: 800px; margin: 0 !important; font-size: clamp(24px, 2.3vw, 34px) !important; line-height: 1.16 !important; color: var(--v20-card-text) !important; }

/* Experience */
#experience .trust-brand-grid {
  width: 100%;
  display: grid;
  /* auto-fit, not a fixed column count: with fewer logos than the grid was
     tuned for (currently 3), a fixed repeat(4,...) reserves a dead trailing
     column instead of letting the real cards fill the row -- this adapts
     to however many trust logos exist without needing a hand-tuned number. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#experience .trust-brand-card {
  --brand-logo-max-width: 220px;
  --brand-logo-max-height: 58px;
  min-width: 0;
  height: 108px;
  padding: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--v20-border);
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}
#experience .trust-brand-card[data-brand="trust-rusimex"] {
  --brand-logo-max-width: 220px;
  --brand-logo-max-height: 58px;
}
#experience .trust-brand-card[data-brand="trust-pricecube"] {
  --brand-logo-max-width: 210px;
  --brand-logo-max-height: 54px;
}
#experience .trust-brand-card[data-brand="trust-seven-circles"] {
  --brand-logo-max-width: 232px;
  --brand-logo-max-height: 58px;
}
html[data-theme="light"] #experience .trust-brand-card {
  background: color-mix(in srgb, var(--v20-card-soft) 35%, transparent);
}
#experience .trust-brand-card:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
#experience .trust-brand-text { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
#experience .trust-brand-text strong { font: 700 15px/1.25 var(--display); letter-spacing: .01em; }
#experience .trust-brand-text small { color: var(--muted-2); font-size: 14px; line-height: 1.3; }
#experience .trust-logo-visual { width: 100% !important; height: 72px !important; min-height: 0 !important; padding: 0 !important; overflow: visible !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
#experience .trust-logo-visual .themed-logo-panel { width: 100% !important; height: 72px !important; min-height: 0 !important; padding: 0 !important; overflow: visible !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
#experience .trust-logo-visual img { width: auto !important; height: auto !important; max-inline-size: min(var(--brand-logo-max-width), 100%) !important; max-block-size: var(--brand-logo-max-height) !important; padding: 0 !important; object-fit: contain !important; object-position: center !important; transform: none !important; filter: none !important; opacity: 1 !important; }
#experience .trust-reference-note {
  width: 100% !important;
  margin: 20px 0 0 !important;
  padding: 16px 0 0 !important;
  display: block !important;
  grid-template-columns: none !important;
  border: 0 !important;
  border-top: 1px solid var(--v20-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font-size: 15px !important;
  line-height: 1.5;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* About */
.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
.about-copy { display: flex; min-width: 0; flex-direction: column; }
.about-thoughts { margin: clamp(30px, 4vw, 56px) 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.about-thoughts li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-top: 1px solid var(--v20-border); }
.about-thoughts b { color: var(--brown); font: 800 14px/1.5 var(--display); }
/* --brown fails WCAG AA on the light-theme --v20-section background
   (3.92:1, needs 4.5:1); --brown-dark fixes that (6.74:1) but must stay
   light-theme-only -- on the dark --v20-section it drops to ~2:1. */
html[data-theme="light"] .about-thoughts b { color: var(--brown-dark); }
.about-thoughts p { max-width: 760px; margin: 0; color: var(--v20-card-text); font-size: clamp(19px, 1.55vw, 23px); line-height: 1.42; }
.about-accent { margin: auto 0 0; padding-top: 30px; color: var(--orange); font: 800 clamp(22px, 2vw, 30px)/1.2 var(--display); max-width: 760px; }
html[data-theme="light"] .about-accent { color: #934017; }
html[data-theme="light"] #about { background: #eadcc7 !important; color: #173328; }
html[data-theme="dark"] #about { background: #10251a !important; color: #fff4dd; }

/* Compact finance */
.finance-education-panel {
  padding: 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.finance-education-head { display: contents !important; }
.finance-education-copy { align-self: center; }
.finance-education-copy > p { max-width: 800px; margin: 20px 0 0 !important; color: var(--muted) !important; font-size: 19px !important; line-height: 1.5 !important; }
.finance-details { grid-column: 1; margin-top: 22px; }
.finance-topic-grid { margin: 18px 0 0 !important; padding: 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px 26px !important; list-style: none; }
.finance-topic { min-height: 46px; padding: 12px 0 !important; border: 0 !important; border-bottom: 1px solid var(--v20-border) !important; border-radius: 0 !important; background: transparent !important; color: var(--v20-card-text) !important; font-size: 17px; line-height: 1.35; }
.finance-topic-grid .finance-topic:last-child:nth-child(odd) { grid-column: 1 / -1; }
.finance-topic span { display: block; color: var(--muted); }
.finance-disclaimer { grid-column: 1 / -1; margin-top: 24px !important; padding: 18px 20px !important; border-radius: 12px !important; }
.finance-disclaimer strong,
.finance-disclaimer p { font-size: 14px !important; }

/* Contact and CV */
#contact .contact-panel {
  min-height: 0 !important;
  padding: clamp(34px, 5vw, 74px) !important;
  border-radius: var(--v21-radius) !important;
  box-shadow: none !important;
}
#contact h2 { max-width: 12ch; color: var(--cream); }
.contact-channels { margin-top: clamp(34px, 4vw, 58px) !important; backdrop-filter: none !important; }
.contact-channel { min-height: 176px; padding: 24px !important; }
.contact-channel small,
.copy-button { font-size: 14px !important; }
.contact-channel > a,
.contact-channel > strong { font-size: clamp(20px, 1.7vw, 28px) !important; overflow-wrap: anywhere; }
.contact-cv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.contact-cv-actions .button { min-height: 50px; }
.contact-availability { margin-top: 26px !important; font-size: 17px !important; }

@media (max-width: 1180px) {
  :root { --shell: min(100% - 48px, 1080px); }
  #hero { grid-template-columns: minmax(0, 1.05fr) minmax(330px, .75fr) !important; }
  .hero h1 { font-size: clamp(62px, 7.4vw, 86px) !important; }
  .hero-visual { min-height: 560px; }
  .hero-visual .operator-photo-wrap { min-height: 560px; }
  #projects .project-view--with-media { grid-template-columns: 1fr !important; }
  #projects .project-media { min-height: 0 !important; aspect-ratio: 16 / 10 !important; border-right: 0; border-bottom: 1px solid var(--line); }
  #projects .project-copy { min-height: 0 !important; }
  #experience .trust-brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --shell: min(100% - 36px, 820px); --v21-section-y: 82px; }
  #projects.section-shell,
  #experience.section-shell { width: calc(100% - 36px); }
  #projects .section-heading h2 {
    font-size: clamp(52px, 7.2vw, 60px) !important;
  }
  .back-to-top { display: none !important; }
  #hero {
    min-height: 0 !important;
    padding-top: 122px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }
  .hero h1 { max-width: 11.5ch !important; font-size: clamp(56px, 11vw, 82px) !important; }
  .hero-visual { min-height: 520px; order: 2; }
  .hero-visual .operator-photo-wrap { min-height: 520px; width: min(100%, 560px) !important; }
  .manifesto-grid { grid-template-columns: 1fr !important; }
  .manifesto-grid > div { grid-row: auto; }
  #manifesto-text,
  .manifesto-details { grid-column: 1 !important; }
  #projects .project-tabs {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  #projects .project-tabs::-webkit-scrollbar { display: none; }
  #projects .project-tab {
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: 104px !important;
    height: 50px !important;
    min-height: 50px !important;
    padding-inline: 16px !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  #projects .project-tab-label { font-size: 14px !important; }
  #projects .project-copy--without-media {
    padding: 32px !important;
    grid-template-columns: minmax(280px, .9fr) minmax(280px, 1.1fr);
    column-gap: 32px;
  }
  .other-projects-grid { grid-template-columns: 1fr; }
  .about-panel { grid-template-columns: 1fr; }
  .finance-education-panel { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px), (display-mode: standalone) {
  main { padding-bottom: calc(env(safe-area-inset-bottom) + 28px); }
  .back-to-top { display: none !important; }
}

@media (max-width: 768px) {
  :root { scroll-padding-top: 0 !important; }
  #projects {
    margin-top: var(--v21-section-y) !important;
    padding-top: 0 !important;
    scroll-margin-top: calc(var(--header-height) + 20px) !important;
  }
  #menu-toggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}

@media (max-width: 700px) {
  :root {
    --shell: calc(100% - 24px);
    --v21-section-y: 70px;
    --v21-panel-pad: 22px 14px;
    --v21-card-pad: 22px;
    --v21-radius: 20px;
    --header-height: 70px;
  }
  main { gap: 12px; }
  .section-heading h2,
  #about h2,
  #finance h2,
  #contact h2 { font-size: clamp(38px, 11vw, 52px) !important; line-height: .98 !important; }
  #hero { padding-top: 88px !important; padding-bottom: 60px !important; }
  .hero-copy { padding-block: 8px 0 !important; }
  .availability-line { font-size: 14px !important; }
  .hero h1 {
    max-width: none !important;
    margin: 18px 0 20px !important;
    font-size: clamp(42px, 11.5vw, 50px) !important;
    line-height: .92 !important;
  }
  .hero-lead { font-size: 17px !important; line-height: 1.45 !important; }
  .hero-aside { margin-top: 14px !important; padding: 0 !important; font-size: 15px !important; line-height: 1.4 !important; }
  .hero-actions { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .hero-actions { margin-top: 22px !important; }
  .hero-actions .button { width: 100% !important; min-height: 52px; }
  .hero-visual { min-height: 400px; }
  .hero-visual .operator-photo-wrap { min-height: 400px; }
  .scroll-indicator { display: none !important; }
  #manifesto { padding: 28px 0 !important; }
  #manifesto-text { font-size: 25px !important; }
  .manifesto-details > p { font-size: 17px; }
  #workflow,
  #about,
  #finance { width: calc(100% - 20px) !important; }
  #projects.section-shell,
  #experience.section-shell { width: calc(100% - 24px) !important; }
  #projects .section-heading h2 {
    font-size: clamp(38px, 11vw, 48px) !important;
    line-height: 1.02 !important;
  }
  #projects .project-tabs {
    min-height: 50px !important;
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 12px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  #projects .project-tabs.has-hidden-tabs {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%);
  }
  #projects .project-tabs::-webkit-scrollbar { display: none; }
  #projects .project-tab { width: auto !important; flex: 0 0 auto !important; min-width: 104px !important; height: 50px !important; min-height: 50px !important; padding-inline: 16px !important; scroll-snap-align: start; scroll-snap-stop: always; }
  #projects .project-tab::after { left: 16px; right: 16px; }
  #projects .project-tab-label { font-size: 14px !important; }
  #projects .project-media { height: clamp(200px, 58vw, 230px) !important; min-height: 0 !important; aspect-ratio: auto !important; }
  #projects .project-copy--with-media { padding: 26px 20px !important; }
  #projects .project-copy--without-media {
    padding: 22px 20px 16px !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "description" "facts" "links";
    row-gap: 14px;
    align-items: start;
  }
  #projects .project-copy--without-media:has(.project-links:empty) {
    grid-template-areas: "brand" "description" "facts";
  }
  #projects .project-copy h3 { font-size: 40px !important; }
  #projects .project-brandline,
  #projects .project-brand-badge,
  #projects .project-brand-badge-host,
  #projects .project-lockup { min-height: 64px !important; }
  #projects .project-lockup .themed-logo-panel { height: 64px !important; min-height: 64px !important; }
  #projects .project-lockup img { max-inline-size: min(280px, 92%) !important; max-block-size: 58px !important; }
  #projects .project-description,
  #projects .project-summary-list dd { font-size: 17px !important; }
  #projects .project-summary-list { margin-top: 0 !important; }
  #projects .project-copy--without-media .project-summary-list { grid-template-columns: minmax(0, 1fr); gap: 12px !important; margin-top: 0 !important; }
  #projects .project-summary-list > div { padding-block: 12px 6px !important; }
  #projects .other-projects-details { margin-bottom: 24px; }
  #projects + #workflow { margin-top: 8px; }
  .other-projects-details > summary { font-size: 14px !important; }
  .other-project-card > p { font-size: 17px; }
  #workflow .profile-cards { grid-template-columns: 1fr !important; }
  #workflow .profile-card { min-height: 310px !important; }
  #workflow .profile-card .card-icon,
  #workflow .profile-card .workflow-illustration { width: 150px !important; height: 104px !important; }
  .workflow-note { grid-template-columns: minmax(0, 1fr) !important; min-height: 160px !important; padding: 22px !important; }
  .workflow-note .formula-copy p { font-size: 22px !important; }
  #experience .trust-brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #experience .trust-brand-card[data-brand] {
    --brand-logo-max-width: 82%;
    --brand-logo-max-height: 44px;
    height: 94px;
    padding: 16px;
  }
  #experience .trust-brand-card[data-brand="trust-seven-circles"] {
    --brand-logo-max-width: 99%;
  }
  html[data-theme="light"] #experience .trust-brand-card {
    background: color-mix(in srgb, var(--v20-card-soft) 60%, transparent);
  }
  #experience .trust-logo-visual,
  #experience .trust-logo-visual .themed-logo-panel { height: 62px !important; }
  #experience .trust-reference-note { font-size: 14px !important; }
  .about-thoughts li { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .about-thoughts p { font-size: 18px; }
  .about-accent { font-size: 22px; }
  .finance-education-panel { grid-template-columns: 1fr !important; }
  .finance-details { grid-column: 1; }
  .finance-topic-grid { grid-template-columns: 1fr !important; }
  .finance-disclaimer { grid-column: 1; }
  #contact .contact-panel { padding: 24px 18px !important; }
  .contact-channels { grid-template-columns: 1fr !important; }
  .contact-channel { min-height: 144px; }
  .contact-cv-actions { display: grid; grid-template-columns: 1fr; }
  .contact-cv-actions .button { width: 100%; }
}

/* V22.4B: performance-safe ambient motion.
   The backdrop settles once after app start and the two existing cinematic
   frames brighten on their existing one-shot reveal state. No new layers,
   idle loops, blur animation or JavaScript observers are introduced. */
@keyframes v224-background-settle {
  from { translate: -.32% -.14%; }
  to { translate: 0 0; }
}

@media (min-width: 901px) and (update: fast) and (prefers-reduced-motion: no-preference) {
  html[data-app-ready="true"] .cosmic-image {
    animation: v224-background-settle .38s var(--ease) 1;
  }
  #projects .project-console.reveal .snake-border-projects,
  #contact .contact-panel.reveal .snake-border-contact {
    opacity: .16;
    transition: opacity .4s ease;
  }
  #projects .project-console.reveal.is-visible .snake-border-projects,
  #contact .contact-panel.reveal.is-visible .snake-border-contact {
    opacity: .52;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation: none !important; }
}

@media (max-width: 339px) {
  #experience .trust-brand-grid { grid-template-columns: minmax(0, 1fr); }
}

/* V22.4C: keep the medium-width header singular and theme changes immediate.
   Both 5 KB cosmic variants are preloaded in the document head, so the
   background can swap without displaying the previous theme while loading. */
.cosmic-image {
  transition: opacity .22s ease !important;
}

@media (min-width: 1281px) {
  .section-menu-toggle { display: none !important; }
}

@media (max-width: 1280px) {
  .main-nav { display: none !important; }
  .section-menu-toggle { display: none !important; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: grid !important; }
  body.menu-open .main-nav { display: none !important; }
}

@media (max-width: 405px) {
  .brand-copy { display: none !important; }
  .brand { flex: 0 0 auto; }
}

/*
 * Читаемость знаков во вкладках проектов.
 *
 * ЧТО БЫЛО НЕ ТАК. Полоса вкладок тёмно-зелёная всегда, независимо от темы
 * страницы. В светлой теме сайт кладёт туда знак, нарисованный ДЛЯ СВЕТЛОГО
 * ФОНА — тёмной краской. Тёмное по тёмному не видно. Владелец: «в белой теме
 * в темном блоке не видно нормально логотипы».
 *
 * ПОЧЕМУ НЕ ПОДМЕНОЙ ЗНАКА. Первым делом я заставил вкладки показывать тёмный
 * вариант. Это сломало действующее правило проекта: набор знаков АпартМенеджера
 * закреплён отдельной проверкой, и она требует, чтобы в светлой теме был виден
 * именно светлый вариант. Правило разумное, ломать его ради вкладок нельзя.
 *
 * КАК СДЕЛАНО. Знак остаётся тот, что положено по теме, а под ним появляется
 * светлая подложка — ровно так, как это уже сделано у Капитария, который на
 * скриншоте владельца единственный и читался. Знак остаётся собой, фон под ним
 * перестаёт съедать краску.
 */
html:not([data-theme="dark"]) .project-tab-logo .themed-logo-panel {
  background: #fffaf0 !important;
  border-radius: 10px;
}

/*
 * Карточка проекта должна вмещать своё содержимое.
 *
 * ЧТО ВЫЯСНИЛОСЬ ПРИ ДОБАВЛЕНИИ ОБЛОЖЕК. У карточки задана только минимальная
 * высота (560px), а панель с текстом при живом содержимом требует до 766px.
 * Лишнее просто вываливалось за край: кнопки «смотреть видео» и ссылка на сайт
 * оказывались за пределами карточки, и нажать их было нельзя — ни проверке, ни
 * живому посетителю. Раньше это не проявлялось, потому что без обложки блок
 * изображения был низким и панель успевала уместиться.
 *
 * ПОЧЕМУ ИМЕННО ТАК. Высоту не фиксируем, а разрешаем карточке вырасти под
 * содержимое: у разных проектов текст разной длины, и любое подобранное число
 * рано или поздно снова окажется мало. Пропорция изображения при этом не
 * трогается — за неё отвечает отдельное правило и отдельная проверка.
 */
#projects .project-view { height: auto !important; max-height: none !important; align-items: stretch; }
#projects .project-console { max-height: none !important; }
#projects .project-copy { min-height: 0; max-height: none !important; overflow: visible !important; }
