:root {
  --bg: #f7f5f2;
  --panel: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --text: #1c2333;
  --muted: #5c6470;
  --accent: #2d5a8e;
  --accent-soft: #4a7ab5;
  --surface-subtle: #f0ede8;
  --accent-border: rgba(45, 90, 142, 0.25);
  --accent-wash: rgba(45, 90, 142, 0.06);

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 18px 44px rgba(28, 35, 51, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Geomini", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------ Single screen */
.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 2.4rem);
  padding: 4.5rem 1.25rem calc(env(safe-area-inset-bottom, 0px) + 2rem);
  text-align: center;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero {
  max-width: 40rem;
}

.tag {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0.5rem 0 0.6rem;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.subtitle {
  margin: 0 auto;
  max-width: 32ch;
  color: var(--muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------ Link row */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.links a svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 140ms ease;
}

.links a:hover,
.links a:focus-visible {
  border-color: var(--accent-border);
  background: var(--accent-wash);
  color: var(--accent);
}

.links a:hover svg,
.links a:focus-visible svg {
  color: var(--accent);
}

/* ------------------------------------------------------------ Primary action */
.cta {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 90, 142, 0.24);
}

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

/* ------------------------------------------------------------ Disclosure toggle */
.more-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color 140ms ease, border-color 140ms ease;
}

.more-toggle:hover,
.more-toggle:focus-visible,
.more-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent-border);
}

.more-toggle .chev {
  transition: transform 200ms ease;
}

.more-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------ Disclosure panel */
.more-panel {
  position: fixed;
  top: 4rem;
  right: 1.25rem;
  z-index: 41;
  width: min(370px, calc(100vw - 2.5rem));
  max-height: min(72vh, 620px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: panelIn 180ms ease;
}

.more-panel[hidden] {
  display: none;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.panel-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.7rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.panel-close:hover,
.panel-close:focus-visible {
  color: var(--text);
  background: var(--surface-subtle);
}

.panel-body {
  padding: 0.4rem 1rem 1.1rem;
}

.block {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.block:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.block h2 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.block p {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

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

a.pointer,
.block a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-border);
  transition: color 140ms ease, border-color 140ms ease;
}

.block a:hover,
.block a:focus-visible {
  color: var(--accent-soft);
  border-bottom-color: var(--accent-soft);
}

/* Project list */
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.items li {
  margin: 0 0 0.7rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.items li:last-child {
  margin-bottom: 0;
}

.items li a {
  font-weight: 600;
}

.items li span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Writing list */
.writing .post {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.writing .post:last-child {
  margin-bottom: 0;
}

.post-date {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ Motion */
@media (prefers-reduced-motion: reduce) {
  .more-panel {
    animation: none;
  }

  .cta,
  .more-toggle .chev,
  .links a {
    transition: none;
  }

  .cta:hover,
  .cta:focus-visible {
    transform: none;
  }
}

/* ------------------------------------------------------------ Small screens */
@media (max-width: 640px) {
  .screen {
    gap: 1.5rem;
    padding-top: 4rem;
  }

  .links a {
    font-size: 0.8rem;
    padding: 0.38rem 0.75rem;
  }

  .more-panel {
    top: 3.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-height: 76vh;
  }

  .more-toggle {
    top: 0.9rem;
    right: 0.9rem;
  }
}
