@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --bg: #DEDAD0;
  --bg-card: #E8E4D8;
  --bg-hover: #FAF8F2;
  --ink: #1C1A15;
  --ink-muted: #6B6455;
  --ink-faint: #A89E8C;
  --accent: #8B4513;
  --accent-light: #C4793A;
  --border: #C8C2B0;
  --shadow: rgba(28, 26, 21, 0.08);
  --shadow-hover: rgba(139, 69, 19, 0.18);
}

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

html {
  /* Disable scroll anchoring — prevents Chrome jumping to bottom on load */
  overflow-anchor: none;
}

@media (hover: hover) {
  html { scroll-behavior: smooth; }
}

html, body {
  height: auto;
  overscroll-behavior-y: auto;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(139,69,19,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(139,69,19,0.04) 0%, transparent 50%);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  -webkit-overflow-scrolling: touch;
}

/* ── HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(222,218,208,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.header-name {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-links {
  display: flex;
  gap: 12px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.header-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.header-link img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* ── MAIN CONTENT ── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── PAGE TITLE ── */
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: 42px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--ink-faint);
  font-weight: 300;
  margin-bottom: 40px;
  font-style: italic;
}

/* ── LINK CARDS ── */
.link-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.link-card::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
  border-radius: 2px;
}

@media (hover: hover) {
  .link-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-light);
    transform: translateX(3px);
    box-shadow: 0 4px 24px var(--shadow-hover), 0 0 0 1px var(--accent-light);
  }
  .link-card:hover::before { transform: scaleY(1); }
  .link-card:hover .link-card-arrow { transform: translateX(4px); color: var(--accent); }
  .avatar:hover { transform: scale(1.06); }
  .header-name:hover { color: var(--accent); }
  .header-link:hover {
    color: var(--ink);
    border-color: var(--border);
    background: var(--bg-card);
  }
  .back-link:hover { color: var(--accent); }
}

.link-card:active {
  background: var(--bg-hover);
  border-color: var(--accent-light);
  box-shadow: 0 4px 16px var(--shadow);
}

.link-card-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.link-card-desc {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
  font-weight: 300;
}

.link-card-arrow {
  color: var(--ink-faint);
  font-size: 18px;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  font-style: normal;
}

/* ── INDEX SPECIFIC ── */
.year-stat {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: var(--ink-muted);
  margin-bottom: 4px;
  text-align: center;
}
.life-stat {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: var(--ink-muted);
  margin-bottom: 36px;
  text-align: center;
}
.life-stat strong {
  color: var(--accent);
  font-weight: 600;
}

/* ── SECTION HEADERS ── */
.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
  margin-top: 32px;
}

/* ── CARD GROUP (paired cards) ── */
.link-card-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.link-card-secondary {
  background: var(--bg);
  border-style: dashed;
}
.link-card-secondary:hover {
  background: var(--bg-hover);
}

/* ── BACK LINK ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}

/* ── FOOTER ── */
.site-footer { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .site-header {
    padding: 16px 20px;
    gap: 14px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(222,218,208,0.85);
  }
  .header-name { font-size: 20px; }
  .header-link span { display: none; }
  .header-link { padding: 5px 7px; }

  main { padding: 32px 16px 60px; }
  .page-title { font-size: 32px; }

  .link-card { border-radius: 8px; position: static; }
  .link-card::before { display: none; }

  /* Disable transitions only on interactive card elements */
  .link-card,
  .link-card::before,
  .link-card-arrow {
    transition: none !important;
  }
  
  /* Optional: keep cards flat on mobile */
  .link-card {
    box-shadow: none !important;
  }

  .link-card { -webkit-tap-highlight-color: transparent; cursor: pointer; }
}
