@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;1,300&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f4f0;
  --text: #1a1a25;
  --muted: #525256;
  --border: #e0ddd8;
  --accent: #7d3410;
}

[data-theme="dark"] {
  --bg: #1c1c1c;
  --text: #f5f4f0;
  --muted: #c8c2ba;
  --border: #333;
  --accent: #f0904e;
}
/* ── ANIMATIONS ── */
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@keyframes cursor-rest {
  to { opacity: 0; }
}

/* ── BASE ── */
body {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  padding: 80px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}

/* ── MAIN CONTENT ── */
main {
  width: 100%;
  max-width: 720px;
  animation: fadein 0.5s ease 0.1s both;
}

/* ── NAME ── */
h1 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

/* the cursor blinks a few times, then does its job and leaves */
h1::after {
  content: "_";
  margin-left: 1px;
  animation:
    blink 1.1s step-end 3,                 /* blink 3 times — change the 3 to taste */
    cursor-rest 1.8s ease 3.3s forwards;   /* then fade out and stay gone */
  /* note: the 3.3s delay = 1.1s × blink count. update it if you change the 3 */
}

/* ── ROLE ── */
.role {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 48px;
  font-style: italic;
}

/* ── BIO ── */
.bio {
  margin-bottom: 48px;
}

.bio p {
  margin-bottom: 16px;
}

.bio p:last-child {
  margin-bottom: 0;
}

