:root {
  --bg: #efeae0;
  --text: #1a1a1a;
  --muted: #6b6256;
  --link: #1a1a1a;
  --accent: #b5651d;
  --rule: #d7cfc0;
  --toggle-bg: #1a1a1a;
  --toggle-knob: #efeae0;
  --dot: #6ea86b;
}

[data-theme="dark"] {
  --bg: #191714;
  --text: #efeae0;
  --muted: #a59a88;
  --link: #efeae0;
  --accent: #e0a566;
  --rule: #36322c;
  --toggle-bg: #efeae0;
  --toggle-knob: #191714;
  --dot: #8fd08b;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  font-size: 20px;
  line-height: 1.65;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image:
    radial-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

[data-theme="dark"] body,
[data-theme="dark"] {
  background-image:
    radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 32px 140px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 28px;
  min-height: 128px;
}

h1 {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  font-size: 34px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.signature-heading {
  line-height: 1;
  display: inline-flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 18px;
  margin-left: -12px;
}

.signature {
  display: block;
  height: 92px;
  width: auto;
  max-width: 400px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter 0.3s ease;
}

[data-theme="dark"] .signature {
  filter: invert(1);
}

.signature-name {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-left: 14px;
}

.signature-description {
  display: block;
  max-width: 620px;
  margin-left: 14px;
  color: var(--text);
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 24, "SOFT" 50;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
}

.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;
}

h2 {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 48, "SOFT" 40;
  font-size: 22px;
  font-weight: 600;
  margin: 48px 0 14px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 14px;
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

h2 .heading-link {
  background-image: none;
  padding-bottom: 0;
  color: var(--text);
  transition: color 0.2s ease;
}
h2 .heading-link:hover {
  color: var(--accent);
  background-image: none;
}

.site-footer {
  margin-top: 72px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer p {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.meta {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.now {
  font-size: 15px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  margin: 0 0 32px;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 0 var(--dot);
  animation: pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--dot) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 0%, transparent); }
}

.bio p { margin: 0 0 22px; }

.dropcap {
  float: left;
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144, "SOFT" 20;
  font-weight: 700;
  font-size: 64px;
  line-height: 0.9;
  padding: 6px 10px 0 0;
  color: var(--accent);
}

.group ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.group li {
  margin: 8px 0;
  position: relative;
  padding-left: 20px;
}

.group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 1px;
  background: var(--muted);
}

a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(var(--link), var(--link));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 1px;
  transition: color 0.2s ease, background-image 0.2s ease, background-size 0.3s ease;
}

a:hover {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
}

a[target="_blank"]::after {
  content: "↗";
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  font-weight: 600;
  margin-left: 5px;
  color: var(--accent);
  opacity: 1;
  transition: transform 0.2s ease;
  display: inline-block;
  vertical-align: baseline;
}
a[target="_blank"]:hover::after {
  transform: translate(2px, -2px);
}

.theme-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background-color 0.3s ease;
}

.theme-fab:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-fab:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.theme-fab .icon { display: block; }
.theme-fab .icon-sun { display: none; }
.theme-fab .icon-moon { display: block; }

[data-theme="dark"] .theme-fab .icon-sun { display: block; }
[data-theme="dark"] .theme-fab .icon-moon { display: none; }

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  body { font-size: 18px; }
  .container { padding: 56px 20px 96px; }
  .top { gap: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .dropcap { font-size: 52px; }
  .signature { height: 68px; max-width: 280px; }
  .signature-heading { margin-left: -8px; }
  .signature-name { font-size: 11px; margin-left: 10px; }
  .signature-description { margin-left: 10px; font-size: 16px; }
  .site-footer { margin-top: 56px; }
  .site-footer p { font-size: 11px; }
  .theme-fab { bottom: 16px; right: 16px; width: 36px; height: 36px; }
}
