/* ============================================================
   Malik Lynge Papis — Homepage CV styles
   Palette: paper / ink / muted slate / divider / teal / driftwood
   Type: Fraunces (headings), Inter (body) — self-hosted via fonts.css
   Layout: mobile-first single column, content ~680–720px
   ============================================================ */

:root {
  --paper: #F4F1EC;
  --ink: #1A1F24;
  --muted: #5C6670;
  --divider: #E5E0D8;
  --teal: #2F5D56;
  --driftwood: #C4A574;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --content-max: 44rem;   /* ~704px */
  --hero-max: 56rem;      /* wider hero */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;

  --radius: 0.5rem;
  --focus: 2px solid var(--teal);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 var(--space-sm);
}

p { margin: 0 0 var(--space-md); }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }
strong { font-weight: 600; }

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); }
a:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  z-index: 100;
  text-decoration: none;
  font-size: 0.875rem;
}
.skip-link:focus {
  top: var(--space-sm);
}

/* ========== Header ========== */
.site-header {
  border-bottom: 1px solid var(--divider);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--hero-max);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--teal);
}

/* ========== Hero ========== */
.hero {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--divider);
}

.hero-inner {
  max-width: var(--hero-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.portrait-slot {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--teal) 0%, #3d7269 55%, var(--driftwood) 140%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(26, 31, 36, 0.06);
}

.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  z-index: 1;
}

.monogram {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  user-select: none;
  z-index: 0; /* CSS fallback if portrait image fails to load */
}

.hero-name {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 500;
  font-style: italic;
  color: var(--teal);
  line-height: 1.4;
  margin: 0 0 var(--space-md);
  max-width: 36rem;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  font-weight: 500;
}

.loc-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--driftwood);
  flex-shrink: 0;
}

/* ========== Content column ========== */
.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

.section {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--divider);
}
.section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
  color: var(--ink);
}

.section-title::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 2px;
  background: var(--teal);
  margin-top: var(--space-sm);
  border-radius: 1px;
}

.section-intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
}

/* Roles / experience cards */
.role {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--divider);
}
.role:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.role-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.role-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.role-meta .org {
  color: var(--ink);
  font-weight: 500;
}

.role-meta .sep {
  margin: 0 0.25rem;
  color: var(--divider);
}

.role-body {
  color: var(--ink);
  font-size: 1rem;
}

.role-refs {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.role-refs a {
  color: var(--teal);
}

.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--teal) 25%, var(--divider));
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.muted {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85em;
  color: var(--muted);
  font-style: normal;
}

/* Landmark list */
.landmark-list,
.edu-list,
.extra-list {
  margin: 0;
  padding-left: 1.15rem;
}

.landmark-list li,
.edu-list li,
.extra-list li {
  margin-bottom: var(--space-sm);
  padding-left: 0.25rem;
}
.landmark-list li:last-child,
.edu-list li:last-child,
.extra-list li:last-child {
  margin-bottom: 0;
}

.landmark-list li::marker,
.edu-list li::marker,
.extra-list li::marker {
  color: var(--teal);
}

/* Skills */
.skill-list {
  margin: 0;
  display: grid;
  gap: var(--space-md);
}

.skill dt {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--ink);
}

.skill dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
}


/* Media / Videos */
.media-group {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--divider);
}
.media-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.media-group-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.media-group-title a {
  color: var(--ink);
  text-decoration: none;
}
.media-group-title a:hover,
.media-group-title a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.media-list {
  margin: 0;
  padding-left: 1.15rem;
}

.media-list li {
  margin-bottom: var(--space-xs);
  padding-left: 0.25rem;
}
.media-list li:last-child {
  margin-bottom: 0;
}

.media-list li::marker {
  color: var(--teal);
}


/* Photos / Gallery */
.photo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

.photo-card figure {
  margin: 0;
}

.photo-link {
  display: block;
  line-height: 0;
  border-radius: var(--radius);
  outline-offset: 3px;
}

.photo-link:hover img,
.photo-link:focus-visible img {
  opacity: 0.92;
}

.photo-card img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--divider);
  box-shadow: 0 1px 0 rgba(26, 31, 36, 0.06);
}

.photo-card figcaption {
  margin-top: var(--space-xs);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

.doc-download a {
  font-weight: 500;
}

@media (min-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .photo-card img {
    height: 11rem;
  }
}

/* Contact */
.contact-block {
  font-style: normal;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.contact-block p {
  margin-bottom: var(--space-md);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: var(--space-lg) var(--space-md);
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.footer-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ========== Responsive: tablet+ ========== */
@media (min-width: 640px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
  }

  .portrait-slot {
    width: 7rem;
    height: 7rem;
  }

  .monogram {
    font-size: 1.65rem;
  }

  .header-inner {
    padding: var(--space-sm) var(--space-lg);
  }

  .hero {
    padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  }

  .content {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}

@media (min-width: 900px) {
  .site-nav {
    gap: 0.4rem 1.1rem;
  }

  .skill-list {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg) var(--space-xl);
  }
}

/* Print */
@media print {
  .site-header { position: static; }
  .site-nav { display: none; }
  .skip-link { display: none; }
  body { background: white; font-size: 11pt; }
  .section { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
