@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --ink: #171c1d;
  --paper: #efede6;
  --paper-soft: #e7e4db;
  --night: #111411;
  --muted: #69706c;
  --line: rgba(23, 28, 29, .18);
  --blue: #315fff;
  color-scheme: dark;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
html { background: var(--night); }
body {
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; }
a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 50;
  top: 8px;
  left: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.mobile-app {
  width: min(100%, 540px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) auto;
  background: var(--paper);
  border-inline: 1px solid rgba(255, 255, 255, .08);
  isolation: isolate;
}

.mobile-header {
  position: relative;
  z-index: 4;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--night);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.mobile-identity {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
}
.mobile-identity strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.mobile-identity span { margin-top: 2px; color: rgba(255, 255, 255, .65); font-size: 12px; }
.mobile-clock {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: rgba(255, 255, 255, .58);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mobile-clock time {
  color: white;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.mobile-content {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
  outline: none;
  touch-action: pan-y;
}
.mobile-content::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 3px;
  height: 54px;
  background: var(--blue);
  pointer-events: none;
}

.mobile-panel {
  position: absolute;
  inset: 0;
  padding: 22px 20px 40px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: var(--paper);
}
.mobile-panel::-webkit-scrollbar { display: none; }
.mobile-panel[hidden] { display: none; }
.mobile-panel.is-entering { animation: panel-in 240ms cubic-bezier(.22, 1, .36, 1) both; }

@keyframes panel-in {
  from { opacity: 0; transform: translate3d(var(--panel-shift, 14px), 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.panel-heading {
  min-height: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.panel-heading p { margin: 0; }
.panel-heading p span { margin-right: 9px; color: var(--blue); font-variant-numeric: tabular-nums; }
.panel-heading > span { max-width: 45%; text-align: right; }

.mobile-panel h2 {
  max-width: 450px;
  margin: 24px 0 14px;
  font-size: clamp(31px, 9.4vw, 48px);
  font-weight: 550;
  line-height: .98;
  letter-spacing: -.048em;
  text-wrap: balance;
}
.panel-lead {
  max-width: 460px;
  margin: 0;
  color: #4e5552;
  font-size: 15px;
  line-height: 1.55;
}

.metric-row {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.metric-row div { min-width: 0; padding: 12px 10px 13px 0; }
.metric-row div + div { padding-left: 10px; border-left: 1px solid var(--line); }
.metric-row dt { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.metric-row dd { margin: 6px 0 0; font-size: 13px; font-weight: 620; overflow-wrap: anywhere; }

.record-list,
.project-list,
.expertise-list,
.service-list,
.timeline { margin-top: 30px; border-top: 1px solid var(--ink); }

.record-list article,
.project-list article {
  padding: 17px 0;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.record-list article > span,
.project-list article > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.record-list h3,
.project-list h3,
.expertise-list h3,
.service-list h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.record-list p,
.project-list article > div > p:last-child,
.expertise-list article > p:last-child,
.service-list article > p:last-child {
  margin: 8px 0 0;
  color: #59605d;
  font-size: 13px;
  line-height: 1.5;
}
.project-list article > div > p:first-child,
.expertise-list article > p:first-child {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.timeline article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline article > div { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.timeline article.is-current > div span { color: var(--blue); }
.timeline h3 { margin: 16px 0 3px; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.timeline article > p { margin: 0; color: #555c59; font-size: 13px; }
.timeline details { margin-top: 14px; }
.timeline summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
  list-style: none;
}
.timeline summary::-webkit-details-marker { display: none; }
.timeline summary i { color: var(--blue); font-size: 16px; font-style: normal; font-weight: 400; }
.timeline details[open] summary i { transform: rotate(45deg); }
.timeline details > p { margin: 0 0 2px; color: #555c59; font-size: 13px; line-height: 1.5; }

.expertise-list,
.service-list { display: grid; grid-template-columns: 1fr; }
.expertise-list article,
.service-list article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.service-list article > span {
  display: block;
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mobile-contact { display: flex; flex-direction: column; }
.mobile-contact[hidden] { display: none; }
.contact-link {
  position: relative;
  margin-top: 36px;
  padding: 18px 48px 18px 0;
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}
.contact-link span { color: var(--muted); font-size: 10px; font-weight: 620; letter-spacing: .08em; text-transform: uppercase; }
.contact-link strong { font-size: clamp(18px, 5vw, 25px); font-weight: 580; letter-spacing: -.025em; overflow-wrap: anywhere; }
.contact-link i { position: absolute; top: 50%; right: 2px; color: var(--blue); font-size: 22px; font-style: normal; transform: translateY(-50%); }
.contact-facts { margin: auto 0 0; padding-top: 36px; }
.contact-facts div { padding: 13px 0; display: grid; grid-template-columns: 104px 1fr; border-top: 1px solid var(--line); }
.contact-facts dt { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.contact-facts dd { margin: 0; font-size: 13px; font-weight: 600; }

.mobile-index {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--night);
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.mobile-index button {
  position: relative;
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px 8px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .13);
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  background: transparent;
  color: rgba(255, 255, 255, .68);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.mobile-index button:nth-child(3n) { border-right: 0; }
.mobile-index button:nth-child(n + 4) { border-bottom: 0; }
.mobile-index button span { color: rgba(255, 255, 255, .38); font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.mobile-index button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.mobile-index button[aria-selected="true"]::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--blue);
}
.mobile-index button[aria-selected="true"] span { color: var(--blue); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

@media (max-height: 690px) {
  .mobile-app { grid-template-rows: 62px minmax(0, 1fr) auto; }
  .mobile-panel { padding-top: 18px; }
  .mobile-panel h2 { margin-top: 16px; font-size: clamp(28px, 8.5vw, 40px); }
  .panel-lead { font-size: 14px; }
  .mobile-index button { min-height: 47px; }
}

@media (min-width: 541px) {
  body { background: #080a08; }
  .mobile-app { box-shadow: 0 0 80px rgba(0, 0, 0, .5); }
}

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