/* Ashanty Kim I. Garcia — Portfolio
   Palette: warm paper, charcoal ink, muted rose, bronze.
   Identity: a quiet ledger — precise, feminine, professional. */

:root {
  --bg: #f6f1ea;
  --bg-elevated: #fbf8f4;
  --paper: #efe8de;
  --ink: #2a231e;
  --ink-soft: #5c524a;
  --muted: #8a7f74;
  --line: rgba(42, 35, 30, 0.12);
  --line-strong: rgba(42, 35, 30, 0.22);
  --rose: #7a3e46;
  --rose-soft: #b7898e;
  --burgundy: #6e3a42;
  --bronze: #a67c5d;
  --white: #fffcf8;
  --shadow: 0 18px 50px rgba(42, 35, 30, 0.08);
  --shadow-hover: 0 12px 28px color-mix(in srgb, var(--rose) 22%, transparent);
  --header-h: 4.5rem;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1c1815;
  --bg-elevated: #241f1b;
  --paper: #2b251f;
  --ink: #f3ebe3;
  --ink-soft: #c9bdb2;
  --muted: #9a8e84;
  --line: rgba(243, 235, 227, 0.12);
  --line-strong: rgba(243, 235, 227, 0.22);
  --rose: #d4a0a6;
  --rose-soft: #c98990;
  --burgundy: #e0b4b8;
  --bronze: #c4a07a;
  --white: #211c18;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(122, 62, 70, 0.05), transparent 18rem),
    var(--bg);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    rgba(42, 35, 30, 0.028) 31px,
    rgba(42, 35, 30, 0.028) 32px
  );
  opacity: 0.55;
  z-index: 0;
}

[data-theme="dark"] body::before {
  background-image: repeating-linear-gradient(
    transparent,
    transparent 31px,
    rgba(243, 235, 227, 0.035) 31px,
    rgba(243, 235, 227, 0.035) 32px
  );
}

.page-rule {
  display: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--rose);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--burgundy);
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p,
ul,
ol {
  margin: 0;
}

button {
  font-family: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
}

.header-blur {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  pointer-events: none;
  z-index: 0;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex: 1 1 auto;
  transition: color 0.25s var(--ease);
}

.brand:hover,
.brand:focus-visible {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--rose);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  border-color: var(--rose);
  background: color-mix(in srgb, var(--rose) 8%, transparent);
  transform: rotate(-8deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name,
.brand-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 500;
}

.brand-role {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  margin-left: auto;
}

.nav-scrim {
  display: none;
}

.nav-list {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  padding: 0;
}

.nav-list a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 0.18rem;
  transition: color 0.25s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--rose);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
}

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--rose);
  color: var(--rose);
  background: color-mix(in srgb, var(--rose) 9%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--rose) 16%, transparent);
}

.icon-btn:active {
  transform: scale(0.96);
  box-shadow: none;
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.3s var(--ease);
}

.icon-btn:hover svg,
.icon-btn:focus-visible svg {
  transform: scale(1.08);
}

[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun {
  display: none;
}

.menu-toggle {
  display: none;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform 0.25s var(--ease);
}

.menu-lines::before,
.menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-lines::before {
  top: -5px;
}

.menu-lines::after {
  top: 5px;
}

body.nav-open .menu-lines {
  background: transparent;
}

body.nav-open .menu-lines::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .menu-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

main {
  position: relative;
  z-index: 1;
}

.hero,
.section,
.site-footer {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

.hero {
  padding-top: clamp(2rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.72fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

.hero-copy,
.hero-aside {
  min-width: 0;
}

.eyebrow,
.section-index,
.stat-label,
.ledger-title,
.contact-label,
.tool-group,
.practice-level,
.edu-years,
.timeline-dates,
.timeline-place,
.footer-note {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 6.4rem);
  font-weight: 500;
  margin: 0.35rem 0 0.4rem;
  overflow-wrap: break-word;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--rose);
}

.hero-tagline {
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 1.4rem;
}

.hero-intro {
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.35s var(--ease),
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 252, 248, 0.28) 45%,
    transparent 70%
  );
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(130%);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: none;
}

