/* Shared */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #fff4cc;
  --card: #fffef8;
  --ink: #2a2a28;
  --ink-muted: #5c5a54;
  --ink-faint: #8a877f;
  --shadow: rgba(42, 38, 28, 0.18);
  --shadow-deep: rgba(42, 38, 28, 0.28);
  --border: rgba(42, 38, 28, 0.08);
  --font: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --linkedin: #0a66c2;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(210, 180, 90, 0.15) 0%, transparent 50%);
}

/* Business card page */
.page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2.5rem 1.5rem;
}

.card {
  position: relative;
  width: min(100%, 38rem);
  filter: drop-shadow(0 2px 1px var(--shadow))
          drop-shadow(0 8px 24px var(--shadow))
          drop-shadow(0 20px 48px var(--shadow-deep));
}

/* Slightly irregular paper edge */
.card::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: var(--card);
  border-radius: 2px 4px 3px 2px / 3px 2px 4px 3px;
  clip-path: polygon(
    0% 1%, 3% 0%, 7% 1%, 12% 0%, 18% 1%, 24% 0%, 31% 1%, 38% 0%, 45% 1%,
    52% 0%, 59% 1%, 66% 0%, 73% 1%, 80% 0%, 87% 1%, 93% 0%, 97% 1%, 100% 0%,
    100% 3%, 99% 7%, 100% 12%, 99% 18%, 100% 24%, 99% 31%, 100% 38%, 99% 45%,
    100% 52%, 99% 59%, 100% 66%, 99% 73%, 100% 80%, 99% 87%, 100% 93%, 99% 97%, 100% 100%,
    97% 99%, 93% 100%, 87% 99%, 80% 100%, 73% 99%, 66% 100%, 59% 99%, 52% 100%,
    45% 99%, 38% 100%, 31% 99%, 24% 100%, 18% 99%, 12% 100%, 7% 99%, 3% 100%, 0% 97%,
    1% 93%, 0% 87%, 1% 80%, 0% 73%, 1% 66%, 0% 59%, 1% 52%, 0% 45%, 1% 38%,
    0% 31%, 1% 24%, 0% 18%, 1% 12%, 0% 7%, 1% 3%
  );
  z-index: 0;
}

.card__inner {
  position: relative;
  z-index: 1;
  padding: 2.75rem 2.5rem 2.25rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(42, 38, 28, 0.012) 3px,
      rgba(42, 38, 28, 0.012) 4px
    ),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.card__header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card__name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.card__title {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.card__tagline {
  margin: 0 0 2rem;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-muted);
  border: none;
}

.card__links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.card__divider {
  color: var(--ink-faint);
  font-size: 0.85rem;
  user-select: none;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s ease;
}

.card__link-text {
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.card__link:hover,
.card__link:focus-visible {
  outline: none;
}

.card__link:hover .card__link-text,
.card__link:focus-visible .card__link-text {
  color: var(--ink-muted);
  border-bottom-color: var(--ink-faint);
}

.card__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.card__icon--linkedin {
  color: var(--linkedin);
}

/* CV page */
.cv-page {
  width: 60%;
  max-width: calc(100% - 3.5rem);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.cv-nav {
  margin-bottom: 2.5rem;
}

.cv-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.cv-nav a:hover,
.cv-nav a:focus-visible {
  border-bottom-color: var(--ink-faint);
  outline: none;
}

.cv-content {
  background: var(--card);
  padding: 2.5rem 2.75rem;
  border: 1px solid var(--border);
  box-shadow:
    0 1px 2px var(--shadow),
    0 6px 20px var(--shadow);
}

.cv-content h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cv-content h2 {
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border);
}

.cv-content h2:first-of-type {
  margin-top: 1.5rem;
}

.cv-content h3 {
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border);
}

.cv-content h3:first-of-type {
  margin-top: 1.5rem;
}

.cv-content blockquote {
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-muted);
  border: none;
}

.cv-content blockquote p {
  margin: 0.15rem 0;
}

.cv-content img {
  float: right;
  margin: 0 0 1rem 1.5rem;
  border-radius: 2px;
}

.cv-content small {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.cv-content p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
}

.cv-content ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.cv-content li {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cv-content a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.cv-content a:hover {
  color: var(--ink-muted);
}

.cv-content strong {
  font-weight: 700;
}

.cv-content em {
  font-style: italic;
  color: var(--ink-muted);
}

.cv-loading {
  font-style: italic;
  color: var(--ink-faint);
}

.cv-error {
  color: #8b3a3a;
  font-style: italic;
}

@media (max-width: 768px) {
  .cv-page {
    width: calc(100% - 3.5rem);
  }
}

@media (max-width: 480px) {
  .card__inner {
    padding: 2.25rem 1.75rem 2rem;
  }

  .card__name {
    font-size: 1.5rem;
  }

  .cv-content {
    padding: 1.75rem 1.5rem;
  }

  .cv-content img {
    float: none;
    display: block;
    margin: 0 auto 1.25rem;
  }
}
