:root {
  color-scheme: dark;
  --bg: #05061a;
  --text: #f7f7fb;
  --text-soft: #e9e9f1;
  --muted: #858bad;
  --subtle: #737898;
  --faint: #464b6b;
  --line: rgba(255, 255, 255, .08);
  --line-hover: rgba(168, 165, 255, .3);
  --accent: #a8a5ff;
  --accent-strong: #d4d2ff;
  --accent-soft: rgba(168, 165, 255, .08);
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --content-width: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--accent); color: #101022; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 5px; border-radius: 4px; }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: var(--accent-strong);
  color: #111122;
  font-size: .75rem;
}
.skip-link:focus { top: 1rem; }

.minimal-home {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 70% -10%, rgba(123, 117, 255, .08), transparent 34rem);
}
.minimal-page {
  display: flex;
  width: min(calc(100% - 3rem), var(--content-width));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) 0 2.5rem;
  flex-direction: column;
}
.minimal-main {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
}
.minimal-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.65rem, 5vw, 2.15rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.065em;
}
.minimal-hero p {
  margin: .6rem 0 0;
  color: var(--subtle);
  font-size: .84rem;
  line-height: 1.4;
}
.minimal-hero .minimal-now { margin-top: .75rem; font-size: .78rem; }
.minimal-now span { color: var(--faint); }

.minimal-links {
  display: grid;
  gap: .1rem;
  margin-top: 3.25rem;
}
.minimal-links a,
.minimal-projects-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: .65rem .8rem;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.3;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.minimal-links a:hover,
.minimal-projects-button:hover,
.minimal-project-trigger:hover {
  border-color: var(--line-hover);
  background: var(--accent-soft);
  color: var(--text);
  transform: translateX(.35rem);
}
.minimal-links a span:last-child,
.minimal-projects-button span:last-child { color: var(--faint); transition: color .2s ease; }
.minimal-links a:hover span:last-child,
.minimal-projects-button:hover span:last-child { color: var(--accent-strong); }
.minimal-projects-button { margin-top: .1rem; }

.minimal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: .72rem;
  line-height: 1.5;
}
.minimal-footer a:hover { color: var(--muted); }
.minimal-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--subtle);
  font-size: .78rem;
  transition: color .2s ease, transform .2s ease;
}
.minimal-back:hover { color: var(--text); transform: translateX(-.25rem); }

/* Timeline */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.minimal-timeline { margin-top: 3.25rem; padding: 0 0 1rem 1.4rem; }
.timeline-list { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline-list::before {
  position: absolute;
  top: .45rem;
  bottom: .6rem;
  left: .18rem;
  width: 1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .24), rgba(255, 255, 255, .08));
  content: '';
}
.timeline-item { position: relative; display: grid; padding: 0 0 2rem 1.2rem; }
.timeline-item:last-child { padding-bottom: .2rem; }
.timeline-point {
  position: absolute;
  z-index: 1;
  top: .2rem;
  left: -.02rem;
  width: .75rem;
  height: .75rem;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px rgba(255, 255, 255, .08);
}
.timeline-current .timeline-point {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 0 0 4px var(--bg), 0 0 18px rgba(255, 255, 255, .25);
}
.timeline-content time { color: rgba(255, 255, 255, .72); font-size: .72rem; }
.timeline-content h3 { margin: .38rem 0 .35rem; color: var(--text-soft); font-size: .9rem; font-weight: 500; }
.timeline-content p { max-width: 560px; margin: 0; color: var(--subtle); font-size: .76rem; line-height: 1.6; }

/* Projects */
.minimal-projects-page .minimal-hero h1 { font-size: clamp(2rem, 7vw, 3rem); }
.minimal-projects-page .minimal-project-list { margin-top: 3rem; }
.minimal-project-list h2 { margin: 0 0 .9rem; color: var(--faint); font-size: .72rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }
.minimal-project-list .project-links { margin-top: 0; }
.minimal-project-item { border-bottom: 1px solid var(--line); }
.minimal-project-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: .65rem .8rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-size: .94rem;
  line-height: 1.3;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.minimal-project-trigger span:last-child { color: var(--faint); font-size: 1rem; }
.minimal-project-item.open .minimal-project-trigger { color: var(--text); }
.minimal-project-body { padding: .15rem .8rem .9rem; color: var(--subtle); font-size: .78rem; line-height: 1.65; }
.minimal-project-body p { max-width: 620px; margin: 0; }
.minimal-project-body a { display: inline-block; margin-top: .45rem; color: var(--muted); font-size: .72rem; }
.minimal-project-body a:hover { color: var(--text); }

