/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e2e2e2;
  --accent: #0a0a0a;
  --on-accent: #fafafa;

  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: .5rem .75rem;
  background: var(--ink);
  color: var(--bg);
  z-index: 10;
}
.skip:focus { top: 12px; }

kbd {
  font: 500 .6875rem/1 var(--mono);
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 .3em;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
}

/* ---------- Header / footer ---------- */
.top, .foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 20px var(--gutter);
  font: 400 .75rem/1 var(--mono);
  letter-spacing: .04em;
  color: var(--muted);
}

.top .mono {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .12em;
}

.clock { margin: 0; display: flex; align-items: center; gap: .5em; }
.clock time { font-variant-numeric: tabular-nums; color: var(--ink); }
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Layout ---------- */
.page {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  padding: 8px var(--gutter) 24px;
  align-content: center;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }
}

/* ---------- Portrait ---------- */
.portrait {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-height: 62svh;
  border-radius: 20px;
  overflow: hidden;
  background: #e9e9e9;
  isolation: isolate;
}

@media (max-width: 899px) {
  .portrait {
    aspect-ratio: auto;
    height: clamp(280px, 50svh, 133vw);
    max-height: none;
  }
}

@media (min-width: 900px) {
  .portrait { max-height: 78svh; justify-self: stretch; }
}

.portrait picture,
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}





/* ---------- Intro ---------- */
.intro { display: grid; gap: clamp(20px, 3vw, 36px); align-content: center; }

.name {
  margin: 0;
  font: 400 clamp(3.25rem, 9vw, 8rem)/.9 var(--serif);
  letter-spacing: -.02em;
}
.name em { font-style: italic; color: var(--accent); }
.name span, .name em { display: inline-block; }

.bio {
  margin: 0;
  max-width: 46ch;
  font: 400 clamp(1rem, 1.4vw, 1.125rem)/1.6 var(--mono);
  color: var(--muted);
}
.bio .seg { color: var(--ink); white-space: nowrap; display: inline-block; }
.bio .seg:last-child { white-space: normal; }
.bio a { white-space: nowrap; }
.bio .sep { margin-inline: .55em; color: var(--muted); }
.bio a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .2s;
}
.bio a:hover { text-decoration-color: var(--accent); }

/* ---------- Links ---------- */
.links ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.links li { border-bottom: 1px solid var(--line); }

.links a {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 12px;
  text-decoration: none;
  isolation: isolate;
  transition: color .3s var(--ease);
}

.links a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s var(--ease);
}

.net { font-weight: 500; font-size: 1.0625rem; }

.handle {
  justify-self: end;
  font: 400 .8125rem/1 var(--mono);
  color: var(--muted);
  transition: color .3s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.arrow {
  font-size: 1rem;
  transition: transform .35s var(--ease);
}

.links a:hover::before,
.links a:focus-visible::before,
.links a.is-pressed::before { transform: scaleY(1); }

.links a:hover,
.links a:focus-visible,
.links a.is-pressed { color: var(--on-accent); outline: none; }

.links a:hover .handle,
.links a:focus-visible .handle,
.links a.is-pressed .handle { color: var(--on-accent); transform: translateX(-4px); }

.links a:hover kbd,
.links a:focus-visible kbd,
.links a.is-pressed kbd { color: var(--on-accent); border-color: currentColor; }

.links a:hover .arrow,
.links a:focus-visible .arrow,
.links a.is-pressed .arrow { transform: translate(2px, -2px); }

.hint {
  margin: 14px 0 0;
  font: 400 .75rem/1 var(--mono);
  color: var(--muted);
  display: none;
}

/* Keyboard hints only where a keyboard is likely */
@media (hover: hover) and (pointer: fine) {
  .hint { display: block; }
}
@media (hover: none) {
  .links kbd { display: none; }
  .links a { grid-template-columns: auto 1fr auto; }
}

/* ---------- Entrance motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .name span, .name em, .bio .seg, .bio .sep, .links li, .hint, .portrait {
    animation: rise .9s var(--ease) both;
  }
  .portrait  { animation-name: reveal; animation-duration: 1.2s; }
  .name span { animation-delay: .1s; }
  .name em   { animation-delay: .18s; }
  .bio .seg, .bio .sep { animation-delay: calc(.35s + var(--i, 0) * .08s); }
  .bio .sep  { animation-name: fade; }
  .links li:nth-child(1) { animation-delay: .7s; }
  .links li:nth-child(2) { animation-delay: .76s; }
  .links li:nth-child(3) { animation-delay: .82s; }
  .links li:nth-child(4) { animation-delay: .88s; }
  .hint { animation-delay: 1s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes reveal {
  from { clip-path: inset(100% 0 0 0 round 20px); }
  to   { clip-path: inset(0 0 0 0 round 20px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
abbr{text-decoration:none;cursor:help}