.btn-primary {
  background: var(--rose);
  color: #fff8f5;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--rose) 28%, transparent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--burgundy);
  color: #fff8f5;
  box-shadow: var(--shadow-hover);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--rose);
  color: var(--rose);
  background: color-mix(in srgb, var(--rose) 8%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--rose) 14%, transparent);
}

.btn-ghost::after {
  background: linear-gradient(
    115deg,
    transparent 20%,
    color-mix(in srgb, var(--rose) 18%, transparent) 45%,
    transparent 70%
  );
}

.hero-aside {
  display: grid;
  gap: 1.25rem;
}

.portrait {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem 1.1rem 0.9rem;
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
}

.portrait-caption {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-list {
  list-style: none;
  padding: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  border-top: 1px solid var(--line);
}

.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--rose);
}

.stat-label {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.section {
  padding-top: clamp(3rem, 7vw, 5rem);
}

.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: end;
  margin-bottom: 2.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.section-index {
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  color: var(--rose-soft);
  line-height: 1;
}

.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  font-weight: 500;
  margin-top: 0.2rem;
  overflow-wrap: break-word;
}

.about-grid,
.analytics-layout,
.contact-grid {
  display: grid;
  gap: 2rem;
}

.about-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.prose {
  display: grid;
  gap: 1rem;
  color: var(--ink-soft);
  max-width: 42rem;
}

.ledger-panel,
.expertise-card,
.highlight-card,
.tool-card,
.cert-card,
.edu-item,
.timeline-body {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition:
    transform 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.ledger-panel {
  padding: 1.4rem 1.5rem 1.2rem;
}

.ledger-title {
  margin-bottom: 0.9rem;
}

.ledger-list {
  list-style: none;
  padding: 0;
}

.ledger-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.7rem;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.98rem;
}

.ledger-list li span {
  color: var(--rose-soft);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.highlight-card {
  padding: 1.4rem 1.35rem 1.3rem;
  min-height: 0;
}

.highlight-card.is-featured {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--rose) 12%, var(--bg-elevated)), var(--bg-elevated));
}

.highlight-card h3 {
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.highlight-card p,
.timeline-points,
.practice-note,
.cert-copy p,
.edu-credential {
  color: var(--ink-soft);
}

.highlight-card,
.expertise-card,
.timeline-body,
.edu-item,
.cert-card,
.tool-card {
  overflow-wrap: break-word;
}

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(9.5rem + 1rem);
  top: 2.15rem;
  bottom: 1.5rem;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  column-gap: 2rem;
  align-items: start;
  position: relative;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: calc(9.5rem + 1rem);
  top: 2.15rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-meta {
  padding-top: 1.15rem;
}

.timeline-year {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--rose);
}

.timeline-dates {
  margin-top: 0.35rem;
}

.timeline-body {
  padding: 1.4rem 1.5rem 1.3rem;
}

.timeline-body h3 {
  font-size: 1.55rem;
}

.timeline-company {
  margin: 0.35rem 0 1rem;
  color: var(--ink);
}

.timeline-company strong {
  font-weight: 500;
}

.timeline-place::before {
  content: " · ";
  color: var(--muted);
}

.timeline-points {
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 1rem 0 0;
}

.tag-list li {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
  border: 1px solid color-mix(in srgb, var(--rose) 28%, transparent);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.expertise-card {
  padding: 1.25rem 1.2rem 1.1rem;
}

.expertise-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.tools-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.tool-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.05rem;
}

.tool-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  color: var(--rose);
  flex: none;
}

.tool-name {
  font-weight: 500;
}

.analytics-intro {
  max-width: 40rem;
  color: var(--ink-soft);
}

.practice-map {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.practice-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.practice-name {
  font-family: var(--serif);
  font-size: 1.35rem;
}

.practice-bar {
  height: 4px;
  background: var(--paper);
  overflow: hidden;
}

.practice-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--bronze));
}

.practice-note {
  margin-top: 0.45rem;
  font-size: 0.95rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
}

.edu-list,
.cert-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.edu-item,
.cert-card {
  padding: 1.2rem 1.25rem;
}

.edu-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.edu-item h3,
.cert-copy h3,
.cert-title-link {
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}

.edu-notes {
  list-style: none;
  padding: 0.7rem 0 0;
  color: var(--rose);
  font-size: 0.92rem;
}

.cert-frame {
  min-height: 7.5rem;
  border: 1px dashed color-mix(in srgb, var(--rose) 35%, var(--line));
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}

