/* =============================================
   KARAN VYAS — PORTFOLIO
   Aesthetic: Sukin / Minimal / Glass / Airy
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Serif+Display&display=swap');

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

:root {
  /* Backgrounds */
  --bg:         #FAFAF7;
  --bg-white:   #FFFFFF;
  --bg-warm:    #F3F1EB;
  --bg-soft:    #EEF0EA;

  /* Glass */
  --glass:         rgba(255, 255, 255, 0.72);
  --glass-strong:  rgba(255, 255, 255, 0.90);
  --glass-border:  rgba(0, 0, 0, 0.07);
  --glass-border2: rgba(0, 0, 0, 0.11);

  /* Accent — sage green */
  --accent:     #4E7D5B;
  --accent-mid: #7BA68A;
  --accent-lo:  #EAF1EC;
  --accent-hi:  #3A6347;

  /* Text */
  --text:   #111820;
  --text-2: #687080;
  --text-3: #A0A8B0;

  /* Shadows */
  --sh-xs: 0 1px 6px rgba(0,0,0,0.05);
  --sh-sm: 0 4px 20px rgba(0,0,0,0.07);
  --sh:    0 8px 40px rgba(0,0,0,0.08);
  --sh-lg: 0 24px 72px rgba(0,0,0,0.10);

  /* Radii — bubbly */
  --r:   16px;
  --rl:  24px;
  --rxl: 32px;

  /* Fonts */
  --font:   'Poppins', system-ui, sans-serif;
  --font-d: 'Poppins', system-ui, sans-serif;

  --t: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-warm); }
::-webkit-scrollbar-thumb { background: var(--accent-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 66px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  background: rgba(250, 250, 247, 0.80);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--t);
}
.nav-logo {
  font-family: var(--font-d);
  font-size: 22px; font-weight: 400;
  color: var(--text); text-decoration: none;
  letter-spacing: 0;
}
.nav-logo em { color: var(--accent); font-style: italic; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 14px; font-weight: 400;
  color: var(--text-2); text-decoration: none;
  transition: var(--t); letter-spacing: 0.1px;
}
.nav-links a:hover { color: var(--text); }
.nav-resume {
  font-size: 13px; font-weight: 500;
  padding: 9px 22px; border-radius: 100px;
  background: var(--text); color: #fff;
  text-decoration: none; transition: var(--t);
  letter-spacing: 0.2px;
}
.nav-resume:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--sh-sm); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.wrap { max-width: 1160px; margin: 0 auto; }
section { padding: 96px 56px; }

.s-label {
  font-size: 11px; font-weight: 500; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px; display: block;
}
.s-title {
  font-family: var(--font-d);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 400; line-height: 1.15;
  color: var(--text); letter-spacing: -0.3px;
}
.s-sub {
  font-size: 17px; color: var(--text-2);
  line-height: 1.8; margin-top: 16px;
  max-width: 540px; font-weight: 300;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 100px; padding-bottom: 48px;
  background: var(--bg);
  position: relative; overflow: hidden;
}

/* Subtle botanical blob backgrounds */
#hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78,125,91,0.06) 0%, transparent 65%);
  top: -100px; right: -150px;
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78,125,91,0.04) 0%, transparent 70%);
  bottom: 0; left: -100px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 80px; align-items: center;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 28px;
  padding: 8px 18px;
  background: var(--accent-lo);
  border-radius: 100px;
}
.hero-name {
  font-family: var(--font-d);
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 400; line-height: 1.0;
  letter-spacing: -1px; color: var(--text);
  margin-bottom: 20px;
}
.hero-tagline {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-2); font-weight: 300;
  max-width: 480px; line-height: 1.75;
  margin-bottom: 48px;
}
.hero-tagline strong { color: var(--text); font-weight: 500; }

