@font-face {
  font-family: "MatrixType";
  src: url("MatrixType-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "MatrixType";
  src: url("MatrixType-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "MatrixType Display";
  src: url("MatrixTypeDisplay-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "MatrixType Display";
  src: url("MatrixTypeDisplay-Bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IRANSharp";
  src: url("iransharp_light_web.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 300;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "IRANSharp";
  src: url("iransharp_regular_web.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400 600;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: "IRANSharp";
  src: url("iransharp_bold_web.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700 900;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --ink: #f1efe8;
  --ink-soft: #c2c5c0;
  --ink-faint: #858b88;
  --night: #121416;
  --surface: #1b1e20;
  --surface-raised: #222628;
  --line: rgba(241, 239, 232, 0.16);
  --line-strong: rgba(241, 239, 232, 0.34);
  --accent: #df5a43;
  --accent-soft: rgba(223, 90, 67, 0.15);
  --display: "Site Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Site Body", "Helvetica Neue", Arial, sans-serif;
  --mono: "MatrixType", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
  color: var(--ink);
  background: var(--night);
  font-family: var(--body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--night);
}

html {
  scroll-padding-block: 84px 24px;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

/* Press feedback stays inside each control's own bounds, so it cannot cause reflow. */
.wordmark:active,
.header-link:active,
.language-toggle:active,
.index-nav button:active,
.surface-rail-path:active,
.surface-rail-command:active,
.surface-rail-entry:active,
.surface-home-link:active,
.surface-help-link:active,
.surface-command-link:active,
.board-live:active,
.board-row[data-view]:active,
.surface-list button:active,
.detail-back:active,
.detail-related-link:active,
.contact-link:active,
.detail-link:active,
.detail-evidence-row[href]:active,
.site-footer-link:active {
  transform: translateY(1px);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  inset-inline-start: 16px;
  padding: 9px 12px;
  border: 1px solid var(--accent);
  color: var(--night);
  background: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-180%);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#mainStage:focus {
  outline: none;
}

a {
  color: inherit;
}

.studio-shell {
  position: relative;
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 620px;
  flex-direction: column;
  overflow: hidden;
  background: var(--night);
}

.site-header {
  z-index: 5;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 62px);
  border-bottom: 1px solid var(--line);
}

.wordmark,
.header-link,
.language-toggle,
.text-action,
.back-action,
.index-nav button {
  cursor: pointer;
}

.wordmark {
  display: grid;
  gap: 5px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.wordmark span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.wordmark small {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}

.header-link,
.language-toggle {
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-link:hover,
.header-link:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible {
  color: var(--ink);
}

.language-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  direction: ltr;
  min-width: max-content;
  white-space: nowrap;
  text-transform: none;
  unicode-bidi: isolate;
}

.language-toggle [data-language].is-active {
  color: var(--accent);
}

.language-flag {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  opacity: 0.5;
  filter: grayscale(1);
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

.language-flag img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}

.language-flag.is-active {
  opacity: 1;
  filter: none;
  transform: scale(1.04);
}

.language-slash {
  color: var(--ink-faint);
}

.index-panel {
  position: absolute;
  z-index: 4;
  top: 76px;
  right: clamp(20px, 4vw, 62px);
  width: min(330px, calc(100vw - 40px));
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 280ms var(--ease), transform 280ms var(--ease);
}

.index-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.panel-label,
.kicker,
.surface-meta,
.surface-topline,
.panel-note,
.identity-line,
.site-footer {
  font-family: var(--mono);
}

.panel-label,
.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.index-nav {
  display: grid;
  gap: 0;
  margin-top: 22px;
}

.index-nav button {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
}

.index-nav button:last-child {
  border-bottom: 0;
}

.index-nav button:hover,
.index-nav button:focus-visible,
.index-nav button.is-active {
  color: var(--ink);
}

.index-nav button.is-active span {
  color: var(--accent);
}

.index-nav button span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.index-nav button strong {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.panel-note {
  max-width: 250px;
  margin: 26px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.6;
}

.main-stage {
  min-height: 0;
  flex: 1;
}

.view {
  height: 100%;
}

.view-home {
  display: grid;
  grid-template-columns: minmax(410px, 0.92fr) minmax(0, 1.3fr);
  gap: clamp(32px, 5vw, 78px);
  padding: clamp(34px, 5vw, 74px) clamp(20px, 7vw, 122px) clamp(24px, 4vw, 56px);
}

.intro-column,
.surface-column {
  min-width: 0;
}

.intro-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.intro-copy {
  max-width: 630px;
  padding-top: clamp(10px, 3vw, 42px);
}

.intro-copy h1 {
  max-width: 620px;
  margin: 22px 0 24px;
  font-family: var(--display);
  font-size: clamp(50px, 5.25vw, 90px);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.93;
  text-wrap: balance;
}

.intro-copy h1 span {
  display: block;
  text-wrap: balance;
}

.intro-copy h1 span:last-child {
  color: var(--accent);
}

.intro-description {
  max-width: 380px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.text-action,
.back-action {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  margin-top: 32px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-action:hover,
.back-action:hover {
  color: var(--accent);
}

.action-mark {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 1px;
  background: currentColor;
}

.action-mark::after {
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.identity-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px;
  gap: 18px;
  align-items: center;
  max-width: 440px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.55;
}

.identity-rule {
  height: 1px;
  background: var(--line-strong);
}

.surface-column {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
}

.surface-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.studio-surface {
  position: relative;
  display: flex;
  min-height: min(610px, 68vh);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(18px, 2.2vw, 32px);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: background 480ms var(--ease), border-color 480ms var(--ease);
}

.studio-surface[data-mode="research"] {
  background: #1a2321;
}

.studio-surface[data-mode="education"] {
  background: #201e27;
}

.surface-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 20px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.surface-topline-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.surface-home-link {
  flex: 0 0 auto;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.surface-home-link:hover,
.surface-home-link:focus-visible {
  color: var(--ink);
}

.surface-status {
  min-width: 0;
  max-width: min(46vw, 260px);
  flex: 0 1 auto;
  padding-inline-start: 14px;
  border-inline-start: 1px solid var(--line);
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-status.is-long {
  flex: 0 1 auto;
  max-width: min(28vw, 180px);
}

.surface-status.is-short {
  flex: 0 0 auto;
  max-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

.surface-center {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.4vh, 25px);
  padding: clamp(10px, 2.2vh, 34px) 0;
  transition: opacity 280ms var(--ease), transform 380ms var(--ease);
}

.studio-surface.is-open .surface-center {
  display: none;
}

.departure-board {
  --board-projects: #dfb65f;
  --board-research: #79b6a6;
  --board-education: #89abc8;
  --board-skills: #ad9bd0;
  --board-archive: #9bb990;
  display: flex;
  width: min(100%, 640px);
  height: clamp(248px, calc(100vh - 458px), 336px);
  height: clamp(248px, calc(100dvh - 458px), 336px);
  min-height: 248px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2vw, 24px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #111517;
  box-shadow: inset 0 0 0 1px rgba(241, 239, 232, 0.03), inset 0 -18px 32px rgba(0, 0, 0, 0.14);
  color: var(--ink);
  font-family: var(--mono);
  text-align: left;
  text-transform: uppercase;
}

.departure-board:focus-visible,
.surface-content:focus-visible,
.surface-content h2:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.board-topline,
.board-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.13em;
  line-height: 1.4;
}

.board-topline {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.board-brand,
.board-count,
.board-source,
.board-live,
.board-bottom time {
  white-space: nowrap;
}

.board-count {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.board-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  min-width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-transform: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.board-live:hover,
.board-live:focus-visible {
  color: var(--ink);
}

.board-live.is-paused {
  color: var(--ink-soft);
}

.board-live.is-paused i {
  animation: none;
  opacity: 0.55;
}

.board-live i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(223, 90, 67, 0.11);
  animation: board-pulse 2.2s ease-in-out infinite;
}

.board-columns,
.board-row {
  display: grid;
  grid-template-columns: 22px minmax(72px, 0.78fr) minmax(108px, 1.35fr) auto;
  gap: 9px;
  align-items: center;
}

.board-columns {
  padding: 11px 0 7px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.09em;
  line-height: 1.3;
}

.board-rows {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.board-row {
  min-height: 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  margin: 0;
  padding: 0;
  border-inline: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.25;
  text-align: start;
  appearance: none;
}

.board-row[data-view] {
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.board-row[data-view]:hover,
.board-row[data-view]:focus-visible {
  background: color-mix(in srgb, var(--board-tone) 7%, transparent);
  color: var(--ink);
}

.board-row[data-view]:focus-visible {
  outline: 1px solid var(--board-tone);
  outline-offset: -1px;
}

.board-row[data-view].is-active {
  background: color-mix(in srgb, var(--board-tone) 9%, transparent);
  color: var(--ink);
}

.board-number {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.board-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.board-label-icon {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  color: var(--board-tone);
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.board-label-text {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.board-value {
  display: flex;
  min-height: 1.65em;
  align-items: center;
  gap: 1px;
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(241, 239, 232, 0.2);
  background: #080b0c;
  box-shadow: inset 0 1px 0 rgba(241, 239, 232, 0.05), inset 0 -5px 10px rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font-family: "MatrixType", var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .board-value {
  direction: rtl;
  gap: 0;
  justify-content: flex-start;
  font-family: "IRANSharp", var(--body);
  letter-spacing: 0;
}

.board-value::after {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(241, 239, 232, 0.08);
  content: "";
  pointer-events: none;
}

.flap-char {
  display: inline-flex;
  width: 0.64em;
  height: 1.15em;
  flex: 0 0 0.64em;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-left: 1px solid rgba(241, 239, 232, 0.08);
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

html[dir="rtl"] .flap-char {
  width: 0.92em;
  flex-basis: 0.92em;
  border-right: 1px solid rgba(241, 239, 232, 0.08);
  border-left: 0;
}

.flap-word {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir="rtl"] .flap-word {
  font-family: "IRANSharp", var(--body);
  font-size: 11px;
  text-align: right;
}

.flap-char.is-flipping {
  animation: board-character-flap 420ms var(--ease) both;
  animation-delay: var(--flap-delay, 0ms);
}

.board-state {
  min-width: 44px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-align: right;
}

.board-bottom {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.board-source {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
}

.board-source:hover,
.board-source:focus-visible {
  color: var(--ink);
}

.board-row-projects {
  --board-tone: var(--board-projects);
}

.board-row-research {
  --board-tone: var(--board-research);
}

.board-row-education {
  --board-tone: var(--board-education);
}

.board-row-skills {
  --board-tone: var(--board-skills);
}

.board-row-archive {
  --board-tone: var(--board-archive);
}

.board-row .board-number,
.board-row .board-state {
  color: var(--board-tone);
}

.board-row .board-label {
  color: var(--board-tone);
  opacity: 0.86;
}

.board-row .board-value {
  border-left: 2px solid var(--board-tone);
  box-shadow: inset 0 1px 0 rgba(241, 239, 232, 0.05), inset 0 -5px 10px rgba(0, 0, 0, 0.2), inset 7px 0 12px color-mix(in srgb, var(--board-tone) 8%, transparent);
}

@keyframes board-character-flap {
  0% {
    filter: brightness(1);
    transform: perspective(180px) rotateX(0deg);
  }
  45% {
    filter: brightness(1.35);
    transform: perspective(160px) rotateX(-82deg);
  }
  100% {
    filter: brightness(1);
    transform: perspective(180px) rotateX(0deg);
  }
}

@keyframes board-word-flap {
  0% {
    filter: brightness(1);
    transform: perspective(180px) rotateX(0deg);
  }
  45% {
    filter: brightness(1.35);
    transform: perspective(160px) rotateX(-82deg);
  }
  100% {
    filter: brightness(1);
    transform: perspective(180px) rotateX(0deg);
  }
}

.flap-word.is-flipping {
  animation: board-word-flap 420ms var(--ease) both;
}

@keyframes board-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.surface-content {
  min-height: 0;
  flex: 1;
  padding: clamp(18px, 4vh, 48px) 0 16px;
  animation: content-in 420ms var(--ease) both;
}

@keyframes content-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.surface-content h2 {
  max-width: 620px;
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 86px);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.92;
}

.surface-content > p,
.section-copy > p {
  max-width: 430px;
  margin: 0 0 clamp(18px, 2.5vh, 34px);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.section-terminal-kicker {
  display: flex;
  align-items: center;
  width: 14px;
  height: 14px;
  margin: 0 0 12px;
  color: var(--section-tone, var(--ink-faint));
}

.section-terminal-kicker .pixel-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: currentColor;
  image-rendering: pixelated;
}

.section-copy[data-section="build"] {
  --section-tone: #dfb65f;
}

.section-copy[data-section="research"] {
  --section-tone: #79b6a6;
}

.section-copy[data-section="education"] {
  --section-tone: #89abc8;
}

.project-filter {
  display: grid;
  max-width: 690px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 8px 18px;
  align-items: center;
  margin: 0 0 10px;
  padding: 7px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-filter-projects {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) minmax(138px, 190px);
}

.project-filter-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project-filter-label,
.project-filter-count {
  min-width: 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-filter-caret {
  margin-inline-end: 6px;
  color: var(--accent);
}

.project-filter-count {
  padding-inline-start: 8px;
  border-inline-start: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-filter input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: #080b0c;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.project-filter input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.project-filter input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.project-sort-control {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.project-sort-label {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.project-sort-control select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: #080b0c;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.project-sort-control select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.project-filter-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

html[dir="rtl"] .project-filter input {
  direction: rtl;
  text-align: right;
}

.surface-list {
  display: grid;
  gap: 0;
  max-width: 690px;
  border-top: 1px solid var(--line);
}

.surface-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: clamp(8px, 1.5vh, 15px) 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.surface-list button:hover,
.surface-list button:focus-visible {
  color: var(--accent);
}

.surface-list strong {
  font-family: var(--display);
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.surface-list small {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.project-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.project-live-mark i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.detail-copy {
  max-width: 640px;
}

.detail-navigation {
  display: flex;
  max-width: 700px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 clamp(18px, 3vh, 30px);
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.detail-navigation-position {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-navigation-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.detail-navigation-button {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink-soft);
  background: transparent;
  font: inherit;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  cursor: pointer;
}

.detail-navigation-button:hover,
.detail-navigation-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.detail-navigation-button:disabled {
  border-color: var(--line);
  color: var(--ink-faint);
  opacity: 0.45;
  cursor: not-allowed;
}

.detail-copy h2 {
  font-size: clamp(33px, 4vw, 62px);
}

.detail-copy p {
  max-width: 530px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.detail-artifact {
  max-width: 720px;
  padding-top: 18px;
  margin: 20px 0 24px;
  border-top: 1px solid var(--line);
}

.detail-artifacts {
  max-width: 720px;
}

.detail-artifacts .detail-artifact {
  max-width: none;
}

.detail-artifacts .detail-artifact + .detail-artifact {
  margin-top: 22px;
}

.detail-artifact-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.detail-artifact-topline span:first-child {
  flex: 0 0 auto;
  color: var(--accent);
}

.detail-artifact-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.detail-artifact-action .pixel-icon {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
}

.detail-artifact-frame {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #eeeade;
}

.detail-artifact-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.detail-artifact-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.detail-artifact-frame img {
  display: block;
  width: 100%;
  max-height: 310px;
  object-fit: contain;
  object-position: center;
}

.detail-artifact figcaption {
  margin-top: 9px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.6;
}

@media (hover: hover) and (pointer: fine) {
  .detail-artifact-open:hover .detail-artifact-frame img {
    filter: brightness(1.04);
  }

  .detail-artifact-open:hover + figcaption {
    color: var(--ink-soft);
  }
}

.detail-back {
  display: inline-flex;
  margin-bottom: 24px;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.plain-view {
  max-width: 820px;
  padding: clamp(70px, 10vw, 150px) clamp(20px, 8vw, 140px);
}

.plain-view h2 {
  max-width: 700px;
  margin: 26px 0 20px;
  font-family: var(--display);
  font-size: clamp(52px, 7vw, 110px);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.92;
}

.plain-description {
  max-width: 420px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.contact-link {
  display: flex;
  max-width: 440px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
}

.contact-link:hover {
  color: var(--accent);
}

.site-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 62px);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: var(--ink);
}

[dir="rtl"] .wordmark,
[dir="rtl"] .index-nav button,
[dir="rtl"] .surface-rail-entry,
[dir="rtl"] .surface-list button {
  text-align: right;
}

[dir="rtl"] {
  --display: "IRANSharp", "Site Display", "Helvetica Neue", Arial, sans-serif;
  --body: "IRANSharp", "Site Body", "Helvetica Neue", Arial, sans-serif;
  --mono: "IRANSharp", "MatrixType", "SFMono-Regular", Consolas, monospace;
}

[dir="rtl"] .action-mark::after {
  right: auto;
  left: 0;
  border-right: 0;
  border-left: 1px solid currentColor;
  transform: rotate(-45deg);
}

[dir="rtl"] .view-home {
  grid-template-columns: minmax(420px, 1.05fr) minmax(0, 1.15fr);
}

[dir="rtl"] .intro-copy h1 {
  max-width: 540px;
  font-size: clamp(40px, 3.8vw, 60px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;
  text-wrap: pretty;
}

[dir="rtl"] .kicker,
[dir="rtl"] .panel-label,
[dir="rtl"] .header-link,
[dir="rtl"] .language-toggle,
[dir="rtl"] .surface-home-link,
[dir="rtl"] .surface-meta,
[dir="rtl"] .surface-topline,
[dir="rtl"] .site-footer,
[dir="rtl"] .detail-back {
  letter-spacing: 0;
}

[dir="rtl"] .intro-description {
  font-size: 14px;
  line-height: 1.95;
}

[dir="rtl"] .identity-line,
[dir="rtl"] .surface-meta,
[dir="rtl"] .surface-topline {
  line-height: 1.7;
}

[dir="rtl"] .surface-content h2 {
  font-size: clamp(34px, 3.8vw, 58px);
  letter-spacing: 0;
  line-height: 1.18;
}

[dir="rtl"] .surface-content > p,
[dir="rtl"] .section-copy > p {
  font-size: 13px;
  line-height: 1.95;
}

[dir="rtl"] .surface-list button {
  gap: 16px;
  padding: clamp(8px, 1.3vh, 12px) 0;
  line-height: 1.6;
}

[dir="rtl"] .surface-list strong {
  font-size: clamp(16px, 1.55vw, 21px);
  letter-spacing: 0;
  line-height: 1.45;
}

[dir="rtl"] .surface-list small,
[dir="rtl"] .index-nav button strong,
[dir="rtl"] .panel-note {
  line-height: 1.8;
}

[dir="rtl"] .index-nav button strong {
  font-size: 24px;
  letter-spacing: 0;
}

[dir="rtl"] .detail-copy h2 {
  font-size: clamp(31px, 3.6vw, 54px);
  letter-spacing: 0;
  line-height: 1.2;
}

[dir="rtl"] .detail-copy p {
  font-size: 13px;
  line-height: 2;
}

[dir="rtl"] .plain-view h2 {
  font-size: clamp(42px, 4.8vw, 78px);
  letter-spacing: 0;
  line-height: 1.22;
}

[dir="rtl"] .plain-description {
  font-size: 14px;
  line-height: 2;
}

[dir="rtl"] .contact-link {
  line-height: 1.7;
}

@media (min-width: 961px) and (max-height: 820px) {
  .surface-content {
    padding-top: clamp(14px, 2.5vh, 28px);
    padding-bottom: 10px;
  }

  .surface-content h2 {
    margin-bottom: 12px;
    font-size: clamp(36px, 4.8vw, 64px);
  }

  .section-copy > p {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.45;
  }

  .surface-list button {
    gap: 12px;
    padding: 8px 0;
  }

  .surface-list strong {
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.1;
  }

  .surface-list-projects button {
    gap: 3px;
    padding: 6px 0;
  }

  .surface-list-projects strong {
    font-size: clamp(13px, 1.15vw, 17px);
    line-height: 1.16;
  }

  [dir="rtl"] .surface-content h2 {
    font-size: clamp(30px, 3.1vw, 46px);
    line-height: 1.16;
  }

  [dir="rtl"] .surface-content {
    padding-top: 14px;
  }

  [dir="rtl"] .detail-back {
    margin-bottom: 14px;
  }

  [dir="rtl"] .section-copy > p {
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 8px;
  }

  [dir="rtl"] .surface-list button {
    gap: 10px;
    padding: 4px 0;
    line-height: 1.45;
  }

  [dir="rtl"] .surface-list strong {
    font-size: clamp(14px, 1.15vw, 17px);
    line-height: 1.45;
  }

  .plain-view {
    padding: 34px clamp(20px, 7vw, 96px) 36px;
  }

  .plain-view h2 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 5.2vw, 78px);
  }

  .contact-link {
    padding: 12px 0;
  }
}

@media (min-width: 961px) {
  .studio-surface {
    height: min(610px, 68vh);
    max-height: 100%;
  }

  .surface-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
  }

  .surface-content::-webkit-scrollbar {
    width: 5px;
  }

  .surface-content::-webkit-scrollbar-track {
    background: transparent;
  }

  .surface-content::-webkit-scrollbar-thumb {
    border: 1px solid transparent;
    background: var(--line-strong);
    background-clip: padding-box;
  }

  .surface-list-projects {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(12px, 1.8vw, 24px);
  }

  .surface-list-projects button {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 7px 0;
  }

  .surface-list-projects strong {
    display: block;
    min-width: 0;
    width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: clamp(13px, 1.05vw, 16px);
    line-height: 1.12;
    text-overflow: clip;
    white-space: normal;
  }

  .surface-list-projects small {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .surface-list-projects small > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .surface-list-projects .project-live-mark {
    flex: 0 0 auto;
  }
}

@media (min-width: 1200px) {
  .surface-list-projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(12px, 1.4vw, 20px);
  }
}

@media (min-width: 1400px) {
  .surface-list-projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(16px, 2vw, 28px);
  }
}

@media (min-width: 961px) and (max-height: 820px) {
  .projects-copy .detail-back {
    margin-bottom: 8px;
  }

  .projects-copy h2 {
    margin-bottom: 8px;
    font-size: clamp(30px, 3.5vw, 48px);
    line-height: 0.98;
  }

  .projects-copy > p {
    max-width: 100%;
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.35;
  }

  .projects-copy .project-filter {
    gap: 6px 14px;
    margin-bottom: 8px;
    padding: 5px 0 6px;
  }

  .projects-copy .project-filter input {
    padding: 5px 7px;
  }

  .surface-list-projects button {
    gap: 2px;
    padding: 3px 0;
  }

  .surface-list-projects strong {
    font-size: clamp(12px, 0.9vw, 14px);
    line-height: 1.08;
  }

  .surface-list-projects small {
    font-size: 11px;
  }

  .skills-detail h2,
  .research-detail h2,
  .education-detail h2,
  .archive-detail h2 {
    margin-bottom: 8px;
    font-size: clamp(28px, 2.8vw, 40px);
    line-height: 1.08;
  }

  .skills-detail > p,
  .research-detail > p,
  .archive-detail > p {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.55;
  }

  .skills-detail .detail-related,
  .research-detail .detail-related,
  .archive-detail .detail-related {
    margin-top: 12px;
  }

  .skills-detail .detail-related-list,
  .research-detail .detail-related-list,
  .archive-detail .detail-related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(12px, 1.8vw, 22px);
  }

  .skills-detail .detail-related-link,
  .research-detail .detail-related-link,
  .archive-detail .detail-related-link {
    padding: 5px 0;
  }

  .skills-detail .detail-links,
  .research-detail .detail-links,
  .archive-detail .detail-links {
    margin-top: 12px;
  }

  .archive-detail .detail-evidence {
    margin-top: 12px;
  }

  .archive-detail .detail-evidence-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(12px, 1.8vw, 22px);
  }

  [dir="rtl"] .archive-detail .detail-evidence-list {
    grid-template-columns: minmax(0, 1fr);
  }

  [dir="rtl"] .archive-detail .detail-evidence-row {
    padding: 4px 0;
  }

  .archive-detail .detail-evidence-label {
    margin-bottom: 4px;
  }

  .archive-detail .detail-evidence-row {
    padding: 5px 0;
  }
}

@media (max-width: 960px) {
  html,
  body {
    min-height: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  html {
    scroll-padding-block: 78px 24px;
  }

  body {
    overflow-y: auto;
  }

  .studio-shell {
    height: auto;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .site-header {
    width: 100%;
    max-width: 100vw;
    min-height: 66px;
    padding: 15px 17px;
  }

  .header-actions {
    gap: 13px;
  }

  .header-link,
  .language-toggle {
    font-size: 11px;
  }

  /* Keep the terminal typography compact while giving touch controls a reliable hit area. */
  .site-header .wordmark,
  .site-header .header-link,
  .site-header .language-toggle {
    min-height: 44px;
  }

  .site-header .header-link,
  .site-header .language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header .header-link {
    min-width: 44px;
  }

  .site-header .language-toggle {
    padding-inline: 4px;
  }

  .index-panel {
    top: 66px;
    right: 17px;
  }

  .main-stage {
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100vw;
  }

  .view {
    height: auto;
    min-width: 0;
    width: 100%;
    max-width: 100vw;
  }

  .view-home {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100vw;
    padding: 32px 17px 56px;
  }

  .intro-copy {
    padding-top: 0;
  }

  .intro-copy h1 {
    margin-top: 15px;
    font-size: clamp(49px, 13vw, 76px);
  }

  .intro-description {
    max-width: 430px;
  }

  .identity-line {
    margin: 56px 0 34px;
  }

  .surface-meta {
    display: block;
    line-height: 1.7;
  }

  .surface-meta span {
    display: block;
  }

  .surface-meta span + span {
    margin-top: 3px;
  }

  .studio-surface {
    min-height: 610px;
    width: 100%;
  }

  .departure-board {
    width: min(100%, 460px);
    height: clamp(250px, 55vw, 300px);
    min-height: 250px;
  }

  .board-columns,
  .board-row {
    grid-template-columns: 19px minmax(64px, 0.76fr) minmax(84px, 1.18fr) auto;
    gap: 5px;
  }

  .board-columns {
    font-size: 11px;
  }

  .board-row {
    font-size: 11px;
  }

  /* Split-flap glyphs stay small on phones so the longest signal fits its slot row. */
  .board-value {
    padding: 4px 5px;
    font-size: 9px;
  }

  .board-state {
    min-width: 37px;
    font-size: 11px;
  }

  .board-bottom,
  .board-topline {
    font-size: 11px;
  }

  .board-live {
    min-width: 44px;
    min-height: 44px;
    justify-content: flex-end;
    padding-inline: 6px;
  }

  .board-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
  }

  .board-brand {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .board-count {
    grid-column: 1;
    grid-row: 2;
  }

  .board-live {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .surface-content {
    padding-top: 54px;
  }

  .site-footer {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 17px 20px;
    line-height: 1.6;
  }

  .plain-view {
    min-height: 600px;
    padding: 70px 17px 90px;
  }

  [dir="rtl"] .intro-copy h1 {
    font-size: clamp(42px, 12vw, 64px);
    line-height: 1.14;
  }

  [dir="rtl"] .intro-description {
    font-size: 14px;
    line-height: 2;
  }

  [dir="rtl"] .surface-content {
    padding-top: 48px;
  }

  [dir="rtl"] .surface-content h2 {
    font-size: clamp(30px, 9vw, 48px);
    line-height: 1.22;
  }

  [dir="rtl"] .section-copy > p {
    font-size: 13px;
    line-height: 2;
    margin-bottom: 22px;
  }

  [dir="rtl"] .surface-list button {
    padding: 12px 0;
    line-height: 1.7;
  }

  [dir="rtl"] .surface-list strong {
    font-size: 18px;
    line-height: 1.5;
  }

  [dir="rtl"] .detail-copy h2 {
    font-size: clamp(28px, 8vw, 42px);
    line-height: 1.3;
  }

  [dir="rtl"] .detail-copy p,
  [dir="rtl"] .plain-description {
    font-size: 13px;
    line-height: 2;
  }

  [dir="rtl"] .plain-view h2 {
    font-size: clamp(42px, 12vw, 64px);
    line-height: 1.2;
  }

  [dir="rtl"] .contact-link {
    line-height: 1.8;
  }
}

/* Keep the board's four data columns inside very narrow phone widths. */
@media (max-width: 380px) {
  .site-header {
    gap: 8px;
    padding-inline: 12px;
  }

  .wordmark {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  .wordmark span {
    min-width: 0;
    max-width: 100%;
  }

  .header-actions {
    gap: 7px;
    flex: 0 0 auto;
  }

  .header-link,
  .language-toggle {
    font-size: 11px;
    flex: 0 0 44px;
  }

  .header-link {
    font-size: 11px;
  }

  .language-toggle {
    gap: 4px;
    min-width: 44px;
    width: 44px;
    padding-inline: 0;
  }

  .site-header .language-toggle {
    gap: 2px;
    padding-inline: 0;
  }

  .site-header .language-flag {
    width: 14px;
    height: 14px;
  }

  .view-home {
    padding-inline: 12px;
  }

  .departure-board {
    padding-inline: 12px;
  }

  .board-columns,
  .board-row {
    grid-template-columns: 17px minmax(55px, 0.72fr) minmax(74px, 1fr) auto;
    gap: 4px;
  }

  .board-label {
    gap: 3px;
  }

  .board-label-icon {
    width: 9px;
    height: 9px;
    flex-basis: 9px;
  }

  .board-value {
    padding-inline: 4px;
  }
}

/* The studio surface is the terminal screen. The board is its content, not a second card. */
.studio-surface,
.studio-surface[data-mode="research"],
.studio-surface[data-mode="education"] {
  background: #111517;
  box-shadow: inset 0 0 0 1px rgba(241, 239, 232, 0.03), inset 0 -18px 32px rgba(0, 0, 0, 0.14);
}

.surface-rail {
  display: none;
}

@media (min-width: 1200px) {
  .studio-surface {
    --terminal-rail-width: clamp(176px, 24%, 216px);
    padding-left: calc(var(--terminal-rail-width) + clamp(18px, 2.2vw, 32px));
  }

  .surface-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--terminal-rail-width);
    flex-direction: column;
    gap: 12px;
    padding: clamp(18px, 2.2vw, 32px) clamp(14px, 1.4vw, 22px);
    border-right: 1px solid var(--line);
    background: rgba(8, 11, 12, 0.26);
    font-family: var(--mono);
  }

  .surface-rail-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }

  .surface-rail-path:hover,
  .surface-rail-path:focus-visible {
    color: var(--ink);
  }

  .surface-rail-path i {
    color: var(--ink-faint);
    font-style: normal;
  }

  .surface-rail-path span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .surface-rail-command {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: baseline;
    width: 100%;
    padding: 7px 0;
    border-right: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-align: start;
    text-transform: uppercase;
    cursor: pointer;
  }

  .surface-rail-command:hover,
  .surface-rail-command:focus-visible {
    color: var(--ink);
  }

  .surface-rail-command > span {
    color: var(--accent);
  }

  .surface-rail-command strong {
    overflow: hidden;
    color: var(--ink);
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .surface-rail-command small {
    color: var(--ink-faint);
    font-size: 11px;
    white-space: nowrap;
  }

  .surface-rail-label {
    display: flex;
    justify-content: space-between;
    margin: 0;
    color: var(--ink-faint);
    font-size: 11px;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .surface-rail-tree {
    display: grid;
    gap: 3px;
  }

  .surface-rail-entry {
    display: grid;
    position: relative;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    color: var(--ink-faint);
    background: transparent;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.04em;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 180ms ease, padding-left 180ms ease;
  }

  .surface-rail-entry:hover,
  .surface-rail-entry:focus-visible {
    color: var(--ink);
    padding-left: 3px;
  }

  .surface-rail-entry > div {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .surface-rail-entry span {
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
  }

  .surface-rail-entry strong {
    overflow: hidden;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .surface-rail-entry small {
    overflow: hidden;
    color: var(--ink-faint);
    font-size: 11px;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .surface-rail-entry.is-active {
    color: var(--ink);
  }

  .surface-rail-readout {
    display: grid;
    gap: 8px;
    margin-top: auto;
    color: var(--ink-faint);
    font-size: 11px;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .surface-rail-readout > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .surface-rail-readout strong {
    color: var(--accent);
    font-weight: 400;
  }
}

.surface-topline {
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.surface-topline-right {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  overflow: hidden;
}

/* Compact surfaces use two topline rows so navigation never competes with status text. */
@media (max-width: 1299px) {
  .surface-topline {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 5px;
  }

  .surface-topline-left,
  .surface-topline-right {
    width: 100%;
    flex-wrap: wrap;
    row-gap: 6px;
    overflow: visible;
  }

  .surface-topline-left,
  .surface-topline-right {
    justify-content: space-between;
  }
}

.surface-help-link,
.surface-command-link,
.surface-maximize-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.surface-help-link:hover,
.surface-help-link:focus-visible,
.surface-command-link:hover,
.surface-command-link:focus-visible,
.surface-command-link[aria-expanded="true"],
.surface-maximize-link:hover,
.surface-maximize-link:focus-visible,
.surface-maximize-link[aria-pressed="true"] {
  color: var(--ink);
}

.surface-help-mark {
  color: var(--accent);
}

.surface-command-key {
  color: var(--accent);
  direction: ltr;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.surface-maximize-icon {
  display: block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  color: currentColor;
  shape-rendering: crispEdges;
}

.surface-center {
  align-items: stretch;
  gap: clamp(8px, 1.6vh, 18px);
  padding: clamp(10px, 1.6vh, 20px) 0;
}

.departure-board {
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.surface-help {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0;
  padding: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
}

.surface-help-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.surface-help-topline {
  justify-content: flex-start;
  padding: 0;
  border: 0;
}

.surface-help-topline span:first-child::before {
  color: var(--accent);
  content: "> ";
}

.surface-help-topline span:last-child {
  color: var(--accent);
}

.surface-help-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.surface-help-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  padding: 1px 10px;
  border-right: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--mono);
  text-align: left;
}

.surface-help-line:last-child {
  border-right: 0;
  padding-right: 0;
}

.surface-help-line:first-child {
  padding-left: 0;
}

.surface-help-line:nth-child(4n) {
  padding-right: 0;
  border-right: 0;
}

.surface-help-line:nth-child(4n + 1) {
  padding-left: 0;
}

.surface-help-line > span {
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.surface-help-line strong {
  color: var(--ink);
  font-family: "MatrixType", var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.surface-help-line small {
  display: none;
}

.surface-command-line {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
}

.surface-command-line > label {
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.surface-command-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line-strong);
}

.surface-command-prompt {
  color: var(--accent);
  font-size: 11px;
}

.surface-command-shell input {
  min-width: 0;
  padding: 5px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: 400 10px/1.4 var(--mono);
  letter-spacing: 0.05em;
}

.surface-command-shell input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.surface-command-shell input:focus-visible {
  color: var(--ink);
}

.surface-command-run {
  padding: 4px 0 4px 8px;
  border: 0;
  border-inline-start: 1px solid var(--line);
  color: var(--accent);
  background: transparent;
  font: 400 8px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.surface-command-run:hover,
.surface-command-run:focus-visible {
  color: var(--ink);
}

.surface-command-line > p {
  min-height: 1.3em;
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.surface-center.is-help {
  gap: clamp(6px, 1.1vh, 10px);
}

.surface-center.is-help .departure-board {
  flex: 0 0 auto;
  min-height: 248px;
}

.surface-content {
  padding: clamp(20px, 3vh, 34px) 0 12px;
  font-family: var(--mono);
}

.surface-content h2,
.detail-copy h2 {
  max-width: 100%;
  color: var(--ink);
  font-family: "MatrixType Display", var(--mono);
  font-size: clamp(26px, 3.5vw, 54px);
  letter-spacing: 0.035em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.surface-content > p,
.section-copy > p,
.detail-copy p {
  max-width: 700px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.035em;
  line-height: 1.7;
}

.contact-copy h2 {
  max-width: 100%;
  margin-bottom: 10px;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.08;
}

.contact-copy .plain-description {
  max-width: 620px;
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
}

.contact-links {
  max-width: 510px;
}

.contact-profile-actions {
  max-width: 510px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.contact-profile-label {
  margin: 0;
  padding: 8px 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.contact-profile-note {
  max-width: 480px;
  margin: 0;
  padding: 0 0 10px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
}

.contact-profile-list {
  display: grid;
  border-bottom: 1px solid var(--line);
}

.contact-profile-button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
}

.contact-profile-button:hover,
.contact-profile-button:focus-visible {
  color: var(--accent);
}

.contact-profile-button-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.contact-profile-button-label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-profile-button small {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.contact-copy .contact-link {
  padding: 3px 0;
  font-size: 11px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pixel-icon {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: currentColor;
  shape-rendering: crispEdges;
}

.external-icon {
  display: block;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  color: currentColor;
  shape-rendering: crispEdges;
}

.contact-link-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.contact-link-label .pixel-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

[dir="rtl"] .contact-copy h2 {
  font-size: clamp(26px, 2.8vw, 42px);
  letter-spacing: 0;
  line-height: 1.22;
}

[dir="rtl"] .contact-copy .plain-description {
  font-size: 11px;
  line-height: 1.8;
}

.surface-list {
  border-top: 0;
}

.surface-list button {
  font-family: var(--mono);
}

.surface-list strong {
  font-family: "MatrixType", var(--mono);
  font-size: clamp(14px, 1.35vw, 20px);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.detail-back {
  letter-spacing: 0.08em;
}

.detail-links {
  display: grid;
  margin-top: 22px;
}

.detail-link + .detail-link {
  border-top: 0;
}

.detail-related {
  max-width: 640px;
  margin-top: 22px;
}

.detail-related-label {
  margin: 0 0 7px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.detail-related-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.detail-related-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: color 180ms ease, padding-left 180ms ease;
}

.detail-related-link strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.detail-related-link small {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
}

.detail-related-link:hover,
.detail-related-link:focus-visible {
  padding-inline-start: 4px;
  color: var(--accent);
}

.detail-evidence {
  max-width: 640px;
  margin-top: 22px;
}

.detail-evidence-label {
  margin: 0 0 7px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.detail-evidence-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.detail-evidence-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: baseline;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.detail-evidence-row strong {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.detail-evidence-row small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  text-align: right;
}

.detail-evidence-meta {
  display: inline-flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
}

.detail-evidence-source {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.detail-evidence-meta .external-icon {
  color: var(--ink-faint);
}

[dir="rtl"] .detail-evidence-meta {
  justify-content: flex-start;
}

.detail-evidence-row[href]:hover,
.detail-evidence-row[href]:focus-visible {
  color: var(--accent);
}

.detail-citation-actions {
  display: grid;
  gap: 0;
  max-width: 640px;
  margin-top: 22px;
}

.detail-link {
  display: inline-flex;
  min-width: min(100%, 440px);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.detail-share-button,
.detail-copy-button {
  width: 100%;
  cursor: pointer;
  background: transparent;
  text-align: start;
}

.detail-citation-actions .detail-link + .detail-link {
  border-top: 0;
}

.detail-link:hover,
.detail-link:focus-visible {
  border-color: var(--line-strong);
  color: var(--accent);
}

.detail-back::before {
  color: var(--accent);
  content: "$ ";
}

.studio-toast {
  position: fixed;
  z-index: 40;
  right: clamp(16px, 4vw, 62px);
  bottom: clamp(16px, 4vw, 42px);
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid var(--accent);
  color: var(--ink);
  background: #101416;
  box-shadow: 0 12px 30px rgb(0 0 0 / 28%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateY(8px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.studio-toast::before {
  margin-inline-end: 8px;
  color: var(--accent);
  content: ">";
}

.studio-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.print-profile {
  display: none;
}

.profile-preview-layer {
  --profile-preview-inset: clamp(12px, 3vw, 32px);
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--profile-preview-inset);
  background: rgba(8, 11, 12, 0.82);
}

.profile-preview-scrim {
  position: absolute;
  inset: 0;
}

.profile-preview-dialog {
  display: flex;
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100dvh - var(--profile-preview-inset) - var(--profile-preview-inset));
  flex-direction: column;
  border: 1px solid var(--line-strong);
  background: #101416;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.52);
}

.profile-preview-topline {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-preview-topline > span::before {
  color: var(--accent);
  content: "> ";
}

.profile-preview-close,
.profile-preview-share,
.profile-preview-download,
.profile-preview-print {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-preview-close span:first-child,
.profile-preview-share,
.profile-preview-download,
.profile-preview-print {
  color: var(--accent);
}

.profile-preview-close:hover,
.profile-preview-close:focus-visible,
.profile-preview-share:hover,
.profile-preview-share:focus-visible,
.profile-preview-download:hover,
.profile-preview-download:focus-visible,
.profile-preview-print:hover,
.profile-preview-print:focus-visible {
  color: var(--ink);
}

.profile-preview-hint {
  margin: 0;
  padding: 12px 18px 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile-preview-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding: 12px 18px 0;
}

.profile-preview-switch-label {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.profile-preview-switch-options {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-preview-switch-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.profile-preview-switch-button:hover,
.profile-preview-switch-button:focus-visible,
.profile-preview-switch-button.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-preview-content {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 22px;
  scrollbar-color: var(--line-strong) transparent;
}

.profile-preview-content .print-profile {
  display: block;
  color: var(--ink);
  font-family: var(--mono);
}

.profile-preview-content .print-profile-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.profile-preview-content .print-profile-label,
.profile-preview-content .print-profile-subtitle,
.profile-preview-content .print-profile-summary,
.profile-preview-content .print-profile-grid h2,
.profile-preview-content .print-profile-grid li span {
  font-family: var(--mono);
}

.profile-preview-content .print-profile-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-preview-content .print-profile h1 {
  margin: 0;
  color: var(--ink);
  font-family: "MatrixType Display", var(--mono);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.05;
  text-transform: uppercase;
}

.profile-preview-content .print-profile-subtitle {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile-preview-content .print-profile-summary {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.profile-preview-content .print-profile-contact {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.profile-preview-content .print-profile-contact-label,
.profile-preview-content .print-profile-grid h2 {
  color: var(--accent);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-preview-content .print-profile-contact-label {
  display: block;
  margin-bottom: 8px;
}

.profile-preview-content .print-profile-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
}

.profile-preview-content .print-profile-contact-links a {
  display: inline-flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
}

.profile-preview-content .print-profile-contact-links a:hover,
.profile-preview-content .print-profile-contact-links a:focus-visible,
.profile-preview-content .print-profile-item-link:hover,
.profile-preview-content .print-profile-item-link:focus-visible {
  color: var(--accent);
}

.profile-preview-content .print-profile-contact-links a span,
.profile-preview-content .print-profile-grid li span {
  color: var(--ink-faint);
}

.profile-preview-content .print-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  padding-top: 20px;
}

.profile-preview-content .print-profile-grid section {
  min-width: 0;
}

.profile-preview-content .print-profile-grid h2 {
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.profile-preview-content .print-profile-grid ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-preview-content .print-profile-grid li {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.profile-preview-content .print-profile-grid li strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.profile-preview-content .print-profile-grid li span {
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.4;
}

.profile-preview-content .print-profile-item-link {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.profile-preview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
  padding: 0 18px;
  padding-block: 4px;
  border-top: 1px solid var(--line);
}

.profile-preview-download .pixel-icon {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
}

.artifact-preview-layer {
  --artifact-preview-inset: clamp(12px, 3vw, 32px);
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--artifact-preview-inset);
  background: rgba(8, 11, 12, 0.88);
}

.artifact-preview-scrim {
  position: absolute;
  inset: 0;
}

.artifact-preview-dialog {
  display: flex;
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100dvh - var(--artifact-preview-inset) - var(--artifact-preview-inset));
  flex-direction: column;
  border: 1px solid var(--line-strong);
  background: #101416;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.56);
}

.artifact-preview-topline {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.artifact-preview-topline > span::before {
  color: var(--accent);
  content: "> ";
}

.artifact-preview-close {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.artifact-preview-close span:first-child {
  color: var(--accent);
}

.artifact-preview-close:hover,
.artifact-preview-close:focus-visible {
  color: var(--ink);
}

.artifact-preview-content {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: auto;
  padding: 18px;
  scrollbar-color: var(--line-strong) transparent;
}

.artifact-preview-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 170px);
  object-fit: contain;
  background: #eeeade;
}

.artifact-preview-content p {
  width: min(720px, 100%);
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

body.is-artifact-preview-open {
  overflow: hidden;
}

html[dir="rtl"] .profile-preview-content .print-profile {
  direction: rtl;
  font-family: "IRANSharp", Arial, sans-serif;
}

html[dir="rtl"] .profile-preview-content .print-profile-grid li,
html[dir="rtl"] .profile-preview-content .print-profile-summary,
html[dir="rtl"] .profile-preview-content .print-profile-contact-links a {
  font-family: "IRANSharp", Arial, sans-serif;
}

@media (max-width: 960px) {
  .surface-content h2,
  .detail-copy h2 {
    font-size: clamp(23px, 7vw, 38px);
    line-height: 1.25;
  }

  .surface-content > p,
  .section-copy > p,
  .detail-copy p {
    font-size: 11px;
    line-height: 1.9;
  }

  .surface-list strong {
    font-size: 15px;
    line-height: 1.35;
  }

  .project-filter {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 14px;
  }

  .project-filter-line,
  .project-filter input,
  .project-sort-control,
  .project-filter-empty {
    grid-column: 1;
  }

  .board-source,
  .site-footer-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .contact-copy .contact-link,
  .contact-profile-button,
  .detail-related-link,
  .detail-evidence-row,
  .detail-link {
    min-height: 44px;
    padding-block: 8px;
  }

  .profile-preview-layer {
    --profile-preview-inset: 8px;
    padding: var(--profile-preview-inset);
  }

  .artifact-preview-layer {
    --artifact-preview-inset: 8px;
    padding: var(--artifact-preview-inset);
  }

  .profile-preview-dialog {
    max-height: calc(100dvh - var(--profile-preview-inset) - var(--profile-preview-inset));
  }

  .profile-preview-topline,
  .profile-preview-switch,
  .profile-preview-content,
  .profile-preview-actions {
    padding-inline: 12px;
  }

  .profile-preview-content .print-profile-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .artifact-preview-topline,
  .artifact-preview-content {
    padding-inline: 12px;
  }

  .artifact-preview-content img {
    max-height: calc(100dvh - 142px);
  }

  .detail-evidence-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-evidence-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: start;
  }

  .detail-evidence-meta {
    justify-content: flex-start;
    gap: 6px;
  }

  .detail-evidence-row small {
    text-align: start;
  }

}

body.is-terminal-maximized {
  overflow: hidden;
}

html.is-terminal-maximized {
  overflow: hidden;
}

body.is-terminal-maximized::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(8, 11, 12, 0.78);
  content: "";
  pointer-events: auto;
}

.studio-surface.is-maximized {
  position: fixed;
  z-index: 31;
  inset: clamp(12px, 2vw, 28px);
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.48);
}

body.is-terminal-maximized .command-palette-layer {
  z-index: 60;
}

/* Project archive: keep the terminal index readable at compact desktop widths. */
.surface-list-projects {
  row-gap: 0;
}

.surface-list-projects .project-record {
  display: grid;
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0 10px;
  align-items: center;
  padding: 9px 8px 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: start;
  transition: background-color 180ms ease, color 180ms ease;
}

.surface-list-projects .project-record:hover,
.surface-list-projects .project-record:focus-visible {
  color: var(--accent);
  background: color-mix(in srgb, var(--section-tone, var(--accent)) 7%, transparent);
}

.surface-list-projects .project-record:focus-visible {
  outline: 1px solid var(--section-tone, var(--accent));
  outline-offset: -1px;
}

.project-record-index {
  align-self: start;
  padding-top: 2px;
  color: var(--section-tone, var(--ink-faint));
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.project-record-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.surface-list-projects .project-record strong {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: visible;
  color: currentColor;
  font-family: "MatrixType", var(--mono);
  font-size: clamp(12px, 0.9vw, 16px);
  letter-spacing: 0.055em;
  line-height: 1.18;
  overflow-wrap: anywhere;
  white-space: normal;
}

.surface-list-projects .project-record small {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  overflow: hidden;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.surface-list-projects .project-record small > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-list-projects .project-record-github-meta {
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  color: var(--ink-faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 961px) {
  .surface-list-projects {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}

@media (min-width: 1400px) {
  .surface-list-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(18px, 2.2vw, 34px);
  }
}

@media (max-width: 960px) {
  .surface-list-projects {
    grid-template-columns: minmax(0, 1fr);
  }

  .surface-list-projects .project-record {
    min-height: 54px;
    padding-block: 10px;
  }

  .surface-list-projects .project-record strong {
    font-size: 14px;
  }

  .surface-list-projects .project-record-github-meta {
    display: none;
  }
}

@media (min-width: 961px) and (max-height: 820px) {
  .surface-list-projects .project-record {
    padding-block: 7px;
  }

  .surface-list-projects .project-record-main {
    gap: 3px;
  }
}

@media (min-width: 961px) {
  .projects-copy h2 {
    font-size: clamp(24px, 2.6vw, 40px);
  }

  .section-copy:not(.projects-copy) h2 {
    margin-bottom: 10px;
    font-size: clamp(30px, 2.8vw, 44px);
    line-height: 1.05;
  }

  .section-copy:not(.projects-copy) > p {
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1.45;
  }

  .section-copy:not(.projects-copy) .surface-list button {
    gap: 10px;
    padding: 5px 0;
  }

  .section-copy:not(.projects-copy) .surface-list strong {
    font-size: clamp(13px, 1vw, 16px);
    line-height: 1.15;
  }

  .section-copy:not(.projects-copy) .surface-list small {
    font-size: 11px;
    line-height: 1.3;
  }

  .surface-list-projects button {
    gap: 2px;
    padding: 3px 0;
  }

  .surface-list-projects strong {
    font-family: var(--mono);
    font-size: clamp(11px, 0.75vw, 13px);
    letter-spacing: 0.06em;
    line-height: 1.15;
  }

  .surface-list-projects small {
    font-size: 11px;
    line-height: 1.2;
  }

    [dir="rtl"] .surface-list-projects button {
      gap: 2px;
      padding: 4px 0;
    }

    [dir="rtl"] .surface-list-projects strong {
      font-family: var(--mono);
      font-size: clamp(11px, 0.75vw, 13px);
      letter-spacing: 0;
      line-height: 1.25;
    }

    [dir="rtl"] .surface-list-projects small {
      font-size: 11px;
      line-height: 1.25;
    }
}

@media (min-width: 1300px) {
  [dir="rtl"] .projects-copy h2 {
    margin-bottom: 8px;
    font-size: clamp(28px, 2.2vw, 34px);
    line-height: 1.05;
  }

  [dir="rtl"] .projects-copy > p {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.45;
  }

  [dir="rtl"] .surface-list-projects button {
    gap: 1px;
    padding: 2px 0;
  }

  [dir="rtl"] .surface-list-projects strong {
    font-size: 11px;
    line-height: 1.1;
  }

  [dir="rtl"] .surface-list-projects small {
    font-size: 11px;
    line-height: 1.15;
  }
}

@media (max-width: 540px) {
  .site-header,
  .wordmark,
  .header-actions,
  .surface-column,
  .studio-surface,
  .surface-center,
  .departure-board {
    min-width: 0;
  }

  .wordmark small {
    display: none;
  }

  .wordmark {
    max-width: 46vw;
  }

  .wordmark span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    gap: 10px;
    flex: 0 1 auto;
  }

  .surface-command-shell {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .surface-command-run {
    grid-column: 1 / -1;
    padding: 6px 0 0;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    text-align: start;
  }

  .header-link:first-child {
    display: inline-flex;
    font-size: 11px;
  }

  .intro-copy h1 {
    max-width: 100%;
    font-size: clamp(39px, 11vw, 58px);
    overflow-wrap: anywhere;
  }

  .intro-description {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .board-live {
    min-width: 44px;
    min-height: 44px;
    justify-content: flex-end;
    padding-inline: 6px;
  }

  .surface-help-link,
  .surface-home-link,
  .surface-maximize-link,
  .detail-back {
    display: inline-flex;
    min-height: 44px;
    padding-inline: 4px;
    align-items: center;
  }

  .surface-help-link {
    min-width: 44px;
    justify-content: center;
  }

  .surface-maximize-link {
    min-width: 44px;
    justify-content: center;
  }

  .surface-help {
    gap: 2px;
    padding: 0;
  }

  .surface-help-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .surface-help-line {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px;
    padding: 5px 0;
    border-right: 0;
  }

  .surface-help-line:nth-child(odd) {
    padding-right: 8px;
    border-right: 1px solid var(--line);
  }

  .surface-help-line:nth-child(even) {
    padding-left: 8px;
  }

  .surface-help-line strong {
    font-size: 11px;
    line-height: 1.15;
  }

  .surface-center {
    padding: 28px 0;
  }

}

/* Keep two evidence columns at the compact desktop rail width, but let each row stack its metadata. */
@media (min-width: 1200px) and (max-width: 1299px) {
  .surface-content {
    padding-bottom: 4px;
  }

  .projects-copy .section-terminal-kicker {
    margin-bottom: 4px;
  }

  .projects-copy h2 {
    margin-bottom: 4px;
    font-size: clamp(30px, 2.5vw, 36px);
    line-height: 1.08;
  }

  .projects-copy > p {
    max-width: 100%;
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.55;
  }

  [dir="rtl"] .projects-copy h2 {
    font-size: clamp(28px, 2.5vw, 34px);
  }

  [dir="rtl"] .projects-copy > p {
    line-height: 1.55;
  }

  [dir="rtl"] .projects-copy .surface-list-projects button {
    padding-block: 1px;
  }

  [dir="rtl"] .archive-detail .detail-back {
    margin-bottom: 10px;
  }

  [dir="rtl"] .archive-detail > p {
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1.65;
  }

  .archive-detail .detail-evidence-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    align-items: start;
    padding: 4px 0;
  }

  .archive-detail .detail-evidence-meta {
    justify-content: flex-start;
    gap: 6px;
  }

  .archive-detail .detail-evidence-row small {
    text-align: start;
  }
}

@media (min-width: 961px) and (max-height: 820px) {
  .detail-copy.skills-detail h2,
  .detail-copy.research-detail h2,
  .detail-copy.education-detail h2,
  .detail-copy.archive-detail h2 {
    margin-bottom: 8px;
    font-size: clamp(28px, 2.8vw, 40px);
    line-height: 1.08;
  }
}

.command-palette-layer {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: clamp(78px, 13vh, 140px) 20px 24px;
}

.command-palette-layer[hidden] {
  display: none;
}

.command-palette-scrim {
  position: absolute;
  inset: 0;
  background: rgb(7 9 10 / 78%);
}

.command-palette {
  position: relative;
  display: flex;
  width: min(720px, 100%);
  max-height: min(660px, calc(100dvh - 102px));
  flex-direction: column;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: #101416;
  box-shadow: 0 22px 60px rgb(0 0 0 / 36%);
  font-family: var(--mono);
}

.command-palette-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.command-palette-label::before {
  color: var(--accent);
  content: "> ";
}

.command-palette-close {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.command-palette-close span:first-child {
  color: var(--accent);
}

.command-palette-close:hover,
.command-palette-close:focus-visible {
  color: var(--ink);
}

.command-palette h2 {
  max-width: 100%;
  margin: 0;
  padding: 20px 18px 14px;
  color: var(--ink);
  font-family: "MatrixType Display", var(--mono);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: uppercase;
}

.command-search-label {
  display: block;
  padding: 0 18px 6px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.command-search-frame {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  margin: 0 18px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: #080b0c;
}

.command-search-caret {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.command-search-frame input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.command-search-frame input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.command-search-frame input:focus-visible {
  box-shadow: none;
}

.command-search-frame kbd {
  flex: 0 0 auto;
  padding: 4px 6px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.command-palette-hint {
  margin: 9px 18px 12px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.command-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 18px 16px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.command-results::-webkit-scrollbar {
  width: 5px;
}

.command-results::-webkit-scrollbar-thumb {
  background: var(--line-strong);
}

.command-result {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 8px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.command-result:hover,
.command-result:focus-visible,
.command-result.is-selected {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.command-result:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.command-result-icon {
  color: var(--accent);
}

.command-result-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.command-result-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: currentColor;
  font-family: "MatrixType", var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.command-result-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
}

.command-result-kind {
  align-self: start;
  padding-top: 2px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.command-palette-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

html[dir="rtl"] .command-palette,
html[dir="rtl"] .command-search-frame,
html[dir="rtl"] .command-result {
  direction: rtl;
}

html[dir="rtl"] .command-palette-topline,
html[dir="rtl"] .command-search-label,
html[dir="rtl"] .command-palette-hint {
  letter-spacing: 0;
}

html[dir="rtl"] .command-palette-label::before {
  content: "";
}

html[dir="rtl"] .command-result {
  text-align: right;
}

html[dir="rtl"] .command-result-kind {
  text-align: left;
}

html[dir="rtl"] .command-search-frame input {
  text-align: right;
}

html[dir="rtl"] .command-search-frame kbd {
  direction: ltr;
}

body.is-command-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  /* Touch layouts have no keyboard: keep the word, drop the key hint. */
  .surface-command-key {
    display: none;
  }

  .surface-command-link {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .command-palette-layer {
    place-items: start center;
    padding: 76px 12px 12px;
  }

  .command-palette {
    max-height: calc(100dvh - 88px);
  }

  .command-palette-topline,
  .command-palette h2,
  .command-search-label {
    padding-inline: 14px;
  }

  .command-palette-hint {
    margin-inline: 14px;
  }

  .command-search-frame {
    margin-inline: 14px;
  }

  .command-results {
    padding-inline: 14px;
  }

  .command-result {
    min-height: 56px;
  }
}

/* Mobile pages scroll around the terminal; keep its board content paintable during viewport movement. */
@media (max-width: 960px) {
  .studio-surface {
    min-height: 0;
    overflow: visible;
  }

  .surface-center {
    flex: 0 0 auto;
  }

  .departure-board {
    flex: 0 0 auto;
    overflow: visible;
  }

  .board-rows {
    flex: 0 0 auto;
    grid-template-rows: repeat(5, minmax(44px, auto));
  }

  .board-row {
    min-height: 44px;
  }
}

/* Detail systems: case-study facts, repository metadata, and research chronology. */
.project-case-study {
  max-width: 700px;
  margin: 2px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-case-study-topline,
.detail-github-header,
.research-timeline-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.project-case-study-topline span,
.detail-github-header span,
.research-timeline-topline span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-case-study-topline span:last-child,
.detail-github-source,
.research-timeline-topline span:last-child {
  color: var(--section-tone, var(--ink-faint));
  text-align: end;
}

.project-case-study-brief {
  padding: 13px 0 15px;
  border-top: 1px solid var(--line);
}

.project-case-study-label {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.project-case-study-brief p {
  max-width: 650px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
}

.project-case-study-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.project-case-study-facts > div {
  min-width: 0;
  padding: 9px 12px 10px 0;
  border-inline-end: 1px solid var(--line);
}

.project-case-study-facts > div:last-child {
  padding-inline-start: 12px;
  padding-inline-end: 0;
  border-inline-end: 0;
}

.project-case-study-facts dt {
  margin: 0 0 5px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.project-case-study-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: "MatrixType", var(--mono);
  font-size: 11px;
  line-height: 1.45;
  text-transform: uppercase;
}

.detail-github-signal {
  display: block;
  max-width: 700px;
  margin: 20px 0 0;
  padding: 0 0 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.detail-github-header {
  padding-block: 8px;
}

.detail-github-label {
  color: var(--ink-soft);
}

.detail-github-source {
  flex: 0 0 auto;
}

.detail-github-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.detail-github-stat {
  min-width: 0;
  padding: 9px 10px 2px 0;
  border-inline-end: 1px solid var(--line);
}

.detail-github-stat:last-child {
  padding-inline-start: 10px;
  padding-inline-end: 0;
  border-inline-end: 0;
}

.detail-github-stat small {
  display: block;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
}

.detail-github-stat strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--accent);
  font-family: "MatrixType", var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: uppercase;
}

.detail-github-topics {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: baseline;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.detail-github-topics small,
.detail-github-topics span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  text-transform: uppercase;
}

.detail-github-topics small {
  color: var(--ink-faint);
}

.detail-github-topics span {
  color: var(--ink-soft);
  text-align: right;
}

.detail-github-pending {
  grid-column: 1 / -1;
  padding-top: 9px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
}

.research-timeline {
  max-width: 700px;
  margin-top: 18px;
}

.research-timeline-topline {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-timeline-list {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.research-timeline-list::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 105px;
  width: 1px;
  background: var(--line);
  content: "";
  pointer-events: none;
}

.research-timeline-entry {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.research-timeline-entry:last-child {
  border-bottom: 0;
}

.research-timeline-entry:hover,
.research-timeline-entry:focus-visible {
  color: var(--accent);
  background: color-mix(in srgb, var(--section-tone, var(--accent)) 7%, transparent);
}

.research-timeline-entry:focus-visible {
  outline: 1px solid var(--section-tone, var(--accent));
  outline-offset: -1px;
}

.research-timeline-period {
  color: var(--section-tone, var(--ink-faint));
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.research-timeline-body {
  position: relative;
  min-width: 0;
  padding-inline-start: 16px;
}

.research-timeline-body::before {
  position: absolute;
  inset-block-start: 5px;
  inset-inline-start: -3px;
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  background: var(--bg);
  content: "";
}

.research-timeline-body strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: currentColor;
  font-family: "MatrixType", var(--mono);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.research-timeline-body small {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 960px) {
  .project-case-study {
    margin-top: 0;
  }

  .project-case-study-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-case-study-facts > div,
  .project-case-study-facts > div:last-child {
    padding: 9px 0 10px;
    border-inline-end: 0;
  }

  .project-case-study-facts > div + div {
    border-top: 1px solid var(--line);
  }

  .detail-github-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-github-stat:nth-child(2n) {
    padding-inline-start: 10px;
    padding-inline-end: 0;
    border-inline-end: 0;
  }

  .detail-github-stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .detail-github-stat:last-child {
    padding-inline-start: 0;
    padding-inline-end: 10px;
    border-inline-end: 1px solid var(--line);
  }

  .detail-github-topics {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .detail-github-topics span {
    text-align: start;
  }

  .research-timeline-entry {
    min-height: 58px;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
    padding-block: 13px;
  }

  .detail-navigation {
    align-items: flex-start;
  }

  .research-timeline-list::before {
    inset-inline-start: 94px;
  }

  .research-timeline-body strong {
    font-size: 13px;
    line-height: 1.35;
  }
}

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

@media print {
  @page {
    margin: 16mm;
  }

  html,
  body {
    min-height: auto;
    overflow: visible !important;
    color: #16191a !important;
    background: #fff !important;
  }

  .studio-shell,
  .command-palette-layer,
  .studio-toast,
  .profile-preview-layer,
  .artifact-preview-layer {
    display: none !important;
  }

  .print-profile {
    display: block;
    color: #16191a;
    font-family: "MatrixType", "Courier New", monospace;
  }

  .print-profile-header {
    padding-bottom: 18px;
    border-bottom: 2px solid #16191a;
  }

  .print-profile-label,
  .print-profile-subtitle,
  .print-profile-summary,
  .print-profile-grid h2,
  .print-profile-grid li span {
    font-family: "MatrixType", "Courier New", monospace;
  }

  .print-profile-label {
    margin: 0 0 18px;
    color: #b2382d;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .print-profile h1 {
    margin: 0;
    font-family: "MatrixType Display", "Courier New", monospace;
    font-size: 38px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .print-profile-subtitle {
    margin: 8px 0 0;
    color: #555;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .print-profile-summary {
    max-width: 620px;
    margin: 18px 0 0;
    color: #333;
    font-size: 12px;
    line-height: 1.6;
  }

  .print-profile-contact {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid #999;
  }

  .print-profile-contact-label {
    display: block;
    margin-bottom: 8px;
    color: #b2382d;
    font-family: "MatrixType", "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .print-profile-contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
  }

  .print-profile-contact-links a {
    display: inline-flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 5px;
    color: #333;
    font-family: "MatrixType", "Courier New", monospace;
    font-size: 11px;
    line-height: 1.35;
    text-decoration: none;
  }

  .print-profile-contact-links a:hover,
  .print-profile-contact-links a:focus-visible {
    color: #b2382d;
  }

  .print-profile-contact-links a span {
    overflow-wrap: anywhere;
    color: #666;
  }

  .print-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 32px;
    padding-top: 24px;
  }

  .print-profile-grid section {
    break-inside: avoid;
  }

  .print-profile-grid h2 {
    margin: 0 0 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid #999;
    color: #b2382d;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .print-profile-grid ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .print-profile-grid li {
    display: grid;
    gap: 3px;
    padding-bottom: 7px;
    border-bottom: 1px solid #ddd;
  }

  .print-profile-grid li strong {
    overflow-wrap: anywhere;
    font-family: "MatrixType", "Courier New", monospace;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
  }

  .print-profile-item-link {
    color: inherit;
    text-decoration-color: #999;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }

  .print-profile-item-link:hover,
  .print-profile-item-link:focus-visible {
    color: #b2382d;
  }

  .print-profile-grid li span {
    overflow-wrap: anywhere;
    color: #666;
    font-size: 11px;
    line-height: 1.35;
  }

  html[dir="rtl"] .print-profile {
    direction: rtl;
    font-family: "IRANSharp", Arial, sans-serif;
  }

  html[dir="rtl"] .print-profile-grid li,
  html[dir="rtl"] .print-profile-summary,
  html[dir="rtl"] .print-profile-contact-links a {
    font-family: "IRANSharp", Arial, sans-serif;
  }
}

/* Touch surfaces do not receive hover styling; keyboard focus remains visible. */
@media (hover: none), (pointer: coarse) {
  .header-link:hover:not(:focus-visible),
  .language-toggle:hover:not(:focus-visible) {
    color: var(--ink-soft);
  }

  .index-nav button:hover:not(:focus-visible) {
    color: var(--ink-soft);
  }

  .text-action:hover:not(:focus-visible),
  .back-action:hover:not(:focus-visible) {
    color: var(--ink);
  }

  .surface-home-link:hover:not(:focus-visible) {
    color: var(--accent);
  }

  .board-row[data-view]:hover:not(:focus-visible) {
    background: transparent;
    color: var(--ink-soft);
  }

  .board-source:hover:not(:focus-visible) {
    color: inherit;
  }

  .surface-list button:hover:not(:focus-visible) {
    color: var(--ink);
  }

  .contact-link:hover:not(:focus-visible) {
    color: var(--ink);
  }

  .contact-profile-button:hover:not(:focus-visible) {
    color: var(--ink-soft);
  }

  .site-footer-link:hover:not(:focus-visible) {
    color: inherit;
  }

  .surface-rail-entry:hover:not(:focus-visible) {
    padding-left: 0;
    color: var(--ink-faint);
  }

  .surface-help-link:hover:not(:focus-visible) {
    color: var(--ink-faint);
  }

  .surface-command-link:hover:not(:focus-visible) {
    color: var(--ink-faint);
  }

  .surface-maximize-link:hover:not(:focus-visible) {
    color: var(--ink-faint);
  }

  .board-live {
    min-width: 44px;
    min-height: 44px;
    justify-content: flex-end;
    padding-inline: 6px;
  }

  .board-live:hover:not(:focus-visible) {
    color: var(--accent);
  }

  .detail-related-link:hover:not(:focus-visible) {
    padding-inline-start: 0;
    color: var(--ink);
  }

  .detail-evidence-row[href]:hover:not(:focus-visible) {
    color: var(--ink);
  }

  .detail-link:hover:not(:focus-visible) {
    border-color: var(--line);
    color: var(--ink);
  }
}

/* An open route owns the stage: the hero belongs to the home board only. */
.view-home:has(.studio-surface.is-open) {
  grid-template-columns: minmax(0, 1fr);
}

.view-home:has(.studio-surface.is-open) .intro-column {
  display: none;
}

.view-home:has(.studio-surface.is-open) .surface-column {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}

@media (min-width: 961px) {
  .view-home:has(.studio-surface.is-open) {
    padding-block: clamp(20px, 3vw, 40px);
  }

  .view-home:has(.studio-surface.is-open) .studio-surface {
    flex: 1;
  }
}

/* Long copy reads in the body face; MatrixType stays for labels and headings. */
.studio-surface .surface-content > p,
.studio-surface .section-copy > p,
.studio-surface .detail-copy p,
.studio-surface .contact-copy .plain-description {
  font-family: var(--body);
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.6;
}

[dir="rtl"] .studio-surface .section-copy > p,
[dir="rtl"] .studio-surface .detail-copy p,
[dir="rtl"] .studio-surface .contact-copy .plain-description {
  line-height: 1.9;
}

/* Static fallbacks: the no-JavaScript summary and the 404 page. */
.noscript-summary,
.not-found {
  max-width: 720px;
  padding: 24px clamp(20px, 7vw, 122px);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
}

.noscript-summary {
  grid-column: 1 / -1;
}

.not-found h1 {
  margin: 18px 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.noscript-summary a,
.not-found a {
  color: var(--accent);
}
