:root,
[data-theme="dark"] {
  --sidebar-bg: #0a0a0a;
  --bg: #121110;
  --bg-soft: #1b1a17;
  --card: #171614;
  --card-border: #2a2926;
  --border-soft: #221f1c;
  --text: #f5f5f4;
  --text-mid: #b6b3ae;
  --text-faint: #7c7a75;
  --sidebar-text: #f5f5f4;
  --sidebar-text-mid: #a8a6a2;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(255, 255, 255, 0.10);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --accent: #d99a4e;

  /* Updated Theme Switcher Colors */
  --sw-border: rgba(255, 255, 255, 0.25);
  --sw-icon: #b6b3ae;
  --sw-idle-bg: rgba(255, 255, 255, 0.05);
  --sw-hover: rgba(255, 255, 255, 0.12);
  --sw-active-bg: #ffffff;
  --sw-active-icon: #121110;
}

[data-theme="light"] {
  --sidebar-bg: #f0ece4;
  --bg: #fafaf8;
  --bg-soft: #f0ece4;
  --card: #ffffff;
  --card-border: #e2ddd3;
  --border-soft: #e8e3da;
  --text: #1a1713;
  --text-mid: #56514a;
  --text-faint: #8a8479;
  --sidebar-text: #1a1713;
  --sidebar-text-mid: #5f5a52;
  --sidebar-hover: rgba(0, 0, 0, 0.05);
  --sidebar-active: rgba(0, 0, 0, 0.08);
  --sidebar-border: rgba(0, 0, 0, 0.08);
  --accent: #a85a1c;

  /* Updated Theme Switcher Colors */
  --sw-border: rgba(0, 0, 0, 0.25);
  --sw-icon: #56514a;
  --sw-idle-bg: rgba(0, 0, 0, 0.04);
  --sw-hover: rgba(0, 0, 0, 0.10);
  --sw-active-bg: #1a1713;
  --sw-active-icon: #fafaf8;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { display: block; max-width: 100%; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
  transition: background-color 0.25s ease;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 22px 16px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sidebar-text);
  padding: 8px 12px 14px;
  transition: color 0.25s ease;
}
/* Theme Switcher Base Styles */
.sw-row {
  display: flex;
  gap: 8px;
  padding: 4px 12px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-wrap: nowrap;
}

.sw-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #a8a6a2; /* Clearly visible icon on dark sidebar */
  background: rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
  flex: 0 0 auto;
  min-width: 34px;
}

.sw-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.sw-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.sw-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
}

/* Light Theme Sidebar Overrides */
[data-theme="light"] .sw-btn {
  border-color: rgba(0, 0, 0, 0.2);
  color: #5f5a52;
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sw-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1713;
  border-color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .sw-btn.active {
  background: #1a1713;
  border-color: #1a1713;
  color: #fafaf8;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--sidebar-text-mid);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.side-nav a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.side-nav a.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text);
}

.side-nav svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.85;
}

.side-nav a.active svg {
  opacity: 1;
}

.side-bottom {
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
}

.side-bottom a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--sidebar-text-mid);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.side-bottom a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}

.side-bottom svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 0.75;
}

