/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
  font-size: 0.95rem;
}
.skip-link:focus {
  top: 0;
}

/* Screen reader only */
.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;
}

:root {
  --bg: #f9f8f4;
  --text: #111;
  --muted: #5d5d5d;
  --link: #0d0d0d;
  --max-width: 820px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top left, #fbfaf7, var(--bg));
  color: var(--text);
  font-family: "Inter", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", serif;
  line-height: 1.7;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 2rem 0 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.container {
  max-width: var(--max-width);
  margin: 5rem auto;
  padding: 0 1.25rem;
}

.site-header h1 {
  margin: 1.25rem 0 1.8rem;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

.nav a:hover {
  color: var(--text);
}

p {
  margin: 0 0 1.15rem;
  font-size: 1.04rem;
}

.site-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 1.25rem 0 1.8rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.25rem;
}


.footer-legal {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  padding: 0;
  text-align: right;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-legal a:hover,
.footer-legal a[aria-current="page"] {
  color: var(--text);
}

.links,
.writing-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

.bibliography {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.98rem;
}

.bibliography li {
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.85rem;
  line-height: 1.5;
}

.bibliography li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
  font-size: 0.97rem;
}

.writing-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #d8d6cf;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.writing-list span {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.cv-card {
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  margin-top: 1rem;
  border-radius: 999px;
  border: none;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.btn:hover {
  background: #333;
}

@media (max-width: 640px) {
  .container {
    margin: 2.75rem auto;
  }

  .site-header h1 {
    margin-top: 1rem;
    margin-bottom: 1.4rem;
  }

  .writing-list li {
    flex-direction: column;
    gap: 0.2rem;
  }
}