/* Stat pills */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 48px;
}
.stat-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 10px 20px;
  box-shadow: var(--sh-xs);
}
.stat-val {
  font-family: var(--font-d);
  font-size: 22px; color: var(--text);
  line-height: 1;
}
.stat-lbl { font-size: 12px; color: var(--text-3); font-weight: 400; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-p {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); color: #fff;
  padding: 14px 30px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  text-decoration: none; transition: var(--t);
  border: none; cursor: pointer; font-family: var(--font);
  letter-spacing: 0.2px;
}
.btn-p:hover { background: var(--accent); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.btn-s {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  padding: 14px 30px; border-radius: 100px;
  font-size: 14px; font-weight: 400;
  text-decoration: none; transition: var(--t);
  border: 1.5px solid var(--glass-border2);
  cursor: pointer; font-family: var(--font);
}
.btn-s:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Profile card */
.profile-card {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--rxl);
  padding: 36px 28px;
  display: flex; flex-direction: column;
  align-items: center; gap: 18px;
  backdrop-filter: blur(20px);
  box-shadow: var(--sh);
}
.profile-img-wrap {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 3px solid var(--bg-warm);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--sh-sm);
}
.profile-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-img-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-3);
  text-align: center; gap: 6px;
}
.profile-img-ph span { font-size: 28px; }
.profile-name {
  font-family: var(--font-d);
  font-size: 18px; color: var(--text);
  text-align: center;
}
.profile-role { font-size: 13px; color: var(--text-2); text-align: center; line-height: 1.5; font-weight: 300; }
.profile-chips { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.profile-chip {
  background: var(--bg-warm);
  border-radius: 100px; padding: 8px 14px;
  font-size: 11px; color: var(--text-2);
  text-align: center; display: flex;
  align-items: center; justify-content: center; gap: 6px;
}
.dot-green { width: 7px; height: 7px; border-radius: 50%; background: #5CB87A; flex-shrink: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   COMPETENCY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#competency { background: var(--bg-white); }

.comp-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 80px; align-items: start;
  margin-top: 64px;
}
.radar-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--rxl);
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow: var(--sh-sm);
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}

.comp-bars { display: flex; flex-direction: column; gap: 26px; }
.comp-item {}
.comp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.comp-name { font-size: 14px; font-weight: 500; color: var(--text); }
.comp-pct { font-size: 13px; color: var(--accent); font-weight: 500; }
.bar-track { height: 4px; background: var(--bg-warm); border-radius: 2px; overflow: hidden; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  border-radius: 2px; width: 0;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.comp-desc { font-size: 12px; color: var(--text-3); margin-top: 7px; line-height: 1.5; font-weight: 300; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROJECTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#projects { background: var(--bg); }

.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 48px 0 44px;
}
.f-btn {
  padding: 9px 22px; border-radius: 100px;
  border: 1.5px solid var(--glass-border2);
  background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 400;
  cursor: pointer; transition: var(--t);
  font-family: var(--font);
}
.f-btn:hover { border-color: var(--accent); color: var(--accent); }
.f-btn.active { background: var(--text); border-color: var(--text); color: #fff; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.p-card {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--rl);
  overflow: hidden; cursor: pointer;
  transition: var(--t);
  box-shadow: var(--sh-xs);
  display: flex; flex-direction: column;
}
.p-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg);
  border-color: rgba(78,125,91,0.20);
}
.p-card.hidden { display: none; }

.card-img {
  width: 100%; height: 210px;
  background: var(--bg-warm);
  overflow: hidden; position: relative; flex-shrink: 0;
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.p-card:hover .card-img img { transform: scale(1.07); }
.card-img-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: var(--text-3);
  font-size: 11px; text-align: center; padding: 20px;
}
.card-img-ph .ph { font-size: 36px; opacity: 0.35; }
.card-img-ph p { font-size: 10px; opacity: 0.6; line-height: 1.5; }

.org-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  padding: 5px 12px; border-radius: 100px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
}
.org-logo {
  height: 16px; width: auto;
  object-fit: contain;
}

.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-family: var(--font-d);
  font-size: 18px; color: var(--text);
  margin-bottom: 8px; line-height: 1.3;
}
.card-summary {
  font-size: 13px; color: var(--text-2);
  line-height: 1.7; margin-bottom: 16px;
  flex: 1; font-weight: 300;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tag {
  background: var(--bg-warm);
  color: var(--text-3);
  padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 400;
  position: relative; cursor: default;
  transition: var(--t);
}
.tag[data-tooltip]:hover { background: var(--accent-lo); color: var(--accent); }
.tag[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 5px 11px; border-radius: 8px;
  font-size: 10px; font-weight: 400;
  white-space: nowrap; z-index: 50;
  pointer-events: none;
  opacity: 0; transition: opacity 0.18s ease;
}
.tag[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
  z-index: 50; pointer-events: none;
  opacity: 0; transition: opacity 0.18s ease;
}
.tag[data-tooltip]:hover::after,
.tag[data-tooltip]:hover::before { opacity: 1; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}
.card-period { font-size: 11px; color: var(--text-3); font-weight: 300; }
.card-arrow { color: var(--accent); font-size: 18px; transition: transform 0.22s ease; }
.p-card:hover .card-arrow { transform: translateX(5px); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15, 18, 22, 0.55);
  backdrop-filter: blur(16px) saturate(120%);
  display: flex; align-items: flex-start; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto; padding: 48px 24px;
}
.overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-white);
  border: 1px solid var(--glass-border);
  border-radius: var(--rxl);
  width: 100%; max-width: 840px;
  box-shadow: var(--sh-lg);
  overflow: hidden; margin: auto;
  transform: translateY(32px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.46, 0.64, 1);
}
.overlay.open .modal { transform: translateY(0) scale(1); }

