/* ================================================================
   Heet Gala Portfolio | styles.css
   Dark mode default · Light mode via :root.light class
   ================================================================ */

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  /* Dark (default) */
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface-2:    #22263a;
  --border:       #2e3148;
  --text:         #eaeaf0;
  --text-muted:   #9298b0;
  --accent:       #4f6fff;
  --accent-light: #1a2050;
  --accent-dark:  #2e4eff;
  --orange:       #ff6b35;
  --green:        #00e676;
  --radius:       18px;
  --radius-sm:    10px;
  --shadow:       0 2px 8px rgba(0,0,0,.4), 0 4px 20px rgba(0,0,0,.3);
  --shadow-hover: 0 6px 32px rgba(79,111,255,.25);
  --nav-h:        64px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --trans:        background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Light mode overrides */
:root.light {
  --bg:           #f0f0ed;
  --surface:      #ffffff;
  --surface-2:    #f7f7f5;
  --border:       #e4e4e0;
  --text:         #1a1a1a;
  --text-muted:   #6b6b6b;
  --accent:       #1a2fff;
  --accent-light: #e8ebff;
  --accent-dark:  #1020cc;
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.08);
  --shadow-hover: 0 6px 28px rgba(0,0,0,.14);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  padding-bottom: 80px;
  transition: var(--trans);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.1; }
em.accent { font-style: italic; color: var(--accent); }
p { line-height: 1.7; }

/* ── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(15,17,23,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  transition: box-shadow .3s, background .3s;
}
:root.light .nav { background: rgba(240,240,237,.92); }
.nav.scrolled { box-shadow: var(--shadow); }

.nav-brand { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.nav-initials {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.nav-initials-sm { width: 34px; height: 34px; font-size: .8rem; }
.nav-name  { font-weight: 600; font-size: .95rem; display: block; }
.nav-role  { font-size: .75rem; color: var(--text-muted); display: block; }

.nav-links { display: flex; gap: .2rem; }
.nav-link  {
  padding: .42rem .85rem; border-radius: 999px;
  font-size: .85rem; font-weight: 500;
  color: var(--text-muted); transition: all .2s;
}
.nav-link:hover, .nav-link.active { background: var(--accent); color: #fff; }

.nav-right { display: flex; align-items: center; gap: .5rem; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text); cursor: pointer;
  display: grid; place-items: center;
  font-size: 0; /* hide any inner text */
  transition: var(--trans), transform .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: scale(1.12) rotate(15deg); border-color: var(--accent); }
.theme-icon::before { font-size: 1rem; }
:root      .theme-icon::before { content: '☀️'; }
:root.light .theme-icon::before { content: '🌙'; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; display: block; transition: .3s; }

/* Mobile drawer */
.mobile-nav {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: var(--surface); border-bottom: 1px solid var(--border);
  flex-direction: column; padding: 1rem;
  transition: var(--trans);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: .75rem 1rem; font-size: 1rem; font-weight: 500; border-radius: var(--radius-sm); transition: all .2s; }
.mobile-nav a:hover { background: var(--accent-light); color: var(--accent); }

/* ── Sections ──────────────────────────────────────────────────── */
.section { max-width: 1160px; margin: 0 auto; padding: 5rem 1.5rem 2rem; }
.hero { padding-top: calc(var(--nav-h) + 3rem) !important; }
.section-header { text-align: center; margin-bottom: 3rem; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .5rem; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .75rem; }
.section-sub { color: var(--text-muted); max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* Sub-section header (Earlier Work, etc.) */
.subsection-header { text-align: center; margin: 3.5rem 0 1.5rem; }
.subsection-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .5rem; }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: var(--trans), transform .25s, box-shadow .25s;
  animation: fadeInUp .55s ease both; animation-play-state: paused;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 1rem; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero-top  { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; margin-bottom: 1rem; }
.hero-main { display: flex; flex-direction: column; gap: 1.25rem; }
.hero-side-card { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.memoji-placeholder {
  font-size: 2.2rem; width: 52px; height: 52px;
  background: var(--accent-light); border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--border);
}
.memoji-img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.hero-avatar-row { display: flex; align-items: center; margin-bottom: .25rem; }

