/* =========================================================
   SAGELLE — Personal Website
   Shared stylesheet
   Palette: Gold #D4AF37 · Deep Blue #0A1F44 · White · Light Grey #F5F5F5
   Fonts:   Playfair Display (headings) · Inter (body)
   ========================================================= */

/* ---------- 1. CSS Variables (theme tokens) ---------- */
:root {
  --gold: #D4AF37;
  --gold-soft: #e8cf7a;
  --blue: #0A1F44;
  --blue-light: #16306b;
  --white: #FFFFFF;
  --grey: #F5F5F5;
  --grey-mid: #e5e7eb;
  --text: #1a2238;
  --muted: #5b6478;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 31, 68, 0.10);
  --shadow-lg: 0 16px 40px rgba(10, 31, 68, 0.14);

  --container: 1140px;
  --transition: 0.25s ease;
}

/* ---------- 2. Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body, html { overflow-x: hidden; }

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--gold);
  color: var(--blue);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* Visible focus styles for keyboard users */
*:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.nav__links a:focus-visible {
  outline-offset: 4px;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--blue);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { color: var(--text); }

/* ---------- 3. Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}
.section--alt { background: var(--grey); }
.section--dark { background: var(--blue); color: var(--white); }
.section--dark h2,
.section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.85); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.section-head p {
  color: var(--muted);
  margin-top: 0.75rem;
}

/* Thin gold divider */
.divider-gold {
  width: 60px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 1rem auto;
}

/* ---------- 4. Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--grey-mid);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.02em;
}
.nav__brand span { color: var(--gold); }

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue);
  position: relative;
  padding: 0.25rem 0;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--gold); }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--blue);
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.btn--gold {
  background: var(--gold);
  color: var(--blue);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: transparent;
  color: var(--gold);
}
.btn--outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn--outline:hover {
  background: var(--blue);
  color: var(--white);
}
.section--dark .btn--outline,
.hero .btn--outline {
  color: var(--white);
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}
.section--dark .btn--outline:hover,
.hero .btn--outline:hover {
  background: var(--gold);
  color: var(--blue);
  border-color: var(--gold);
}

/* ---------- 6. Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: var(--white);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 70%);
  border-radius: 50%;
}
.hero__inner { position: relative; max-width: 820px; }
.hero__eyebrow {
  display: inline-block;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 span { color: var(--gold); }
.hero__tagline {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
  max-width: 640px;
}
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Compact hero for sub-pages */
.hero--compact { padding: 4rem 0 3rem; }
.hero--compact h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

/* Hero with cover image (home page) */
.hero--with-image { padding: 5rem 0 5rem; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
}
.hero__content { position: relative; z-index: 2; }
.hero__image {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  border: 4px solid rgba(212,175,55,0.4);
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__image-frame {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  right: -1.5rem; bottom: -1.5rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__image { max-width: 360px; margin: 0 auto; }
  .hero__image-frame { display: none; }
}

/* ---------- 7. Cards & grids ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-soft);
}
.card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(212,175,55,0.12);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- 8. Bio / About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.about__photo {
  background: var(--grey);
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  border: 1px solid var(--grey-mid);
}
.about__photo-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--gold);
  position: relative;
}
.about__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.about p + p { margin-top: 1rem; }

/* ---------- 9. Timeline (education / experience) ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--gold);
}
.timeline__item { position: relative; padding-bottom: 2rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -2.6rem;
  top: 0.4rem;
  width: 12px; height: 12px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.2);
}
.timeline__date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timeline__title { margin: 0.25rem 0 0.4rem; }
.timeline__place { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.5rem; }

/* ---------- 10. Lists ---------- */
.list-checks { list-style: none; }
.list-checks li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.list-checks li::before {
  content: '✦';
  position: absolute;
  left: 0; top: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- 11. Skills tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  color: var(--blue);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.tag:hover {
  background: var(--gold);
  color: var(--blue);
  border-color: var(--gold);
}

/* ---------- 12. Video / portfolio cards ---------- */
.video-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--grey-mid);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: block;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.video-card__thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card__thumb::after {
  content: '▶';
  width: 56px; height: 56px;
  background: var(--gold);
  color: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.video-card__thumb--split::after { display: none; }
.video-card__thumb--split img {
  position: static;
  width: 50%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}
.video-card__body { padding: 1.25rem 1.25rem 1.5rem; }
.video-card__body h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.video-card__body p { color: var(--muted); font-size: 0.9rem; }

/* Portfolio (Elle Zeka) */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.portfolio-item {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--grey), #e9ecf2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  border: 1px solid var(--grey-mid);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.portfolio-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.portfolio-item:nth-child(3n+1) { background: linear-gradient(135deg, #f1ecde, #e9d8a6); }
.portfolio-item:nth-child(3n+2) { background: linear-gradient(135deg, #dde3ef, #b8c6e3); }
.portfolio-item:nth-child(3n+3) { background: linear-gradient(135deg, var(--grey), #d8dde7); }

/* ---------- 13. Testimonials ---------- */
.quote {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-mid);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.quote::before {
  content: '"';
  position: absolute;
  top: 0.4rem; left: 1rem;
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
}
.quote__text { font-style: italic; color: var(--text); margin-bottom: 1rem; padding-left: 0.5rem; }
.quote__author { font-weight: 600; color: var(--blue); padding-left: 0.5rem; }
.quote__role { color: var(--muted); font-size: 0.9rem; padding-left: 0.5rem; }

/* ---------- 14. CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p {
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ---------- 15. Footer ---------- */
.footer {
  background: var(--blue);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 2rem;
  text-align: center;
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.footer__brand span { color: var(--gold); }
.footer__socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.5rem 0;
  list-style: none;
}
.footer__socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all var(--transition);
}
.footer__socials a:hover {
  background: var(--gold);
  color: var(--blue);
  transform: translateY(-2px);
}
.footer__copy { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ---------- Languages list ---------- */
.languages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}
.language {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.language:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.language__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.35rem;
}
.language__level {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .languages { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .languages { grid-template-columns: 1fr; }
}

/* Feature card variant — for highlighted research card */
.card--feature {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
  border-color: var(--gold);
}
.card--feature h3 { color: var(--white); }
.card--feature p { color: rgba(255,255,255,0.92); }
.card--feature strong { color: var(--gold); }
.card--feature .card__icon {
  background: rgba(212,175,55,0.25);
  color: var(--gold);
}

/* ---------- 16. Stats row ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat__number {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}
.stat__label {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section--dark .stat__label { color: rgba(255,255,255,0.75); }

/* ---------- 17. Two-column content ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---------- 18. Responsive ---------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .about, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .stat__number { font-size: 2rem; }

  /* Hero eyebrow — relax letter-spacing on small screens to avoid awkward wraps */
  .hero__eyebrow {
    letter-spacing: 0.08em;
    font-size: 0.72rem;
  }
  .section-head .eyebrow {
    letter-spacing: 0.1em;
    font-size: 0.72rem;
  }

  /* Mobile nav */
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--grey-mid);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .hero__cta { flex-direction: column; gap: 0.75rem; }
  .hero__cta .btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .btn { padding: 0.7rem 1.4rem; font-size: 0.9rem; }
  .hero__cta .btn { padding: 0.75rem 1.25rem; }
  h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .hero__tagline { font-size: 1rem; }
}
