/* Fahmina Binte Ibrahim — portfolio styles */
:root {
  --ink: #eef1f8;
  --ink-soft: #dbe0ea;
  --muted: #b8c0d0;
  --bg: #3d4559;
  --panel: #48516a;
  --panel-2: #535d77;
  --line: #5e6984;
  --radius: 16px;
  --max: 1100px;
  --rail: 76px;
  --side: 256px;

  /* one colour per section */
  --c-about: #14b8a6;
  --c-edu: #818cf8;
  --c-exp: #fb7158;
  --c-proj: #f59e0b;
  --c-pub: #a78bfa;
  --c-hon: #f472b6;
  --c-train: #22d3ee;
  --c-skill: #60a5fa;
  --c-aff: #a3e635;
  --c-contact: #4ade80;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 8px; color-scheme: dark; }
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; line-height: 1.2; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Scroll progress bar ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0; z-index: 300;
  background: linear-gradient(90deg, var(--c-about), var(--c-edu), var(--c-pub), var(--c-hon), var(--c-proj));
}

/* ---------- Compact left sidebar (expands on hover) ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail); z-index: 100;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px 18px;
  overflow: hidden; white-space: nowrap;
  transition: width 0.25s ease, box-shadow 0.25s ease, transform 0.3s ease;
}
.sidebar:hover, .sidebar:focus-within { width: var(--side); box-shadow: 10px 0 34px rgba(0,0,0,0.35); }
.lbl { opacity: 0; transition: opacity 0.15s ease; }
.sidebar:hover .lbl, .sidebar:focus-within .lbl { opacity: 1; transition-delay: 0.08s; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 0 2px 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mini {
  position: relative; overflow: hidden; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--c-about), var(--c-edu), var(--c-pub), var(--c-hon), var(--c-proj), var(--c-about));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: "Source Serif 4", serif; font-weight: 700;
}
.mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.side-brand .nm { font-family: "Source Serif 4", serif; font-weight: 700; font-size: 1rem; line-height: 1.25; color: var(--ink); }
.side-brand .sub { font-size: 0.75rem; color: var(--muted); }
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-links a {
  --c: var(--c-about);
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--ink-soft); font-size: 0.93rem; font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.nav-links a .ic {
  width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center;
  color: var(--c); transition: color 0.2s, transform 0.25s;
}
.nav-links a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-links a:hover { background: color-mix(in srgb, var(--c) 18%, var(--panel)); color: var(--ink); }
.nav-links a:hover .ic { transform: scale(1.15) rotate(-6deg); }
.nav-links a.active { background: var(--c); color: #0b1020; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 40%, transparent); }
.nav-links a.active .ic { color: #0b1020; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.sidebar:hover .side-foot, .sidebar:focus-within .side-foot { flex-direction: row; }
.side-foot a { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: all 0.2s; }
.side-foot a:hover { background: var(--c-pub); color: #fff; border-color: var(--c-pub); transform: translateY(-2px); }
.side-foot svg { width: 16px; height: 16px; fill: currentColor; }
.page { margin-left: var(--rail); }

.topbar { display: none; }
.menu-btn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 11px; font-size: 1.15rem; cursor: pointer; color: var(--ink); }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 90; }
.overlay.show { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 96px 0 140px;
  background: linear-gradient(120deg, #0b4f55, #0f766e 30%, #3730a3 70%, #6d28d9);
  background-size: 220% 220%;
  animation: heroShift 16s ease-in-out infinite alternate;
}
@keyframes heroShift { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.45; pointer-events: none; animation: float 14s ease-in-out infinite alternate; }
.blob.b1 { width: 340px; height: 340px; background: #f59e0b; top: -80px; right: 8%; }
.blob.b2 { width: 280px; height: 280px; background: #ec4899; bottom: -60px; left: 30%; animation-delay: -5s; }
.blob.b3 { width: 220px; height: 220px; background: #22d3ee; top: 30%; left: -60px; animation-delay: -9s; }
@keyframes float { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,-30px) scale(1.12); } }
.hero svg.contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.16; pointer-events: none; animation: drift 30s linear infinite alternate; }
@keyframes drift { from { transform: translateX(-20px); } to { transform: translateX(20px); } }
.hero-inner { position: relative; display: flex; align-items: center; gap: 48px; }
.avatar-ring {
  flex: 0 0 196px; height: 196px; border-radius: 50%; padding: 5px;
  background: conic-gradient(#fbbf24, #f472b6, #a78bfa, #22d3ee, #34d399, #fbbf24);
  animation: spin 12s linear infinite;
}
.avatar {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: #0f3f4a; display: flex; align-items: center; justify-content: center;
  font-family: "Source Serif 4", serif; font-size: 3.4rem; font-weight: 600;
  border: 4px solid rgba(255,255,255,0.9);
  animation: spin 12s linear infinite reverse;  /* keeps the photo upright */
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes spin { to { transform: rotate(360deg); } }
.hello { display: inline-block; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,0.16); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); margin-bottom: 10px; }
.typed { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 600; margin-bottom: 14px; min-height: 1.6em; }
.typed .word { background: linear-gradient(90deg, #fde68a, #f9a8d4, #a5f3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.typed .cursor { display: inline-block; width: 2px; height: 1.1em; background: #fde68a; margin-left: 3px; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .role { opacity: 0.92; margin-bottom: 14px; }
.hero .tagline { max-width: 640px; opacity: 0.9; margin-bottom: 26px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 600; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn-solid { background: #fff; color: #3730a3; }
.btn-glass { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.18); }
.btn-glass:hover { background: rgba(255,255,255,0.26); }

/* ---------- Quick section bar (overlapping hero) ---------- */
.quicknav {
  position: relative; z-index: 5; margin-top: -60px;
  background: var(--panel); border-radius: 20px; padding: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.qbtn {
  --c: var(--c-about);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 7px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 600; color: var(--ink-soft);
  background: color-mix(in srgb, var(--c) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--panel));
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.qbtn .qi {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  background: var(--c); color: #0b1020; display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s;
}
.qbtn .qi svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.qbtn:hover { background: var(--c); color: #0b1020; transform: translateY(-3px); box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 35%, transparent); }
.qbtn:hover .qi { background: rgba(255,255,255,0.25); transform: rotate(-10deg) scale(1.08); }

/* ---------- Sections ---------- */
section { --c: var(--c-about); padding: 84px 0 40px; }
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.badge {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px;
  background: color-mix(in srgb, var(--c) 18%, var(--panel)); color: var(--c);
  display: flex; align-items: center; justify-content: center;
}
.badge svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.section-title { font-size: 2rem; }
.section-title + .bar { display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: 8px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, var(--panel))); }
.section-intro { color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; }

/* Education */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.edu {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s;
}
.edu::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--c-edu), #818cf8, #c4b5fd); }
.edu:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(79,70,229,0.14); }
.edu .deg-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(129,140,248,0.16); color: var(--c-edu); margin-bottom: 12px; }
.edu h3 { font-size: 1.2rem; margin-bottom: 6px; }
.edu .school { color: var(--c-edu); font-weight: 600; font-size: 0.95rem; }
.edu .where { color: var(--muted); font-size: 0.88rem; }
.edu .when { margin-top: 12px; font-size: 0.86rem; color: var(--ink-soft); font-weight: 500; }
.edu .adv { margin-top: 4px; font-size: 0.88rem; color: var(--ink-soft); }
.now { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: #4ade80; background: rgba(74,222,128,0.14); padding: 2px 9px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.6); } 100% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } }

/* Experience: clickable expandable cards */
.exp-list { display: flex; flex-direction: column; gap: 14px; }
.exp {
  --x: var(--c-exp);
  background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--x);
  border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.25s, transform 0.25s;
}
.exp:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.3); transform: translateX(4px); }
.exp-head { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: none; border: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.org-dot { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: #0b1020; background: var(--x); }
.exp-main { flex: 1; }
.exp-title { font-weight: 700; font-size: 1.05rem; }
.exp-org { color: var(--x); font-weight: 600; font-size: 0.92rem; }
.exp-date { color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.chev { width: 22px; height: 22px; flex: 0 0 22px; stroke: var(--muted); fill: none; stroke-width: 2; transition: transform 0.3s; }
.exp.open .chev { transform: rotate(180deg); }
.exp-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.exp.open .exp-body { grid-template-rows: 1fr; }
.exp-body > div { overflow: hidden; }
.exp-body ul { margin: 0 22px 20px 84px; color: var(--ink-soft); }
.exp-body li { margin-bottom: 6px; }
.hint { font-size: 0.85rem; color: var(--muted); margin: -18px 0 18px; }

/* Projects */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.25s; transform-style: preserve-3d; will-change: transform;
}
.card:hover { box-shadow: 0 20px 40px rgba(217,119,6,0.16); }
.card-img { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 0.9rem; position: relative; overflow: hidden; }
.card:nth-child(3n+1) .card-img { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.card:nth-child(3n+2) .card-img { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.card:nth-child(3n+3) .card-img { background: linear-gradient(135deg, #10b981, #0f766e); }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.94rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(245,158,11,0.15); color: #fcd34d; }
.card-links { display: flex; gap: 16px; font-size: 0.9rem; font-weight: 600; color: var(--c-proj); }
.card-links a:hover { text-decoration: underline; }
.card.placeholder { border-style: dashed; }
button.card-img { border: none; padding: 0; width: 100%; cursor: zoom-in; font: inherit; }
.card-img.fig { background: #fff !important; }
.card-img.fig img { object-fit: contain; padding: 8px; }
.zoom { position: absolute; right: 10px; bottom: 10px; font-size: 0.75rem; font-weight: 600; color: #fff; background: rgba(23,32,51,0.75); padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity 0.2s; }
.card:hover .zoom { opacity: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-meta .now { margin-left: 0; }
.paper-no { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-proj); }
.status { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.proj-sub { font-family: "Inter", sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--c-proj); margin: 40px 0 18px; display: flex; align-items: center; gap: 12px; }
.proj-sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.done { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: #93c5fd; background: rgba(96,165,250,0.16); padding: 2px 9px; border-radius: 999px; }
.diss {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 24px 26px; margin-bottom: 26px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c-proj) 22%, var(--panel)), color-mix(in srgb, var(--c-hon) 18%, var(--panel)));
  border: 1px solid color-mix(in srgb, var(--c-proj) 40%, var(--panel));
}
.diss-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--c-proj); }
.diss h3 { font-size: 1.35rem; margin: 6px 0 8px; }
.diss p { color: var(--ink-soft); font-size: 0.95rem; }


/* ---------- Project cards: clickable ---------- */
.card[data-project] { cursor: pointer; }
.card[data-project]:focus-visible { outline: 3px solid var(--c-proj); outline-offset: 3px; }
.status { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.status .more { color: var(--c-proj); font-weight: 600; white-space: nowrap; }
.card:hover .status .more { text-decoration: underline; }

/* ---------- Project detail view ---------- */
.pmodal { position: fixed; inset: 0; z-index: 350; background: rgba(10,14,26,0.72); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 34px 18px; overflow-y: auto; }
.pmodal.show { display: flex; animation: lbIn 0.2s ease; }
.pm-panel { position: relative; width: 100%; max-width: 960px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); animation: pmUp 0.28s ease; }
@keyframes pmUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.pm-close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.pm-close:hover { background: var(--c-proj); color: #0b1020; }
.pm-body { padding: 30px 36px 34px; }
.d-head { padding-right: 46px; margin-bottom: 20px; }
.d-head .card-meta { justify-content: flex-start; gap: 12px; }
.d-head h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 6px 0 12px; }
.d-fig { margin: 0 0 24px; }
.d-main { display: block; width: 100%; border: none; padding: 10px; border-radius: 14px; background: #fff; cursor: zoom-in; }
.d-main img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.d-fig figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 8px; text-align: center; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 6px; }
.thumb { flex: 0 0 auto; width: 110px; height: 74px; border-radius: 10px; border: 2px solid transparent; background: #fff; padding: 3px; cursor: pointer; opacity: 0.7; transition: opacity 0.2s, border-color 0.2s, transform 0.2s; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb.on { border-color: var(--c-proj); opacity: 1; }
.metrics { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.metric { flex: 1 1 160px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--c-proj); border-radius: 12px; padding: 12px 16px; }
.metric span { display: block; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.metric b { font-family: "Source Serif 4", serif; font-size: 1.35rem; color: var(--ink); }
.pm-body section.d-sec { padding: 0; margin-bottom: 22px; background: none; border: none; }
.d-sec h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-proj); margin-bottom: 8px; }
.d-sec p, .d-sec li { color: var(--ink-soft); font-size: 0.97rem; }
.d-sec p + p { margin-top: 10px; }
.d-sec ul { margin-left: 20px; }
.d-sec li { margin-bottom: 6px; }
.d-sec b { color: var(--ink); }
.d-foot { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 0.9rem; }
body.noscroll { overflow: hidden; }
@media (max-width: 600px) { .pmodal { padding: 0; } .pm-panel { border-radius: 0; min-height: 100%; } .pm-body { padding: 22px 18px 28px; } .thumb { width: 88px; height: 60px; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(10,14,26,0.88); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 30px; cursor: zoom-out; }
.lightbox.show { display: flex; animation: lbIn 0.2s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; background: #fff; padding: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox p { color: #e5e7eb; margin-top: 14px; font-size: 0.95rem; text-align: center; max-width: 800px; }
.lb-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 50%; border: none; font-size: 1.4rem; cursor: pointer; background: rgba(255,255,255,0.15); color: #fff; }

/* Publications with filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.fbtn { font: inherit; font-size: 0.88rem; font-weight: 600; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); cursor: pointer; transition: all 0.2s; }
.fbtn:hover { border-color: var(--c-pub); color: var(--c-pub); }
.fbtn.on { background: var(--c-pub); border-color: var(--c-pub); color: #0b1020; box-shadow: 0 6px 16px rgba(139,92,246,0.3); }
.pubs { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.pub {
  display: flex; gap: 16px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.3s;
}
.pub:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(139,92,246,0.12); }
.pub.hide { display: none; }
.pub-ic { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.pub-ic svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pub[data-type="journal"] .pub-ic { background: rgba(167,139,250,0.16); color: #c4b5fd; }
.pub[data-type="poster"] .pub-ic { background: rgba(244,114,182,0.16); color: #f9a8d4; }
.pub-type { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.pub[data-type="journal"] .pub-type { color: #c4b5fd; }
.pub[data-type="poster"] .pub-type { color: #f9a8d4; }
.pub .txt { color: var(--ink-soft); font-size: 0.95rem; }
.pub .me { color: var(--ink); font-weight: 700; }
.pub .title { color: var(--ink); font-weight: 600; }
.doi { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 0.85rem; font-weight: 600; color: #c4b5fd; }
.doi:hover { text-decoration: underline; }

/* Honors & training */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.award-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.box h3 { font-size: 1.3rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.box h3 .em { font-size: 1.3rem; }
.award { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 12px; transition: background 0.2s, transform 0.2s; }
.award:hover { background: var(--panel-2); transform: translateX(4px); }
.medal { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; }
.m1 { background: linear-gradient(135deg, #f59e0b, #db2777); }
.m2 { background: linear-gradient(135deg, #8b5cf6, #db2777); }
.m3 { background: linear-gradient(135deg, #0ea5e9, #8b5cf6); }
.m4 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.m5 { background: linear-gradient(135deg, #f97316, #f59e0b); }
.award strong { display: block; color: var(--ink); font-weight: 600; font-size: 0.96rem; }
.award span { color: var(--ink-soft); font-size: 0.9rem; }
.yr { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--c-hon); background: rgba(244,114,182,0.14); padding: 1px 9px; border-radius: 999px; margin-top: 4px; }
.train .yr { color: var(--c-train); background: rgba(34,211,238,0.14); }
.train .award:hover { background: var(--panel-2); }

/* Skills */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; --g: var(--c-skill); }
.skill-group h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--g); margin-bottom: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.skill-group h4::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--g); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.88rem; font-weight: 500; padding: 6px 13px; border-radius: 10px; cursor: default;
  background: color-mix(in srgb, var(--g) 14%, var(--panel)); color: color-mix(in srgb, var(--g) 70%, white);
  border: 1px solid color-mix(in srgb, var(--g) 35%, var(--panel));
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.chip:hover { transform: translateY(-3px) scale(1.05); background: var(--g); color: #0b1020; }

/* Affiliations */
.aff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.aff { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.aff::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--c-aff), #16a34a); }
.aff:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(101,163,13,0.16); }
.aff strong { display: block; font-size: 0.96rem; }
.aff span { color: var(--ink-soft); font-size: 0.88rem; }
.aff em { display: block; font-style: normal; font-size: 0.78rem; font-weight: 700; color: var(--c-aff); margin-top: 4px; }

/* Contact */
.contact-panel {
  position: relative; overflow: hidden; border-radius: 24px; padding: 54px 34px; text-align: center; color: #fff;
  background: linear-gradient(120deg, #0f766e, #4f46e5 55%, #db2777);
}
.contact-panel h2 { font-size: 2.1rem; margin-bottom: 12px; }
.contact-panel p { max-width: 560px; margin: 0 auto 26px; opacity: 0.92; }
.contact-panel .links { justify-content: center; }
.contact-panel .blob { opacity: 0.35; }

footer { text-align: center; padding: 40px 0 34px; color: var(--muted); font-size: 0.85rem; }

/* Back to top */
#toTop {
  position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%;
  border: none; color: #fff; font-size: 1.2rem; cursor: pointer;
  background: linear-gradient(135deg, var(--c-edu), var(--c-hon));
  box-shadow: 0 8px 20px rgba(79,70,229,0.35); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: all 0.25s; z-index: 80;
}
#toTop.show { opacity: 1; pointer-events: auto; transform: none; }
#toTop:hover { transform: translateY(-3px); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in { transition: transform 0.15s ease, box-shadow 0.25s, opacity 0.6s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .edu-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  html { scroll-padding-top: 64px; }
  .page { margin-left: 0; }
  .sidebar, .sidebar:hover { width: var(--side); transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,0.25); }
  .sidebar .lbl { opacity: 1; }
  .sidebar .side-foot { flex-direction: row; }
  .topbar {
    display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 16px;
    position: sticky; top: 0; z-index: 70;
    background: rgba(61,69,89,0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  }
  .topbar .nm { font-family: "Source Serif 4", serif; font-weight: 700; }
  .hero { padding: 60px 0 120px; }
  .hero-inner { flex-direction: column; text-align: center; gap: 22px; }
  .hero .tagline { margin-left: auto; margin-right: auto; }
  .hero .links { justify-content: center; }
  .avatar-ring { flex-basis: 150px; width: 150px; height: 150px; }
  .avatar { font-size: 2.6rem; }
  .two-col, .skill-grid, .edu-grid, .award-grid { grid-template-columns: 1fr; }
  .quicknav { margin-top: -50px; }
  .exp-body ul { margin-left: 22px; }
  .exp-date { display: none; }
  .exp-head .exp-main .m-date { display: block; }
  section { padding: 64px 0 24px; }
  .wrap { padding: 0 20px; }
}
.m-date { display: none; color: var(--muted); font-size: 0.82rem; }
  