.modal-img {
  width: 100%; height: 300px;
  background: var(--bg-warm);
  position: relative; overflow: hidden;
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-img-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--text-3);
}
.modal-img-ph .ph-xl { font-size: 52px; opacity: 0.25; }

.m-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--t);
}
.m-close:hover { background: #fff; box-shadow: var(--sh-xs); }

.modal-body { padding: 44px 48px; }
.m-org { font-size: 11px; font-weight: 500; color: var(--accent); letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 10px; }
.m-title {
  font-family: var(--font-d);
  font-size: 30px; color: var(--text);
  letter-spacing: -0.3px; margin-bottom: 6px; line-height: 1.2;
}
.m-period { font-size: 13px; color: var(--text-3); margin-bottom: 32px; font-weight: 300; }
.m-hr { height: 1px; background: var(--glass-border); margin: 28px 0; }
.m-slabel {
  font-size: 10px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 16px;
}
.m-text { font-size: 15px; color: var(--text-2); line-height: 1.85; font-weight: 300; }
.m-bullets { display: flex; flex-direction: column; gap: 12px; }
.m-bullet {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 14px; color: var(--text-2); line-height: 1.65; font-weight: 300;
}
.bull { color: var(--accent); flex-shrink: 0; margin-top: 3px; font-size: 12px; }
.m-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.m-skill {
  background: var(--accent-lo);
  color: var(--accent-hi);
  padding: 6px 16px; border-radius: 100px;
  font-size: 12px; font-weight: 500;
}
.m-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gal-thumb {
  aspect-ratio: 4/3; border-radius: var(--r);
  overflow: hidden; background: var(--bg-warm);
}
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: transform 0.3s ease; }
.gal-thumb img:hover { transform: scale(1.06); }
.gal-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; font-size: 10px; color: var(--text-3);
  text-align: center; padding: 8px; line-height: 1.4;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACADEMIC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#academic { background: var(--bg-white); }

