@font-face{font-family:'IBM Plex Mono';font-weight:400;font-display:swap;src:url(/fonts/plex-mono-400.woff2) format('woff2')}
@font-face{font-family:'IBM Plex Sans';font-weight:400 500;font-display:swap;src:url(/fonts/plex-sans.woff2) format('woff2')}
@font-face{font-family:'Plex Fallback';src:local('Arial');size-adjust:100%;ascent-override:100%;descent-override:25%}

:root {
  --bg:        #0e0e0e;
  --ink:       #ededed;
  --role:      #8f8f8f;
  --statement: #c4c4c4;
  --muted:     #909090;
  --dim:       #2e2e2e;
  --glyph:     #8a8a8a;
  --line:      #262626;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', 'Plex Fallback', sans-serif;
  --fs-xs:   .75rem;
  --fs-sm:   .875rem;
  --fs-lg:   1.125rem;
  --fs-xl:   2rem;
  --fs-page: 1.5rem;
  --accent:    #5eead4;
  --top: clamp(4rem, 18vh, 10rem);
  --gutter: 1.5rem;
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
  --bg:#fafaf8; --ink:#161616; --role:#5a5a5a; --statement:#333; --muted:#5c5c5c; --dim:#c4c4c0; --glyph:#6b6b6b; --line:#d6d6d1; --accent:#0f766e;
}

html { scrollbar-color: var(--dim) transparent; text-rendering: optimizeLegibility; }
::selection { background: var(--accent); color: var(--bg); }

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

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.card {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  padding: var(--top) var(--gutter) max(4rem, 10vh);
  margin: 0 auto;
  text-align: left;
  animation: fade 0.7s ease both;
}

.card.home { padding-top: clamp(4rem, 20vh, 12rem); }

@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.name {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.name::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--accent);
  margin-bottom: 1.5rem;
}

.role {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--role);
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.card.home .role { padding-bottom: 1.5rem; border-bottom: 1px solid var(--dim); }

.role span { white-space: nowrap; }

.statement {
  font-family: var(--font-sans);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--statement);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.about {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--statement);
  line-height: 1.65;
  max-width: 48ch;
  margin-top: 1.25rem;
  text-wrap: pretty;
}

.elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 3.5rem;
  font-family: var(--font-mono);
  font-size: .9375rem;
}
.elsewhere::before {
  content: "Elsewhere";
  flex-basis: 100%;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .375rem;
}
.elsewhere a {
  white-space: nowrap;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .2s, text-decoration-color .2s, text-decoration-thickness .2s;
}
.elsewhere a:hover, .elsewhere a:focus-visible {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.elsewhere a:visited { color: var(--ink); }
.elsewhere a:active { color: var(--accent); }
.elsewhere a span[aria-hidden] {
  display: inline-block;
  margin-left: .4em;
  color: var(--glyph);
  transition: color .2s, transform .2s;
}
.elsewhere a:hover span[aria-hidden], .elsewhere a:focus-visible span[aria-hidden] {
  color: var(--accent);
  transform: translate(2px, -2px);
}

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

footer {
  width: min(100% - 2 * var(--gutter), 44rem - 2 * var(--gutter));
  margin: 3rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-variant-numeric: slashed-zero;
}

footer a { color: var(--muted); text-decoration: none; transition: color .2s; }
footer a:hover, footer a:focus-visible { color: var(--ink); }
footer a span[aria-hidden] { margin-left: .4em; }
.theme-toggle {
  position: absolute; top: 1rem; right: var(--gutter); z-index: 1;
  padding: .6rem 0 .6rem .75rem; min-height: 44px;
  font: var(--fs-xs) var(--font-mono); letter-spacing: .04em;
  color: var(--muted); background: none; border: 0; cursor: pointer; transition: color .2s;
}
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--ink); }

/* Faint dot texture, fades in toward the empty lower area */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 55%, transparent);
}

[data-theme="light"] body::before { opacity: .55; }

@media (min-width: 481px) and (max-width: 768px) {
  .elsewhere { gap: 0 1.5rem; }
  .elsewhere a { padding: 0.6rem 0; }
}

@media (max-width: 480px) {
  .statement { font-size: clamp(1.1875rem, 5.6vw, 1.375rem); }
  .about { max-width: none; font-size: 1rem; }
  .role { line-height: 1.6; }
  .card { padding-bottom: 12vh; }
  .card.home { padding-top: clamp(3rem, 16vh, 6rem); }
  .name::before { width: 1.5rem; }
  .role span { display: block; }
  footer { align-items: center; }
  footer a { padding: .6rem 0; }
  .elsewhere { font-size: .875rem; gap: 0 1.1rem; margin-top: 3rem; }
  .elsewhere::before { flex-basis: 100%; }
  .elsewhere a { padding: .7rem 0; min-height: 44px; display: flex; align-items: center; }
}

@media (max-width: 720px) {
  :root { --gutter: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .back, footer, .elsewhere, .theme-toggle { display: none !important; }
  body::before { display: none; }
}