.cert-placeholder {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.8rem;
  text-align: center;
}

.contact-section {
  padding-bottom: 5rem;
}

.contact-lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.35;
  max-width: 28ch;
}

.contact-cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-cards li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.contact-cards a,
.contact-cards p:last-child {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  word-break: break-word;
}

.contact-cards a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color 0.3s var(--ease), background-size 0.35s var(--ease);
}

.contact-cards a:hover,
.contact-cards a:focus-visible {
  color: var(--rose);
  background-size: 100% 1px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  position: relative;
  z-index: 1;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--rose);
}

.noscript {
  padding: 1rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .highlight-card.is-visible:hover,
  .expertise-card.is-visible:hover,
  .tool-card.is-visible:hover,
  .cert-card.is-visible:hover,
  .edu-item.is-visible:hover,
  .timeline-body:hover,
  .ledger-panel:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--rose) 32%, var(--line));
    box-shadow: 0 16px 36px color-mix(in srgb, var(--rose) 12%, transparent);
  }

  .tag-list li:hover {
    background: color-mix(in srgb, var(--rose) 10%, transparent);
    border-color: var(--rose);
  }
}

@media (min-width: 1200px) {
  .page-rule {
    display: block;
    position: fixed;
    top: 0;
    left: 2.4rem;
    width: 1px;
    height: 100%;
    background: var(--rose);
    opacity: 0.22;
    z-index: 2;
    pointer-events: none;
  }
}

@media (max-width: 1199px) {
  .nav-list {
    gap: 1rem;
  }

  .nav-list a {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
  }

  .expertise-grid,
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .nav-scrim {
    display: block;
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    margin: 0;
    border: 0;
    padding: 0;
    background: color-mix(in srgb, var(--ink) 32%, transparent);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
  }

  body.nav-open .nav-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: auto;
    right: 0;
    bottom: 0;
    z-index: 40;
    margin: 0;
    width: min(19rem, 78vw);
    height: auto;
    background: var(--bg-elevated);
    padding: 1.35rem 1.35rem calc(2rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s var(--ease), visibility 0.35s var(--ease);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 40px color-mix(in srgb, var(--ink) 10%, transparent);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-actions {
    margin-left: auto;
  }

  body.nav-open .nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.35rem;
  }

  .nav-list a {
    font-family: var(--serif);
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
    display: block;
    padding: 0.5rem 0;
  }

  .menu-toggle {
    display: grid;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    column-gap: 0;
    gap: 0.45rem;
  }

  .timeline::before,
  .timeline-item::after {
    display: none;
  }

  .timeline-meta {
    padding-top: 0;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    max-width: 26rem;
  }

  .highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-lead {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .highlight-grid,
  .expertise-grid,
  .tools-grid,
  .contact-cards {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    max-width: none;
  }

  .portrait {
    max-width: 22rem;
  }

  .stat-value {
    font-size: 1.7rem;
  }

  .stat-label,
  .eyebrow,
  .ledger-title,
  .contact-label,
  .tool-group,
  .practice-level,
  .edu-years,
  .timeline-dates {
    letter-spacing: 0.1em;
  }

  .timeline-place {
    display: block;
    margin-top: 0.15rem;
  }

  .timeline-place::before {
    content: none;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    margin-top: 1.5rem;
  }

  .section-head {
    margin-bottom: 1.6rem;
  }

  .contact-section {
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }

  .stat-list {
    gap: 0.5rem;
  }

  .ledger-panel,
  .timeline-body,
  .highlight-card,
  .expertise-card,
  .tool-card,
  .edu-item,
  .cert-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
  }

  .hero-aside {
    max-width: 16rem;
  }

  .nav-list a {
    font-size: 1.35rem;
    padding: 0.3rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
  }

  .reveal,
  .reveal.is-visible,
  .btn,
  .btn:hover,
  .btn:active,
  .icon-btn,
  .brand-mark,
  .highlight-card,
  .expertise-card,
  .tool-card,
  .cert-card,
  .edu-item,
  .timeline-body,
  .ledger-panel {
    transform: none !important;
  }

  .reveal {
    opacity: 1;
  }

  .btn::after,
  .nav-list a::after {
    display: none;
  }
}