.main {
  padding: 56px 48px 96px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.content {
  max-width: 620px;
}

.photo {
  width: 240px;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 40px;
  border: 1px solid var(--card-border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.greeting {
  font-size: 54px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 36px;
  transition: color 0.25s ease;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 12px;
  background: var(--card);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.stat-row span:last-child {
  font-size: 20px;
  line-height: 1;
}

.prose {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-top: 36px;
  margin-bottom: 22px;
  transition: color 0.25s ease;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose em {
  color: var(--text);
}

.prose a {
  color: var(--text);
  border-bottom: 1px solid var(--card-border);
  transition: border-color 0.15s, color 0.15s;
}

.prose a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  margin: 64px 0 24px;
  transition: color 0.25s ease;
}

.quote-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-mid);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.quote-card .meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.quote-card p {
  padding: 4px 0;
}

.quote-card p strong {
  color: var(--text);
  font-weight: 600;
}

.work-list {
  display: flex;
  flex-direction: column;
}

.work-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: border-color 0.25s ease;
}

.work-row:first-child {
  border-top: 1px solid var(--border-soft);
}

.work-row .role {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.work-row .where {
  font-size: 15px;
  color: var(--text-mid);
}

.work-row .when {
  font-size: 14px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.note-list {
  display: flex;
  flex-direction: column;
}

.note-row {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: padding-left 0.2s, border-color 0.25s ease;
}

.note-row:first-child {
  border-top: 1px solid var(--border-soft);
}

.note-row:hover {
  padding-left: 6px;
}

.note-row .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.note-row .meta {
  font-size: 14px;
  color: var(--text-faint);
}

.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-faint);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.footer a {
  color: var(--text-mid);
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.15s, border-color 0.15s;
}

.footer a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mobile-header,
.mobile-drawer,
.mobile-overlay {
  display: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.1s; }
.d3 { animation-delay: 0.16s; }
.d4 { animation-delay: 0.22s; }
.d5 { animation-delay: 0.28s; }
.d6 { animation-delay: 0.34s; }

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .layout {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    position: sticky;
    top: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 50;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  }

  .mobile-brand {
    font-size: 15px;
    font-weight: 600;
  }

  .hamburger {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--sidebar-border);
    color: inherit;
    padding: 0;
    background: transparent;
  }

  .hamburger svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
  }

  .mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82vw;
    max-width: 300px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right: 1px solid var(--sidebar-border);
    padding: 22px 16px 24px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, color 0.25s ease;
  }

  .mobile-drawer.open {
    transform: translateX(0);
  }

  .drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px 14px;
  }

  .drawer-title {
    font-size: 15px;
    font-weight: 600;
  }

  .drawer-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--sidebar-border);
    color: inherit;
    padding: 0;
    background: transparent;
  }

  .drawer-close svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-drawer .sw-row {
    padding: 0 12px 18px;
  }

  .drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .drawer-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 14px;
    color: var(--sidebar-text-mid);
  }

  .drawer-nav a.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text);
  }

  .drawer-nav svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    opacity: 0.85;
  }

  .drawer-bottom {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .drawer-bottom a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--sidebar-text-mid);
  }

  .drawer-bottom svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.75;
  }

  .main {
    padding: 32px 20px 64px;
  }

  .photo {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    margin-bottom: 28px;
  }

  .greeting {
    font-size: 36px;
    margin-bottom: 28px;
  }

  .stat-row {
    padding: 15px 18px;
    font-size: 15px;
    border-radius: 12px;
  }

  h2 {
    font-size: 22px;
    margin-top: 48px;
  }

  .work-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.cmd-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-dialog {
  width: 100%;
  max-width: 540px;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.15s ease;
}

.cmd-overlay.open .cmd-dialog {
  transform: translateY(0);
}

.cmd-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-search-icon {
  width: 18px;
  height: 18px;
  stroke: #888;
  stroke-width: 2;
  fill: none;
  margin-right: 12px;
}

#cmdInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f4f4f5;
  font-size: 15px;
  font-family: inherit;
}

.cmd-esc {
  font-size: 11px;
  color: #71717a;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
  padding: 8px 10px 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px;
  color: #a1a1aa;
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}

.cmd-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  margin-right: 12px;
}

.cmd-item span { flex: 1; }

.cmd-item kbd {
  font-size: 11px;
  color: #71717a;
}

.cmd-item:hover, .cmd-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: #f4f4f5;
}
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.cmd-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-dialog {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 0.15s ease;
}

.cmd-overlay.open .cmd-dialog { transform: translateY(0); }

.cmd-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.cmd-search-icon {
  width: 18px;
  height: 18px;
  stroke: var(--text-faint);
  stroke-width: 2;
  fill: none;
  margin-right: 12px;
  flex-shrink: 0;
}

#cmdInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

#cmdInput::placeholder { color: var(--text-faint); }

.cmd-esc {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-soft);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--card-border);
  font-family: inherit;
}

.cmd-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
}

.cmd-body::-webkit-scrollbar { width: 8px; }
.cmd-body::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 4px;
}

.cmd-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 10px 12px 6px;
}