/* About */
.minimal-about-page .minimal-hero h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); }
.about-copy { max-width: 620px; margin-top: 2.75rem; }
.about-copy > p { margin: 0 0 1.55rem; color: var(--muted); font-size: .82rem; line-height: 1.8; }
.about-copy > p:first-child { color: #c9c9d5; }
.about-facts { display: grid; gap: .75rem; margin: 2rem 0 2.15rem; padding: 1.1rem .8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-fact { display: grid; grid-template-columns: minmax(7.5rem, .42fr) 1fr; gap: 1rem; align-items: baseline; }
.about-fact span { color: var(--faint); font-size: .68rem; text-transform: lowercase; }
.about-fact strong { color: var(--text-soft); font-size: .76rem; font-weight: 500; line-height: 1.5; }

/* 404 */
.minimal-404-page .minimal-hero h1 { font-size: clamp(2.4rem, 9vw, 4rem); letter-spacing: -.08em; }
.not-found-copy { max-width: 560px; margin: 2.25rem 0 0; color: var(--subtle); font-size: .8rem; line-height: 1.75; }
.not-found-links { margin-top: 2.25rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 520px) {
  .minimal-page { width: min(calc(100% - 2rem), var(--content-width)); padding-top: 4vh; padding-bottom: 1.5rem; }
  .minimal-hero h1 { font-size: clamp(1.55rem, 7vw, 1.9rem); }
  .minimal-links { margin-top: 2.5rem; }
  .minimal-footer { display: block; }
  .minimal-footer span { display: block; }
  .minimal-projects-button { margin-top: .1rem; }
  .minimal-projects-page .minimal-project-list { margin-top: 2.5rem; }
  .minimal-projects-page .minimal-hero h1 { font-size: clamp(1.9rem, 9vw, 2.5rem); }
  .minimal-timeline { margin-top: 2.5rem; padding-left: 1.2rem; }
  .timeline-item { padding-left: 1rem; padding-bottom: 1.7rem; }
  .timeline-content h3 { font-size: .84rem; }
  .timeline-content p { font-size: .72rem; }
  .about-copy { margin-top: 2.35rem; }
  .about-copy > p { font-size: .76rem; line-height: 1.75; }
  .about-fact { grid-template-columns: 1fr; gap: .25rem; }
  .about-fact strong { font-size: .74rem; }
  .not-found-copy { margin-top: 1.85rem; font-size: .76rem; }
  .not-found-links { margin-top: 1.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Now page */
.minimal-now-page .minimal-hero h1 { font-size: clamp(2rem, 7vw, 3rem); }
.now-focus { margin-top: 2.75rem; padding: 1rem .8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-label { margin: 0 0 .6rem; color: var(--faint); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.now-focus-text { margin: 0; color: var(--text-soft); font-size: .82rem; line-height: 1.7; }
.now-focus-text span { color: var(--subtle); font-size: .74rem; }
.now-section { margin-top: 3.25rem; }
.now-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.now-section-heading h2 { margin: 0; color: var(--text-soft); font-size: 1rem; font-weight: 500; }
.now-section-heading span { color: var(--faint); font-size: .64rem; }
.now-list { display: grid; border-top: 1px solid var(--line); }
.now-entry { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1rem .8rem; border-bottom: 1px solid var(--line); }
.now-entry h3 { margin: 0 0 .35rem; color: var(--text-soft); font-size: .86rem; font-weight: 500; }
.now-entry p { margin: 0; color: var(--subtle); font-size: .74rem; line-height: 1.65; }
.now-entry-meta { color: var(--faint); font-size: .68rem; text-align: right; white-space: nowrap; }
.now-entry a { display: inline-block; margin-top: .45rem; color: var(--muted); font-size: .7rem; }
.now-entry a:hover { color: var(--text); }
.now-empty { margin: 0; padding: 1rem .8rem; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: .74rem; line-height: 1.6; }
.now-tabs { display: flex; gap: .35rem; overflow-x: auto; margin-bottom: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.now-tabs::-webkit-scrollbar { display: none; }
.now-tab { padding: .7rem .65rem; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--faint); cursor: pointer; font-size: .7rem; white-space: nowrap; }
.now-tab:hover, .now-tab.is-active { border-bottom-color: var(--accent); color: var(--text-soft); }
.now-panel { min-height: 3rem; }
.now-panel[hidden] { display: none; }
.now-updated { margin: 3.25rem 0 0; color: var(--faint); font-size: .68rem; }
.now-subnav { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .8rem; color: var(--subtle); font-size: .7rem; }
.now-subnav a:hover { color: var(--text); }
@media (max-width: 520px) {
  .now-focus, .now-entry, .now-empty { padding-left: .6rem; padding-right: .6rem; }
  .now-section { margin-top: 2.5rem; }
  .now-section-heading { display: block; }
  .now-section-heading span { display: block; margin-top: .35rem; }
  .now-entry { grid-template-columns: 1fr; gap: .35rem; }
  .now-entry-meta { text-align: left; }
}
