/* dark mode is the default */
:root {
  --bg: #0e0e0f;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --rule: #262626;
  --accent: #6fb1ff;
}
:root[data-theme="light"] {
  --bg: #fcfcfc;
  --text: #1a1a1a;
  --muted: #666;
  --rule: #e6e6e6;
  --accent: #0b67d0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 65rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem;
}

.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem;
  opacity: 0.55;
  transition: opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.theme-toggle:hover { opacity: 1; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg { width: 18px; height: 18px; }
/* dark mode default → show sun (click to go light) */
.theme-toggle .sun { display: block; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

.intro {
  display: flex;
  gap: 1.75rem;
  align-items: stretch;
  margin: 0 0 1.5rem;
}
.portrait-wrap {
  flex: 1 1 50%;
  max-width: 50%;
  align-self: flex-start;
  border-radius: 6px;
  overflow: hidden;
  margin: 0;
}
.portrait {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}
.bio-text {
  flex: 1 1 50%;
  min-width: 0;
}
.bio-text p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .wrap {
    padding: 1.5rem 1.5rem 0;
  }
  .intro {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .portrait-wrap {
    flex: 0 0 auto;
    max-width: 18rem;
    width: 100%;
    align-self: center;
  }
  .portrait {
    height: auto;
  }
}

h1 {
  font-size: xxx-large;
  text-align: center;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
}

nav { margin: 0 0 2.4rem; text-align: center; }
nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}
nav a:hover { text-decoration: underline; }
nav .sep { color: var(--rule); padding: 0 0.55rem; }

p { margin: 0 0 1.25rem; }
.name {
  position: relative;
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}
.name::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  white-space: normal;
  width: max-content;
  max-width: min(18rem, 80vw);
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  line-height: 1.3;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 5;
}
.name:hover::after,
.name:focus::after {
  opacity: 1;
}
.lede { color: var(--text); }
.outside { color: var(--muted); }
.outside strong { color: var(--text); font-weight: 600; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.email {
  font-family: ui-monospace, "JetBrains Mono", "SF Mono", monospace;
  font-size: 1.02rem;
  color: var(--text);
}

.back { font-size: 0.95rem; }

.page-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}