/* ── COMPONENT CAPTION ── */
.component-caption {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── COMPONENT ROW ── */
.component-row {
  display: flex;
  gap: 48px;
  align-items: stretch;
  margin-bottom: 48px;
}

/* ── BUTTON DEMO ── */
.button-demo {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.pill {
  -webkit-appearance: none;
  appearance: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  display: block;
  width: fit-content;
  margin: 0 0 10px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease,
    outline-color 0.15s ease;
}

.pill[data-state="default"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  outline: 2px solid transparent;
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.pill[data-state="hover"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  outline: 2px solid transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(200, 90, 30, 0.3);
  opacity: 1;
}

.pill[data-state="clicked"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  outline: 2px solid transparent;
  transform: scale(0.96);
  box-shadow: none;
  opacity: 1;
}

.pill[data-state="focused"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.pill[data-state="ghost"] {
  background: transparent;
  color: var(--text);
  border-color: transparent;
  outline: 2px solid transparent;
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.pill[data-state="disabled"] {
  background: var(--border);
  color: var(--muted);
  border-color: var(--border);
  outline: 2px solid transparent;
  transform: none;
  box-shadow: none;
  opacity: 0.65;
  cursor: not-allowed;
}

.state-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-align: center;
  margin-top: auto;
}

/* ── TOGGLE DEMO ── */
.toggle-demo {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  margin-bottom: 10px;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  margin-bottom: 3px;
  border: 1px solid var(--text);
  background: transparent;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  flex-shrink: 0;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.toggle-input:checked + .toggle-track {
  background: var(--text);
  border-color: var(--text);
}

.toggle-input:checked + .toggle-track .toggle-knob {
  transform: translateX(20px);
  background: var(--bg);
}

.toggle-input:focus-visible + .toggle-track {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.toggle-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--text);
}
/* ── CHECKBOX DEMO ── */
.checkbox-demo {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.checkbox-wrap {
  /* a real, keyboard-operable button styled to look like the old div */
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.1s ease;
}

.checkbox-box {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--text);
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease,
    outline-color 0.15s ease;
}

.checkbox-check {
  width: 10px;
  height: 8px;
  opacity: 0;
  color: var(--bg);
  transition: opacity 0.1s ease;
}

.checkbox-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--text);
}

.checkbox-wrap[data-state="default"] .checkbox-box {
  background: transparent;
  border-color: var(--text);
  box-shadow: none;
  opacity: 1;
  outline: 2px solid transparent;
}
.checkbox-wrap[data-state="default"] .checkbox-check { opacity: 0; }

.checkbox-wrap[data-state="hover"] {
  transform: translateY(-2px);
}
.checkbox-wrap[data-state="hover"] .checkbox-box {
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(200, 90, 30, 0.3);
  background: transparent;
  opacity: 1;
  outline: 2px solid transparent;
}
.checkbox-wrap[data-state="hover"] .checkbox-check { opacity: 0; }

.checkbox-wrap[data-state="clicked"] {
  transform: scale(0.96);
}
.checkbox-wrap[data-state="clicked"] .checkbox-box {
  background: var(--text);
  border-color: var(--text);
  box-shadow: none;
  opacity: 1;
  outline: 2px solid transparent;
}
.checkbox-wrap[data-state="clicked"] .checkbox-check { opacity: 1; }

.checkbox-wrap[data-state="focused"] .checkbox-box {
  background: transparent;
  border-color: var(--text);
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
  box-shadow: none;
  opacity: 1;
}
.checkbox-wrap[data-state="focused"] .checkbox-check { opacity: 0; }

.checkbox-wrap[data-state="ghost"] .checkbox-box {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  opacity: 1;
  outline: 2px solid transparent;
}
.checkbox-wrap[data-state="ghost"] .checkbox-check { opacity: 0; }

.checkbox-wrap[data-state="disabled"] {
  cursor: not-allowed;
}
.checkbox-wrap[data-state="disabled"] .checkbox-box {
  background: var(--border);
  border-color: var(--border);
  box-shadow: none;
  opacity: 0.65;
  outline: 2px solid transparent;
}
.checkbox-wrap[data-state="disabled"] .checkbox-check {
  opacity: 1;
  color: var(--muted);
}

/* ── SECTION CONTENT ── */
.section {
  margin-bottom: 52px;
}

.section-num {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 14px;
}

.section p:last-child {
  margin-bottom: 0;
}

.section p strong {
  color: var(--text);
  font-weight: 400;
}

.belief {
  margin-bottom: 22px;
}

.belief:last-child {
  margin-bottom: 0;
}

.belief-title {
  color: var(--text) !important;
  margin-bottom: 8px !important;
}

/* ── PULL QUOTE ── */
.pull {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  margin: 28px 0;
  font-size: 12px;
  font-style: italic;
  color: var(--text);
  line-height: 1.85;
}

/* ── TOP NAV ── */
.site-nav {
  width: 100%;
  max-width: 720px;
  margin-bottom: 52px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadein 0.4s ease both;
}

.site-nav .wordmark {
  font-size: 14px;
  color: var(--text);
}

.site-nav .nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* ── PAGE TITLE (projects page) ── */
h2 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 32px;
}

/* ── PROJECT LIST ── */
.project-list {
  list-style: none;
  width: 100%;
  max-width: 720px;
  animation: fadein 0.5s ease 0.1s both;
}

.project-list li {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.project-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.project-list .project-title {
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.project-list .project-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

/* ── FOOTER ── */
footer {
  width: 100%;
  max-width: 720px;
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadein 0.5s ease 0.2s both;
}

footer a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--text);
  text-decoration: none;
}
.local-time {
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;        /* pushes it to the far right, like a status line */
  letter-spacing: 0.03em;
}

.theme-toggle {
  background: none;
  border: 0px solid var(--muted);
  color: var(--text);
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── ACCESSIBILITY ─────────────────────────────── */

/* skip link — first stop for keyboard users, hidden until focused */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* visible focus ring on everything interactive — same language as your pill/toggle */
a:focus-visible,
button:focus-visible,
.checkbox-wrap:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

/* keep belief titles at body size once they become <h3> */
.belief-title { font-size: 14px; }

/* honour reduced-motion everywhere — not just the cursor */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* hide the name cursor instantly rather than letting it sit for 3.3s */
  h1::after { animation: none; opacity: 0; }
}

/* ── RESPONSIVE — MOBILE ── */
@media screen and (max-width: 600px) {
  body {
    padding: 52px 24px;
  }

  main,
  .project-list,
  footer {
    max-width: 100%;
  }

  .role {
    margin-bottom: 40px;
  }

  .bio {
    margin-bottom: 40px;
  }

  .component-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .local-time { margin-left: 0; }   /* stacks left with everything else on mobile */

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ── RESPONSIVE — SMALL MOBILE ── */
@media screen and (max-width: 380px) {
  body {
    padding: 40px 18px;
  }
}

/* ── RESPONSIVE — LARGE SCREENS ── */
@media screen and (min-width: 1200px) {
  body {
    padding-top: max(80px, 12vh);
  }
}