@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Light Theme (Default) */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-elevated: #f1f5f9;
  --surface-highlight: #e2e8f0;
  
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  
  --text: #0f172a;
  --muted: #64748b;
  --heading: #020617;
  
  /* Accent Colors (Dark Green) */
  --accent: #0f6846;
  --accent-hover: #0a4f33;
  --accent-glow: rgba(15, 104, 70, 0.15);
  
  --header-bg: rgba(248, 250, 252, 0.85);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  
  --fs-display: clamp(2.5rem, 4vw + 1rem, 5.5rem);
  --fs-h2: clamp(2rem, 3vw + 1rem, 3.5rem);
  --fs-h3: clamp(1.25rem, 1.5vw + 0.5rem, 1.75rem);
  --fs-lead: clamp(1.125rem, 1vw + 0.75rem, 1.35rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;

  --r-card: 2px;
  --r-pill: 99px;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  
  --container: 1400px;
  --gutter: clamp(1.5rem, 5vw, 3rem);
  --section: clamp(6rem, 10vw, 10rem);
}

/* Dark Theme overrides */
html.dark {
  --bg: #050507;
  --surface: #0a0a0c;
  --surface-elevated: #121216;
  --surface-highlight: #1a1a1f;
  
  --line: #1f1f26;
  --line-strong: #2d2d38;
  
  --text: #f1f5f9;
  --muted: #94a3b8;
  --heading: #ffffff;
  
  --accent: #1eb87d;
  --accent-hover: #26d291;
  --accent-glow: rgba(30, 184, 125, 0.2);

  --header-bg: rgba(5, 5, 7, 0.85);
}

/* Logo inversion for dark mode */
html.dark .brand img {
  filter: brightness(0) invert(1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.5s ease;
}

body { margin: 0; overflow-x: hidden; }

img, svg { display: block; max-width: 100%; }

/* Typography */
h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
  transition: color 0.5s ease;
}

h1 { font-size: var(--fs-display); letter-spacing: -0.04em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { margin: 0; color: var(--muted); transition: color 0.5s ease; }
strong { color: var(--text); font-weight: 600; }

a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent); }

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding-block: var(--section); border-bottom: 1px solid var(--line); transition: border-color 0.5s ease; }
.section--surface { background: var(--surface); transition: background 0.5s ease; }

.lead { font-size: var(--fs-lead); max-width: 65ch; line-height: 1.6; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px var(--accent);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--outline:hover {
  border-color: var(--text);
  background: var(--surface-highlight);
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  transition: background 0.5s ease, border-color 0.5s ease;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.brand img { height: 42px; width: auto; transition: filter 0.5s ease; }

.nav__list { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav__list a { font-size: 0.875rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; transition: color 0.3s ease; }
.nav__list a:hover { color: var(--text); }
.nav__list a.active { color: var(--accent); }

.header__actions { display: flex; align-items: center; gap: 1rem; }

.lang-switch { display: flex; gap: 0.5rem; }
.lang-switch img { width: 20px; height: 14px; border-radius: 2px; opacity: 0.5; transition: opacity 0.3s; }
.lang-switch a:hover img, .lang-switch a[aria-current="true"] img { opacity: 1; }

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s, color 0.3s;
}
.theme-toggle:hover { background: var(--surface-elevated); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  text-align: center;
}
.hero h1 { max-width: 1100px; margin: 0 auto; }
.hero h1 .hl { color: var(--accent); }
.hero .lead { margin: 2rem auto 3rem; color: var(--muted); }
.hero__actions { display: flex; gap: 1rem; justify-content: center; }

/* Cinematic Background Glow */
.bg-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* Bento Grid */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(350px, auto);
  gap: 1.5rem;
  margin-top: 4rem;
}
.tile {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.6s var(--ease-out), border-color 0.4s, background 0.5s;
  padding: 2.5rem;
  isolation: isolate;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}
.tile__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.15;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  mix-blend-mode: luminosity;
}
html.dark .tile__bg { opacity: 0.25; }
.tile:hover .tile__bg {
  opacity: 0.3;
  transform: scale(1.03);
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--surface) 20%, transparent);
  transition: background 0.5s ease;
}
.tile h3 { font-size: 1.75rem; margin-bottom: 1rem; color: var(--text); }
.tile p { font-size: 1.05rem; max-width: 45ch; line-height: 1.6; }

.tile--span-8 { grid-column: span 8; }
.tile--span-4 { grid-column: span 4; }
.tile--span-12 { grid-column: span 12; flex-direction: row; align-items: center; gap: 4rem; }

@media (max-width: 1024px) {
  .bento { grid-template-columns: 1fr; }
  .tile--span-8, .tile--span-4, .tile--span-12 { grid-column: span 1; }
  .tile--span-12 { flex-direction: column; align-items: flex-start; gap: 2rem; }
}

/* Seals */
.seals { padding: 4rem 0; border-bottom: 1px solid var(--line); }
.seals p { text-align: center; font-size: 0.875rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 2rem; color: var(--line-strong); }
.seals__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 4rem; list-style: none; padding: 0; margin: 0; }
.seals__list img { height: 45px; opacity: 0.6; filter: grayscale(100%); mix-blend-mode: multiply; transition: opacity 0.4s, filter 0.5s; }
.seals__list img:hover { opacity: 1; filter: grayscale(0%); }

html.dark .seals__list img {
  filter: grayscale(100%) invert(1);
  mix-blend-mode: screen;
  opacity: 0.6;
}
html.dark .seals__list img:hover {
  opacity: 1;
  filter: grayscale(100%) invert(1) brightness(1.5);
}

/* Scroll Reveals (Intersection Observer) */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Cred Grid */
.cred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.cred {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--r-card);
  transition: border-color 0.3s, background 0.5s;
}
.cred:hover { border-color: var(--line-strong); }
.cred img { width: 100%; border-radius: 2px; margin-bottom: 1.5rem; transition: filter 0.5s; }
.cred h3 { font-size: 1.125rem; margin-bottom: 0.5rem; color: var(--text); }
.cred { display: flex; flex-direction: column; }
.cred img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.cred__tag { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; font-weight: 700; }
.cred__meta { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--muted, inherit); border-top: 1px solid var(--line); padding-top: 1rem; }
.cred__meta strong { color: var(--text); font-weight: 600; }

/* Education Timeline */
.timeline { list-style: none; margin: 0 0 5rem; padding: 0 0 0 2rem; border-left: 1px solid var(--line-strong); display: grid; gap: 2.5rem; max-width: 860px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-2rem - 6px); top: 0.45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--surface); }
.timeline__year { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.timeline h3 { font-size: 1.2rem; margin: 0.35rem 0 0.4rem; color: var(--text); }
.timeline p { font-size: 0.95rem; margin: 0; }

/* Text Blocks */
.text-block { max-width: 800px; margin-bottom: 4rem; }
.text-block h2 { margin-bottom: 1.5rem; }
.text-block p { margin-bottom: 1.5rem; font-size: 1.125rem; color: var(--muted); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.text-block p:last-child { margin-bottom: 0; }

/* P-DTR Official Badge */
.pdtr-badge { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; padding: 4rem 0; }
.pdtr-badge__label { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.pdtr-badge__link { display: inline-block; background: #ffffff; padding: 1rem; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,0.12); transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.pdtr-badge__link:hover { transform: translateY(-4px); box-shadow: 0 18px 40px var(--accent-glow); }
.pdtr-badge__link img { width: 180px; height: auto; display: block; }
.pdtr-badge__caption { font-size: 0.875rem; color: var(--muted); }
.pdtr-badge__caption a { color: var(--accent); text-decoration: underline; }