.academic-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; margin-top: 64px; align-items: start;
}
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 1px; background: var(--bg-warm);
}
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -36px; top: 8px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid var(--bg-white);
  box-shadow: 0 0 0 3px var(--accent-lo);
}
.tl-yr {
  font-size: 11px; font-weight: 500; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 5px;
}
.tl-title {
  font-family: var(--font-d);
  font-size: 16px; color: var(--text); margin-bottom: 4px;
}
.tl-org { font-size: 13px; color: var(--text-2); margin-bottom: 10px; font-weight: 300; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-chip {
  background: var(--bg-warm); color: var(--text-2);
  padding: 3px 12px; border-radius: 100px; font-size: 11px; font-weight: 400;
}

.extra-cards { display: flex; flex-direction: column; gap: 14px; }
.extra-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--rl);
  padding: 20px 24px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: var(--t); backdrop-filter: blur(10px);
}
.extra-card:hover { box-shadow: var(--sh-sm); transform: translateX(4px); }
.extra-icon { font-size: 24px; flex-shrink: 0; }
.extra-h4 { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.extra-p { font-size: 12px; color: var(--text-2); line-height: 1.6; font-weight: 300; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BEYOND
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#beyond { background: var(--bg); }

.beyond-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 64px;
}
.beyond-card {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--rl);
  padding: 34px 30px;
  transition: var(--t); box-shadow: var(--sh-xs);
}
.beyond-card:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.b-icon { font-size: 32px; margin-bottom: 18px; }
.b-title {
  font-family: var(--font-d);
  font-size: 17px; color: var(--text); margin-bottom: 12px;
}
.b-text { font-size: 13px; color: var(--text-2); line-height: 1.75; font-weight: 300; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTACT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#contact { background: var(--bg-white); }
.contact-wrap { text-align: center; max-width: 540px; margin: 0 auto; }
.contact-wrap .s-sub { margin: 0 auto 48px; }
.contact-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* Contact + Generator two-column layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* Generator card */
.gen-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.gen-title {
  font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin: 8px 0 10px;
}
.gen-desc {
  font-size: 13px; color: var(--text-lo);
  line-height: 1.65; margin-bottom: 16px;
}
.gen-textarea {
  width: 100%; min-height: 130px; resize: vertical;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-family: 'Poppins', sans-serif;
  font-size: 12px; line-height: 1.6; color: var(--text);
  background: var(--surface); outline: none;
  margin-bottom: 12px; transition: border-color 0.2s;
  box-sizing: border-box;
}
.gen-textarea:focus { border-color: var(--accent); background: #fff; }
.gen-btn {
  width: 100%; background: var(--accent); color: #fff;
  border: none; border-radius: 10px; padding: 13px;
  font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.2s; margin-bottom: 10px;
}
.gen-btn:hover { background: #3d6347; }
.gen-btn:disabled { background: var(--border); cursor: not-allowed; }
.gen-status { font-size: 12px; border-radius: 8px; margin-bottom: 10px; }
.gen-status.loading {
  display: block; background: #f0f7f2; color: var(--accent);
  border: 1px solid #c8dece; padding: 10px 14px;
}
.gen-status.error {
  display: block; background: #fff5f5; color: #c0392b;
  border: 1px solid #f5c6c6; padding: 10px 14px;
}
.gen-output-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; margin-top: 12px; }
.gen-output-sub { font-size: 11px; color: var(--text-lo); margin-bottom: 12px; }
.gen-output-projects { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.gen-output-projects .proj-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
}
.gen-output-projects .proj-chip strong { display: block; font-size: 11px; margin-bottom: 2px; }
.gen-output-projects .proj-chip span { font-size: 10px; color: var(--text-lo); }
.gen-print-btn {
  width: 100%; background: var(--surface); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px; padding: 11px;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.gen-print-btn:hover { background: var(--accent-lo); }

/* Spinner (used in gen-status) */
.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(78,125,91,0.3); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
.c-link {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-2);
  padding: 13px 24px; border-radius: 100px;
  text-decoration: none;
  font-size: 14px; font-weight: 400;
  transition: var(--t); backdrop-filter: blur(10px);
}
.c-link:hover { background: var(--text); color: #fff; border-color: var(--text); transform: translateY(-2px); box-shadow: var(--sh-sm); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--glass-border);
  padding: 30px 56px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-3); font-weight: 300;
}
footer a { color: var(--text-3); text-decoration: none; transition: var(--t); }
footer a:hover { color: var(--accent); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1),
              transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }
.fade-up:nth-child(6) { transition-delay: 0.40s; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACADEMIC TIMELINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* BEng modal sub-activities */
.acad-sub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.acad-sub-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px;
}
.acad-sub-yr    { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: 0.04em; }
.acad-sub-title { font-size: 12px; font-weight: 600; color: var(--text); }
.acad-sub-desc  { font-size: 11px; color: var(--text-lo); line-height: 1.55; margin-top: 2px; }

/* Horizontal timeline */
.tl-h-scroll {
  overflow-x: visible;
  padding: 12px 0 24px;
}

.tl-h-track {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative; padding: 0 24px;
  margin-top: 44px;
}

/* Horizontal connecting line — yr(22) + gap(6) + half-node(48) = 76px */
.tl-h-track::before {
  content: '';
  position: absolute;
  top: 76px;
  left: 72px; right: 72px;
  height: 2px;
  background: linear-gradient(90deg, rgba(78,125,91,0.18), rgba(78,125,91,0.45) 50%, rgba(78,125,91,0.18));
  z-index: 0;
}

.tl-h-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; width: 96px; flex-shrink: 0; position: relative; z-index: 1;
  cursor: pointer;
}

.tl-h-yr {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.05em; height: 22px; display: flex; align-items: center;
}

.tl-h-node {
  width: 96px; height: 96px; border-radius: 50%;
  background: #fff; border: 2.5px solid rgba(78,125,91,0.35);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(78,125,91,0.08), 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; cursor: pointer;
}
.tl-h-item:hover .tl-h-node {
  transform: scale(1.08);
  box-shadow: 0 0 0 5px rgba(78,125,91,0.15), 0 6px 22px rgba(78,125,91,0.18);
}