.hero-heading { font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.15; }
.hero-sub { color: var(--text-muted); line-height: 1.75; font-size: .97rem; max-width: 560px; }
.hero-ctas { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.badge { display: inline-block; background: var(--accent-light); color: var(--accent); border: 1px solid rgba(79,111,255,.2); border-radius: 999px; padding: .4rem .9rem; font-size: .8rem; font-weight: 500; }

.hero-avatar-visual {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--accent-light), #1a2060);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
:root.light .hero-avatar-visual { background: linear-gradient(135deg, #e8ebff, #dde1ff); }
.avatar-blob {
  position: absolute; width: 120px; height: 120px;
  background: rgba(79,111,255,.18); border-radius: 60% 40% 70% 30%/50% 60% 40% 50%;
  animation: blob 6s ease-in-out infinite;
}
:root.light .avatar-blob { background: rgba(26,47,255,.1); }
@keyframes blob {
  0%,100% { border-radius: 60% 40% 70% 30%/50% 60% 40% 50%; }
  33%      { border-radius: 40% 60% 30% 70%/60% 40% 70% 30%; }
  66%      { border-radius: 70% 30% 50% 50%/30% 70% 50% 60%; }
}
.avatar-emoji { font-size: 3.5rem; position: relative; z-index: 1; }

.brands-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.brands-scroll { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.brands-scroll span { font-size: .72rem; padding: .25rem .6rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }

.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.stat-card { display: flex; flex-direction: column; justify-content: center; padding: 1.5rem; }
.stat-num  { font-family: var(--font-display); font-size: 2.4rem; font-style: italic; color: var(--accent); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* ── Ticker ─────────────────────────────────────────────────────── */
.ticker-wrap { overflow: hidden; background: #0a0c12; padding: .85rem 0; margin: 1rem 0; }
:root.light .ticker-wrap { background: #1a1a1a; }
.ticker { display: flex; gap: 2.5rem; align-items: center; white-space: nowrap; animation: ticker 35s linear infinite; width: max-content; }
.ticker span { font-size: .85rem; font-weight: 500; color: #e0e0e0; letter-spacing: .04em; }
.ticker .dot { color: var(--orange); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-wrap:hover .ticker { animation-play-state: paused; }

/* ── Projects ───────────────────────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-card.featured { grid-column: span 2; flex-direction: row; }

.proj-img {
  width: 100%; height: 200px; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.project-card.featured .proj-img { width: 340px; height: auto; min-height: 240px; }

/* Project image backgrounds */
.aws-img     { background: linear-gradient(135deg,#1a1a2e,#16213e,#0f3460); }
.ids-img     { background: linear-gradient(135deg,#0d0d1a,#1a0533,#2d0b69); }
.pentest-img { background: linear-gradient(135deg,#0a0a0a,#1a1a1a,#2d1f00); }
.scanner-img { background: linear-gradient(135deg,#0f1923,#1a2535,#2a1f4a); }
.cloud-fw-img{ background: linear-gradient(135deg,#003d1a,#005724,#007a33); }
.mips-img    { background: linear-gradient(135deg,#1a1206,#2d1f00,#4a3300); }
.adred-img   { background: linear-gradient(135deg,#1a0000,#2d0505,#4a0d0d); }
.algo-img    { background: linear-gradient(135deg,#0a1628,#0d2137,#103050); }
.food-img    { background: linear-gradient(135deg,#1a0a00,#2d1200,#4a1f00); }
.movie-img   { background: linear-gradient(135deg,#0a0a1a,#100020,#1a0030); }
.medical-img { background: linear-gradient(135deg,#001a1a,#002828,#003a3a); }
.sign-img    { background: linear-gradient(135deg,#1a0a1a,#2d0040,#400060); }

.proj-img::before {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 5rem; opacity: .22;
}
.aws-img::before     { content: "☁️"; } .ids-img::before      { content: "🧠"; }
.pentest-img::before { content: "🔍"; } .scanner-img::before  { content: "🐧"; }
.cloud-fw-img::before{ content: "🤖"; } .mips-img::before     { content: "⚙️"; }
.algo-img::before    { content: "📈"; } .food-img::before     { content: "🍕"; }
.movie-img::before   { content: "🎬"; } .medical-img::before  { content: "🏥"; }
.sign-img::before    { content: "👋"; }
.adred-img::before   { content: "🏰"; }

.proj-label {
  position: absolute; bottom: .75rem; left: .75rem;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: .7rem; font-weight: 500; letter-spacing: .05em;
  padding: .28rem .65rem; border-radius: 999px; backdrop-filter: blur(8px);
}
.proj-meta { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  padding: .25rem .65rem; border-radius: 999px;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid rgba(79,111,255,.15);
}
.tag-pub { background: #2a1500; color: #ff9d4d; border-color: rgba(255,157,77,.2); }
.tag-wip { background: #0a2a10; color: #4cdb7a; border-color: rgba(76,219,122,.2); }
:root.light .tag-pub { background: #fff3e0; color: #e65100; border-color: rgba(230,81,0,.2); }
:root.light .tag-wip { background: #e8f5e9; color: #2e7d32; border-color: rgba(46,125,50,.2); }
.proj-title { font-family: var(--font-display); font-size: 1.25rem; }
.proj-desc  { font-size: .88rem; color: var(--text-muted); line-height: 1.7; }
.proj-results { display: flex; gap: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.result-item { display: flex; flex-direction: column; }
.result-item strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); }
.result-item span   { font-size: .7rem; color: var(--text-muted); }
.proj-stack { font-size: .75rem; color: var(--text-muted); margin-top: auto; }

/* ── Research ───────────────────────────────────────────────────── */
.research-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.research-card { display: flex; flex-direction: column; gap: .75rem; position: relative; overflow: hidden; }
.wip-card { border-color: rgba(0,230,118,.2); }
.wip-card::after { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: var(--green); border-radius: 0 var(--radius) var(--radius) 0; }
.research-tag-row { display: flex; align-items: center; justify-content: space-between; }
.research-year  { font-size: .75rem; color: var(--text-muted); font-weight: 600; }
.research-icon  { font-size: 2rem; }
.research-title { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; }
.research-desc  { font-size: .87rem; color: var(--text-muted); line-height: 1.7; flex: 1; }
.research-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; flex-wrap: wrap; }
.wip-badge { font-size: .72rem; font-weight: 600; color: var(--green); padding: .25rem .65rem; border-radius: 999px; border: 1px solid rgba(0,230,118,.25); background: rgba(0,230,118,.08); }

/* ── Experience / Education ─────────────────────────────────────── */
.exp-grid { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto auto; gap: 1rem; }
.exp-header-card { grid-column: 1; grid-row: 1; }
.exp-list-card   { grid-column: 2; grid-row: 1/3; }
.edu-card        { grid-column: 1; grid-row: 2; }

.exp-title { font-size: clamp(1.6rem,3vw,2.4rem); margin: .75rem 0; }
.exp-intro { color: var(--text-muted); font-size: .9rem; }

.timeline { display: flex; flex-direction: column; gap: 2rem; }
.tl-item  { display: flex; gap: 1rem; }
.tl-dot   { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: .35rem; box-shadow: 0 0 0 3px var(--accent-light); }
.tl-body  { flex: 1; }
.tl-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.tl-date   { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.tl-company { font-size: .82rem; color: var(--accent); font-weight: 500; margin: .25rem 0 .6rem; }
.tl-bullets { display: flex; flex-direction: column; gap: .4rem; }
.tl-bullets li { font-size: .85rem; color: var(--text-muted); line-height: 1.6; padding-left: 1rem; position: relative; }
.tl-bullets li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-size: .8rem; }

.edu-list { display: flex; flex-direction: column; gap: 1.2rem; }
.edu-item { display: flex; gap: 1rem; align-items: flex-start; }
.edu-icon   { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.edu-school { font-weight: 600; font-size: .9rem; }
.edu-degree { font-size: .82rem; color: var(--text-muted); margin: .15rem 0; }
.edu-date   { font-size: .75rem; color: var(--accent); font-weight: 500; }

/* ── Certifications ─────────────────────────────────────────────── */
.certs-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.certs-grid > .cert-card { flex: 1 1 30%; max-width: calc((100% - 2rem) / 3); }
.certs-extra-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
  text-align: center; margin: 1.5rem 0 1rem;
}
.cert-card {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  text-align: center; position: relative; overflow: hidden; cursor: default;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.cert-card:hover .cert-glow { opacity: 1; }
.cert-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(79,111,255,.12),transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
:root.light .cert-card:hover .cert-glow { background: radial-gradient(circle at 50% 0%, rgba(26,47,255,.07),transparent 70%); }

.cert-logo {
  width: 64px; height: 64px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: .95rem; font-weight: 800; color: #fff; letter-spacing: -.01em;
}
.tcm-logo    { background: linear-gradient(135deg,#1a1a2e,#e63946); }
.comptia-logo{ background: linear-gradient(135deg,#c8102e,#ff6b35); }
.isc2-logo   { background: linear-gradient(135deg,#003087,#0057b8); }
.cwl-logo    { background: linear-gradient(135deg,#1a1a1a,#6c3483); }
.ine-logo    { background: linear-gradient(135deg,#00b4d8,#0077b6); }
.aws-logo    { background: linear-gradient(135deg,#ff9900,#232f3e); }
.ec-logo     { background: linear-gradient(135deg,#1a0505,#8b0000); }
.li-logo     { background: linear-gradient(135deg,#003d5b,#0077b5); }
.msme-logo   { background: linear-gradient(135deg,#1a2706,#3d6b0a); }

.cert-body    { display: flex; flex-direction: column; gap: .25rem; }
.cert-issuer  { font-size: .72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cert-name    { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.pursuing-badge { display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #ff9d4d; background: rgba(255,157,77,.1); border: 1px solid rgba(255,157,77,.3); border-radius: 999px; padding: .15rem .55rem; margin-top: .3rem; }
:root.light .pursuing-badge { color: #e65100; background: #fff3e0; border-color: rgba(230,81,0,.2); }
.pursuing-card { border-color: rgba(255,157,77,.2); }

/* ── Skills Arsenal ──────────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: .75rem; margin-bottom: 2rem; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.1rem .75rem; text-align: center;
  transition: var(--trans), transform .2s, box-shadow .2s, border-color .2s;
  animation: fadeInUp .5s ease both; animation-play-state: paused; cursor: default;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.skill-icon { font-size: 1.7rem; margin-bottom: .45rem; }
.skill-name { font-size: .75rem; font-weight: 600; color: var(--text-muted); }

.skills-categories { display: flex; flex-direction: column; gap: 1rem; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; transition: var(--trans); }
.skill-group-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .85rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.skill-tag { padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--border); font-size: .78rem; color: var(--text-muted); background: var(--surface-2); transition: all .2s; cursor: default; }
.skill-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.04); }

/* ── Blog Carousel ───────────────────────────────────────────────── */
.blog-wrap    { position: relative; }
.blog-carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; }
.blog-carousel::-webkit-scrollbar { display: none; }
.blog-card { flex: 0 0 360px; scroll-snap-align: start; padding: 0; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.blog-img { height: 180px; position: relative; flex-shrink: 0; overflow: hidden; }
.blog-img-1 { background: linear-gradient(135deg,#1a1a2e,#6c3483,#1a2fff); }
.blog-img-2 { background: linear-gradient(135deg,#1a0a00,#7f0000,#b71c1c); }
.blog-img-3 { background: linear-gradient(135deg,#0a1a14,#0d4030,#0f6b4f); }
.blog-img::before { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 4rem; opacity: .2; }
.blog-img-1::before { content: "🛡️"; }
.blog-img-2::before { content: "🌐"; }
.blog-img-3::before { content: "📦"; }
.blog-cat { position: absolute; bottom: .75rem; left: .75rem; background: rgba(0,0,0,.65); color: #fff; font-size: .7rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; backdrop-filter: blur(8px); }
.blog-body  { padding: 1.25rem; display: flex; gap: .85rem; flex: 1; }
.blog-avatar { width: 36px; height: 36px; background: var(--accent); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .75rem; flex-shrink: 0; }
.blog-content { display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.blog-title   { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; }
.blog-desc    { font-size: .8rem; color: var(--text-muted); line-height: 1.6; }
.blog-footer-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.blog-author { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.blog-read   { font-size: .75rem; color: var(--accent); font-weight: 600; }
.blog-more   { flex: 0 0 260px; display: grid; place-items: center; text-align: center; }
.blog-more-inner { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem; }
.blog-more-icon  { width: 56px; height: 56px; background: var(--text); color: var(--bg); border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; }
.blog-more-title { font-family: var(--font-display); font-size: 1.2rem; }
.blog-more-desc  { font-size: .82rem; color: var(--text-muted); line-height: 1.6; }

.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }
.carousel-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer; transition: all .2s; display: grid; place-items: center; }
.carousel-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.carousel-dots { display: flex; gap: .5rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; transition: all .2s; padding: 0; }
.dot.active { background: var(--accent); width: 20px; border-radius: 4px; }

/* ── Activities ──────────────────────────────────────────────────── */
.activity-sub-label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }
.activities-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.activity-card { display: flex; gap: 1rem; align-items: flex-start; }
.act-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: .1rem; }
.act-body { display: flex; flex-direction: column; gap: .3rem; }
.act-role { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.act-org  { font-weight: 700; font-size: .95rem; }
.act-desc { font-size: .83rem; color: var(--text-muted); line-height: 1.65; }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form-card { grid-column: 2; grid-row: 1/4; }
.contact-avatar { width: 56px; height: 56px; background: var(--accent); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1rem; margin-bottom: 1rem; }
.contact-heading { font-size: 1.8rem; margin-bottom: .75rem; }
.contact-form { display: flex; flex-direction: column; gap: .75rem; }
.form-input { width: 100%; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .9rem; background: var(--surface-2); color: var(--text); outline: none; transition: border-color .2s, background .2s; }
.form-input:focus { border-color: var(--accent); background: var(--surface); }
.form-textarea { min-height: 100px; resize: vertical; }

/* Social */
.social-links { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.social-link { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .88rem; font-weight: 500; transition: all .2s; }
.social-link:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.social-icon { width: 32px; height: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; display: grid; place-items: center; font-size: .82rem; font-weight: 700; flex-shrink: 0; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1.5rem; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-light); }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }
.btn-full { width: 100%; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 4rem; padding: 1.5rem; transition: var(--trans); }
.footer-inner { max-width: 1160px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-copy  { font-size: .82rem; color: var(--text-muted); }

/* ── Bottom Nav (mobile) ─────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,17,23,.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: .5rem 1rem; justify-content: space-around;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
  transition: background .3s;
}
:root.light .bottom-nav { background: rgba(255,255,255,.95); box-shadow: 0 -4px 24px rgba(0,0,0,.08); }
.bnav-link { display: flex; flex-direction: column; align-items: center; gap: .2rem; color: var(--text-muted); font-size: .65rem; font-weight: 500; padding: .35rem .5rem; border-radius: 10px; transition: all .2s; min-width: 44px; }
.bnav-link:hover, .bnav-link.active { color: var(--accent); background: var(--accent-light); }

/* ── Toast ───────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: .75rem 1.5rem; border-radius: 999px; font-size: .88rem; font-weight: 500; opacity: 0; transition: all .3s; z-index: 999; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .research-grid { grid-template-columns: 1fr 1fr; }
  .wip-card      { grid-column: 1/3; }
}

@media (max-width: 900px) {
  .hero-top        { grid-template-columns: 1fr; }
  .stats-row       { grid-template-columns: repeat(3,1fr); }
  .project-card.featured { flex-direction: column; grid-column: span 1; }
  .project-card.featured .proj-img { width: 100%; height: 200px; }
  .projects-grid   { grid-template-columns: 1fr; }
  .research-grid   { grid-template-columns: 1fr; }
  .wip-card        { grid-column: auto; }
  .exp-grid        { grid-template-columns: 1fr; }
  .exp-header-card { grid-column: 1; grid-row: auto; }
  .exp-list-card   { grid-column: 1; grid-row: auto; }
  .edu-card        { grid-column: 1; grid-row: auto; }
  .certs-grid > .cert-card { flex-basis: 45%; max-width: calc((100% - 1rem) / 2); }
  .activities-grid { grid-template-columns: repeat(2,1fr); }
  .contact-grid    { grid-template-columns: 1fr; }
  .contact-form-card { grid-column: 1; grid-row: auto; }
  .nav-links       { display: none; }
  .nav-toggle      { display: flex; }
  .bottom-nav      { display: flex; }
}

@media (max-width: 600px) {
  .nav       { padding: 0 1rem; }
  .section   { padding: calc(var(--nav-h) + 2rem) 1rem 1.5rem; }
  .hero      { padding-top: calc(var(--nav-h) + 2rem) !important; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .certs-grid > .cert-card { flex-basis: 45%; max-width: calc((100% - 1rem) / 2); }
  .activities-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(3,1fr); }
  .social-links { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .tl-header { flex-direction: column; gap: .2rem; }
  .blog-card { flex: 0 0 300px; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .theme-toggle { width: 34px; height: 34px; }
}

/* ══════════════════════════════════════════════════════
   About Section Styles
   ══════════════════════════════════════════════════════ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: start;
}
.about-main-card { }
.about-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.quick-facts { display: flex; flex-direction: column; gap: .9rem; list-style: none; }
.quick-facts li { display: flex; align-items: flex-start; gap: .75rem; }
.qf-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.quick-facts li div { display: flex; flex-direction: column; gap: .1rem; }
.quick-facts li strong { font-size: .88rem; font-weight: 600; }
.quick-facts li span { font-size: .8rem; color: var(--text-muted); }

.expertise-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.exp-tag {
  padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--accent); font-size: .78rem;
  color: var(--accent); background: var(--accent-light);
  font-weight: 500; transition: all .2s;
}
.exp-tag:hover { background: var(--accent); color: #fff; }

/* Nav initials small variant */
.nav-initials-sm { width: 34px; height: 34px; font-size: .8rem; }

/* Fix: ensure .section-title inside cards doesn't get section header margin */
.card .section-title { margin-bottom: .5rem; }

/* ══════════════════════════════════════════════════════
   Scroll padding: prevents content hiding under fixed nav
   ══════════════════════════════════════════════════════ */
html {
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

/* ══════════════════════════════════════════════════════
   About section responsive
   ══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   Standalone message pages (404 / thank you)
   Reuses .card, .btn, .nav-initials from the main site
   ══════════════════════════════════════════════════════ */

.msg-body   { display: flex; min-height: 100vh; padding-bottom: 0; }
.msg-page   { margin: auto; width: 100%; max-width: 620px; padding: 2rem 1.25rem; }
.msg-card   { text-align: center; padding: 2.75rem 2rem; }
/* These pages have a single card, so never gate it behind the scroll observer
   in script.js: it must render even if that script fails to load. */
.msg-card   { animation-play-state: running !important; }

.msg-brand  { display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 2rem; text-align: left; }
.msg-brand:hover .nav-name { color: var(--accent); }

.msg-code   { font-family: var(--font-display); font-size: 4.5rem; line-height: 1; color: var(--accent); }
.msg-icon   { font-size: 3rem; line-height: 1; }
.msg-title  { font-size: 2rem; margin: .5rem 0 .75rem; }
.msg-text   { color: var(--text-muted); margin-bottom: 1.75rem; font-size: .95rem; }
.msg-ctas   { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.msg-links  {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap;
  font-size: .85rem; color: var(--text-muted);
}
.msg-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .msg-card  { padding: 2rem 1.25rem; }
  .msg-code  { font-size: 3.5rem; }
  .msg-icon  { font-size: 2.5rem; }
  .msg-title { font-size: 1.6rem; }
  .msg-ctas  { flex-direction: column; }
}
