/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === Font === */
@font-face {
  font-family: 'Berkeley Mono';
  src: url('https://static.due.ren/site/font/BerkeleyMono-Regular.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Berkeley Mono';
  src: url('https://static.due.ren/site/font/BerkeleyMono-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* === Variables === */
:root {
  --font: 'Berkeley Mono', monospace;
  --text: #1a1a1a;
  --text-secondary: #666;
  --bg: #fafafa;
  --bg-inset: #f0f0f0;
  --border: #e0e0e0;
  --accent: #FF40B4;
  --line: 1.5;
  --space: 1.5rem;
  --max-width: 600px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --text-secondary: #888;
    --bg: #0a0a0a;
    --bg-inset: #151515;
    --border: #2a2a2a;
    --accent: #FF40B4;
  }
}

/* === Base === */
html {
  font-family: var(--font);
  font-size: 15px;
  line-height: var(--line);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--space) * 3) var(--space) calc(var(--space) * 2);
}

/* === Typography === */
h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space);
}

p { line-height: var(--line); }

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

code {
  font-family: var(--font);
  font-size: 0.9rem;
}

/* === Card (Header) === */
.card {
  padding-top: var(--space);
  border-top: 2px solid var(--accent);
  margin-bottom: calc(var(--space) * 3);
}

.card-identity {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 1.2);
  margin-bottom: calc(var(--space) * 1.5);
}

.profile {
  width: 88px;
  height: 88px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
}

.tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.bio:last-of-type {
  margin-bottom: 0;
}

/* === Sections === */
section {
  margin-bottom: calc(var(--space) * 3);
}


/* === Timeline === */
.tl-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline ol {
  list-style: none;
}

.timeline li {
  margin-bottom: var(--space);
}

.tl-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}



.tl-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--border);
  position: relative;
}

.tl-fill {
  position: absolute;
  left: calc(var(--start) * 1%);
  width: calc((var(--end) - var(--start)) * 1%);
  height: 100%;
  background: var(--accent);
}

.tl-active .tl-fill::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
}

.tl-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* === Contact === */
.contact ul {
  list-style: none;
  margin-bottom: var(--space);
}

.contact li {
  padding: calc(var(--space) * 0.3) 0;
  font-size: 0.9rem;
}

.note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 0.5ch;
}

/* === Details / PGP === */
details {
  border: 1px solid var(--border);
  padding: calc(var(--space) * 0.75) var(--space);
  margin-top: var(--space);
  border-radius: 0;
}

summary {
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
}

details[open] summary {
  margin-bottom: var(--space);
}

.pgp-key {
  font-family: var(--font);
  font-size: 0.7rem;
  line-height: 1.4;
  overflow-x: auto;
  margin: var(--space) 0;
  background: var(--bg-inset);
  padding: var(--space);
  border-radius: 0;
}

details p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: calc(var(--space) * 0.5);
}
details p:last-child { margin-bottom: 0; }

/* === Footer === */
footer {
  margin-top: calc(var(--space) * 3);
  padding-top: var(--space);
  border-top: 2px solid var(--accent);
}

.psalm {
  margin-top: calc(var(--space) * 1.5);
  margin-bottom: var(--space);
}

.psalm p {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

.psalm cite {
  font-size: 0.75rem;
  font-style: normal;
  color: var(--accent);
}

footer nav {
  font-size: 0.75rem;
}

footer nav a {
  color: var(--text-secondary);
}

/* === Mobile === */
@media (max-width: 480px) {
  html { font-size: 14px; }
  body { padding: calc(var(--space) * 2) var(--space); }

  .card-identity { gap: var(--space); }
  .profile { width: 72px; height: 72px; }
}