/* Arrow badge — all nodes, diagonal direction */
.tl-h-node::after {
  content: '↗';
  position: absolute; top: -3px; right: -3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* USYD primary — same ring colour as others */
.tl-h-node--primary {
  border-color: rgba(78,125,91,0.35);
  box-shadow: 0 0 0 4px rgba(78,125,91,0.08), 0 2px 10px rgba(0,0,0,0.06);
}
.tl-h-item:hover .tl-h-node--primary {
  box-shadow: 0 0 0 5px rgba(78,125,91,0.15), 0 6px 22px rgba(78,125,91,0.18);
}

.tl-h-logo { max-width: 70px; max-height: 62px; object-fit: contain; }

.tl-h-label {
  font-size: 11px; font-weight: 500; color: var(--text);
  text-align: center; line-height: 1.5;
}

/* Clickable sub-card in academic modals */
.acad-sub-card--link { cursor: pointer; }
.acad-sub-card--link:hover { border-color: var(--accent); background: var(--accent-lo); }
.sub-arrow { color: var(--accent); font-weight: 700; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .profile-card { display: none; }
  .comp-grid { grid-template-columns: 1fr; }
  .radar-card { max-width: 380px; margin: 0 auto; aspect-ratio: 1; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .academic-layout { grid-template-columns: 1fr; }
  .beyond-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  section { padding: 48px 24px; }
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .hero-stats { flex-direction: column; }
  .stat-pill { justify-content: center; }
  .projects-grid { grid-template-columns: 1fr; }
  .beyond-grid { grid-template-columns: 1fr; }
  .acad-sub-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 28px 24px; }
  .m-gallery { grid-template-columns: repeat(2, 1fr); }
  footer { flex-direction: column; gap: 10px; text-align: center; padding: 24px; }
}

/* Timeline vertical layout on narrow screens */
@media (max-width: 640px) {
  .tl-h-track {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 0 8px;
    margin-top: 24px;
    min-width: unset;
  }
  .tl-h-track::before {
    top: 22px;
    bottom: 48px;
    left: 56px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, rgba(78,125,91,0.18), rgba(78,125,91,0.45) 50%, rgba(78,125,91,0.18));
  }
  .tl-h-item {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
  }
  .tl-h-yr {
    writing-mode: horizontal-tb;
    width: auto;
    min-width: 52px;
    text-align: right;
    height: auto;
  }
  .tl-h-node {
    width: 72px; height: 72px; flex-shrink: 0;
  }
  .tl-h-logo { max-width: 52px; max-height: 46px; }
  .tl-h-label { text-align: left; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MARKDOWN MODAL CONTENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.m-markdown { font-size: 14px; line-height: 1.75; color: var(--text); }
.m-markdown h2 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin: 32px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.m-markdown h3 { font-size: 14px; font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.m-markdown p { margin: 0 0 14px; }
.m-markdown ul, .m-markdown ol { padding-left: 0; margin: 0 0 14px; list-style: none; }
.m-markdown li {
  position: relative; margin-bottom: 6px;
  padding: 8px 14px 8px 34px; background: var(--surface); border-radius: 10px;
  line-height: 1.6;
}
.m-markdown li::before {
  content: "→"; color: var(--accent); font-weight: 600;
  position: absolute; left: 13px; top: 8px;
}
.m-markdown strong { font-weight: 600; color: var(--text); }
.m-markdown blockquote {
  background: var(--bg-warm);
  border-left: 3px solid var(--accent-mid);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 20px 0;
  color: var(--text-2);
}
.m-markdown blockquote p { margin-bottom: 8px; }
.m-markdown blockquote p:last-child { margin-bottom: 0; }
.m-markdown blockquote strong { color: var(--text); }
.m-markdown em { font-style: italic; }
.m-markdown img {
  width: 100%; border-radius: 14px; margin: 16px 0;
  display: block; object-fit: cover; max-height: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.m-markdown figcaption, .m-markdown img + em {
  display: block; text-align: center; font-size: 11px;
  color: var(--text-lo); margin-top: -10px; margin-bottom: 16px;
}

/* Image orientation variants */
.m-markdown img { cursor: zoom-in; }
.m-markdown .md-img--thumb    { max-width: 180px; margin-left: auto; margin-right: auto; display: block; }
.m-markdown .md-img--portrait { max-width: 300px; margin-left: auto; margin-right: auto; display: block; }
.m-markdown .md-img--landscape { max-width: 100%; display: block; }
.m-markdown .md-img--medium  { max-width: 62%; display: block; margin-left: auto; margin-right: auto; }
.m-markdown .md-img--left  { float: left;  width: 48%; margin-right: 3%; margin-bottom: 8px; }
.m-markdown .md-img--right { float: right; width: 48%; margin-left: 3%;  margin-bottom: 8px; }

/* Multi-column inline layouts — images placed on the same line in markdown */
.m-markdown .md-img--col3 {
  display: inline-block; vertical-align: top;
  width: calc(33.33% - 4px); margin: 0 2px 8px;
  object-fit: cover;
}
.m-markdown .md-img--col2 {
  display: inline-block; vertical-align: top;
  width: calc(50% - 4px); margin: 0 2px 8px;
  object-fit: cover;
}

/* Gallery thumbnails — rendered inside .md-gallery-row */
.m-markdown .md-img--gallery {
  flex-shrink: 0;
  width: 160px; height: 110px;
  object-fit: cover; border-radius: 8px;
  transition: opacity 0.15s; cursor: zoom-in;
}
.m-markdown .md-img--gallery:hover { opacity: 0.82; }
.m-markdown .md-video--gallery {
  flex-shrink: 0;
  width: 220px; height: auto;
  border-radius: 8px;
}
.m-markdown .md-video--medium {
  max-width: 62%; display: block; margin: auto; height: auto; border-radius: 8px;
}
.m-markdown .md-video--landscape,
.m-markdown .md-video--left,
.m-markdown .md-video--right,
.m-markdown .md-video--thumb {
  max-width: 100%; height: auto; border-radius: 8px;
}

/* Horizontal scrollable gallery row */
.md-gallery-row {
  display: flex; gap: 6px;
  overflow-x: auto; padding-bottom: 8px; margin: 12px 0;
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.md-gallery-row::-webkit-scrollbar { height: 4px; }
.md-gallery-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

.m-markdown .md-clear { clear: both; }

/* Lessons Learned highlight box */
.lessons-box {
  background: var(--accent-lo, rgba(78,125,91,0.07));
  border: 1px solid rgba(78,125,91,0.22);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 28px 0 8px;
}
.lessons-box h2 { color: var(--accent); margin-bottom: 14px; }
.lessons-box strong { color: var(--accent); }

/* Video embed */
.m-markdown video {
  width: 100%; border-radius: 14px; margin: 16px 0;
  display: block; background: #000; max-height: 520px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.m-markdown .md-video--portrait { max-width: 320px; margin-left: auto; margin-right: auto; }

/* PDF download button */
.m-markdown .md-pdf-link {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 20px; margin: 16px 0;
  text-decoration: none; color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.m-markdown .md-pdf-link:hover { background: var(--accent-lo); border-color: var(--accent); color: var(--accent); }
.m-markdown .md-pdf-link::before { content: "📄"; font-size: 22px; flex-shrink: 0; }
.m-markdown .md-pdf-link span { font-size: 13px; font-weight: 500; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AI OVERVIEW ANIMATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ai-star {
  color: var(--accent);
  display: inline-block;
  animation: ai-pulse 1.8s ease-in-out infinite;
  margin-right: 5px;
}
@keyframes ai-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50%       { transform: scale(1.3) rotate(20deg); opacity: 1; }
}
.ai-typing::after {
  content: '|';
  color: var(--accent);
  font-weight: 300;
  animation: ai-blink 0.65s step-end infinite;
  margin-left: 1px;
}
@keyframes ai-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center; justify-content: center; cursor: zoom-out;
  padding: 32px;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 92vw; max-height: 90vh;
  object-fit: contain; border-radius: 12px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
}
.lb-close {
  position: fixed; top: 20px; right: 24px;
  background: rgba(255,255,255,0.15); border: none;
  color: #fff; font-size: 20px; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lb-close:hover { background: rgba(255,255,255,0.3); }
#lbCaption {
  color: rgba(255,255,255,0.7); font-size: 12px; font-style: italic;
  text-align: center; margin-top: 14px; max-width: 640px;
  line-height: 1.5;
}