.cmd-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  color: var(--text-mid);
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.cmd-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  margin-right: 12px;
  flex-shrink: 0;
  opacity: 0.75;
}

.cmd-item > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cmd-item small {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-item kbd {
  font-size: 11px;
  color: var(--text-faint);
  font-family: inherit;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.cmd-item:hover,
.cmd-item.active {
  background: var(--bg-soft);
  color: var(--text);
}

.cmd-item.active svg { opacity: 1; }

.cmd-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.shortcuts-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.shortcuts-dialog {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  margin: auto 0;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.shortcuts-dialog::-webkit-scrollbar {
  width: 8px;
}

.shortcuts-dialog::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 4px;
}
.shortcuts-dialog h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--text-mid);
}

.shortcut-row:last-child { border-bottom: none; }

.shortcut-row kbd {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--text);
  font-family: inherit;
  letter-spacing: 0.04em;
}

.shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stat-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.stat-card-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.5;
}

.stat-card-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-card-value .stat-arrow {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0;
}

.stat-card-value .stat-to {
  color: var(--accent);
}

.stat-card-note {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.55;
}

.stat-card-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
  margin-top: 4px;
}

.stat-card-bar span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-card.in-view .stat-card-bar span {
  width: calc(var(--to) * 1%);
}

@media (max-width: 640px) {
  .stat-compare {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stat-card {
    padding: 22px 20px 20px;
  }
  .stat-card-value {
    font-size: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-card-bar span { transition: none; }
}
.contact-shell {
  margin: 32px 0;
  position: relative;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s ease, background-color 0.25s ease;
  resize: vertical;
  min-height: 48px;
}

.field textarea {
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-soft);
}

.field input.invalid,
.field textarea.invalid {
  border-color: #d15a5a;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.contact-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.contact-submit svg {
  transition: transform 0.2s ease;
}

.contact-submit:hover:not(:disabled) svg {
  transform: translateX(2px);
}

.contact-error {
  font-size: 14px;
  color: #d15a5a;
  min-height: 20px;
}

.contact-success {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px 28px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.contact-shell.sent .contact-form {
  display: none;
}

.contact-shell.sent .contact-success {
  display: flex;
}

.contact-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
}

.contact-success h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.contact-success p {
  font-size: 15px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.6;
}

.contact-reset {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-reset:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-checking {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.contact-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: contactSpin 0.7s linear infinite;
}

@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

.contact-closed {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px 28px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.contact-closed-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  color: var(--text-mid);
}

.contact-closed h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.contact-closed p {
  font-size: 15px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.6;
}

.contact-closed .contact-submit {
  margin-top: 6px;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .contact-spinner { animation-duration: 0.01ms; }
}
.contact-shell {
  margin: 32px 0;
  position: relative;
}

.contact-checking {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.contact-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: contactSpin 0.7s linear infinite;
}

@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

.contact-form {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.contact-closed {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px 28px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.contact-success {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px 28px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.contact-shell[data-state="loading"] .contact-checking { display: flex; }
.contact-shell[data-state="form"]    .contact-form     { display: flex; }
.contact-shell[data-state="closed"]  .contact-closed   { display: flex; }
.contact-shell[data-state="sent"]    .contact-success  { display: flex; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s ease, background-color 0.25s ease;
  resize: vertical;
  min-height: 48px;
}

.field textarea {
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-soft);
}

.field input.invalid,
.field textarea.invalid {
  border-color: #d15a5a;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.contact-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.contact-submit svg {
  transition: transform 0.2s ease;
}

.contact-submit:hover:not(:disabled) svg {
  transform: translateX(2px);
}

.contact-error {
  font-size: 14px;
  color: #d15a5a;
  min-height: 20px;
}

.contact-closed-icon,
.contact-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  color: var(--text-mid);
}

.contact-success-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--bg);
}

.contact-closed h3,
.contact-success h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.contact-closed p,
.contact-success p {
  font-size: 15px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.6;
}

.contact-closed .contact-submit {
  margin-top: 6px;
}

.contact-reset {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-reset:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .contact-spinner { animation-duration: 0.01ms; }
}