:root {
  --bg: #0d0e12;
  --bg-elevated: #14161c;
  --text: #ece9e2;
  --text-muted: #8a8b91;
  --text-faint: #4a4b50;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #3bb3a8;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --reading-max-w: 40rem;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.reading-header,
.reading-footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1.1rem 2rem;
  background: rgba(13, 14, 18, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  transition: opacity 0.5s ease;
}

.reading-header {
  top: 0;
  border-bottom: 1px solid var(--border);
}

.reading-footer {
  bottom: 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.reading-header.dimmed,
.reading-footer.dimmed {
  opacity: 0.18;
}

.reading-header.dimmed:hover,
.reading-footer.dimmed:hover,
.reading-header.dimmed:focus-within,
.reading-footer.dimmed:focus-within {
  opacity: 1;
}

.reading-home {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  transition: color 0.25s;
}

.reading-home:hover {
  color: var(--accent);
}

.reading-content {
  max-width: var(--reading-max-w);
  margin: 0 auto;
  padding: 9rem 1.5rem 9rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.25s;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.reading-footer-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.resume-top {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 6.5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.resume-name-given {
  font-weight: 400;
  color: var(--text-muted);
}

.resume-name-family {
  font-style: italic;
  font-weight: 700;
}

.resume-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
  letter-spacing: 0.01em;
}

.resume-contacts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.resume-contacts li {
  position: relative;
}

.resume-contacts li + li::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.85rem;
  background: var(--border-strong);
}

.resume-contacts a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}

.resume-contacts a:hover {
  color: var(--accent);
}

.resume-section {
  margin-bottom: 3rem;
}

.resume-section > p {
  text-align: justify;
  hyphens: auto;
}

.resume-section:last-child {
  margin-bottom: 0;
}

.resume-section > h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: -0.005em;
  margin: 0 0 1.5rem;
  color: var(--text);
  position: relative;
  padding-bottom: 0.65rem;
}

.resume-section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.25rem;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.role,
.work {
  margin-bottom: 1.75rem;
}

.role:last-child,
.work:last-child {
  margin-bottom: 0;
}

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  margin-bottom: 0.4rem;
}

.role-dates {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.role-title,
.work-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0;
  color: var(--text);
}

.role-pos {
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
}

.role > p,
.work > p {
  margin: 0.4rem 0 0;
  color: #d2cfc8;
  text-align: justify;
  hyphens: auto;
}

.work-title {
  margin-bottom: 0.4rem;
}

.work-doc-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, transform 0.25s;
}

.work-doc-link:hover {
  border-bottom-color: var(--accent);
  transform: translateX(3px);
}

.skills {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skills dt {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  padding-top: 0.35rem;
}

.skills dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.skills dd span {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text);
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.skills dd span:hover {
  background: rgba(59, 179, 168, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 640px) {
  .reading-header,
  .reading-footer {
    padding: 0.9rem 1.25rem;
  }

  .reading-content {
    padding: 7rem 1.25rem;
  }
}

@media (max-width: 600px) {
  .resume-top {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
  }

  .skills {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem 1.4rem;
  }

  .skills dt {
    padding-top: 0;
  }

  .resume-contacts {
    gap: 0.4rem 1rem;
  }

  .resume-contacts li + li::before {
    display: none;
  }
}
