/* ── Trauma Stress Lab · Dark Neural Design System ── */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS — Dark (default)
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand accents ── */
  --violet:       #7c6fe0;
  --violet-soft:  #9a8ff0;
  --violet-deep:  #5b4dc8;
  --cyan:         #4fc3f7;
  --cyan-soft:    #7ed5fa;
  --cyan-deep:    #2aa3d8;

  /* ── Dark surfaces ── */
  --bg:           #09090f;
  --surface:      #0d0d18;
  --surface2:     #14142a;
  --bg-elev:      rgba(255,255,255,0.04);

  /* ── Foreground ── */
  --dark:         rgba(255,255,255,0.96);   /* heading color — inverted on dark */
  --text:         rgba(255,255,255,0.85);
  --muted:        rgba(255,255,255,0.54);
  --fg-1:         #ffffff;
  --fg-2:         rgba(255,255,255,0.85);
  --fg-3:         rgba(255,255,255,0.62);
  --fg-4:         rgba(255,255,255,0.40);

  /* ── Lines & borders ── */
  --border:       rgba(255,255,255,0.09);
  --border-light: rgba(255,255,255,0.05);
  --line:         rgba(255,255,255,0.09);
  --line-strong:  rgba(255,255,255,0.18);
  --line-violet:  rgba(124,111,224,0.40);

  /* ── Accent aliases (backward compat) ── */
  --accent:       var(--violet);
  --accent-mid:   var(--violet-soft);
  --accent-light: rgba(124,111,224,0.12);

  /* ── Semantic ── */
  --success:      #5ee6a8;
  --warn:         #ffcc6b;
  --danger:       #ff7a90;

  /* ── Shadows & glows ── */
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.5);
  --shadow-md:    0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.65);
  --glow-violet:  0 10px 28px rgba(124,111,224,0.32);
  --glow-cyan:    0 10px 28px rgba(79,195,247,0.30);

  /* ── Font families (iOS / SF Pro style) ── */
  --font-display: "Figtree", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Figtree", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-kr:      "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ── Type scale ── */
  --t-hero:   clamp(48px, 7vw, 96px);
  --t-h1:     clamp(36px, 5vw, 64px);
  --t-h2:     clamp(28px, 3.2vw, 44px);
  --t-h3:     24px;
  --t-h4:     18px;
  --t-body:   16px;
  --t-sm:     14px;
  --t-xs:     12px;

  /* ── Spacing ── */
  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* ── Radii ── */
  --radius:    14px;
  --radius-lg: 20px;
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-pill: 9999px;

  /* ── Layout ── */
  --nav-h:    72px;
  --container: 1140px;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(.22,.61,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: 120ms;
  --t-base: 220ms;
  --t-slow: 420ms;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDE  [data-theme="light"]
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:           #ffffff;
  --surface:      #f5f5f7;
  --surface2:     #ebebf0;
  --bg-elev:      rgba(0,0,0,0.03);

  --dark:         #1d1d1f;
  --text:         #1d1d1f;
  --muted:        #6e6e73;
  --fg-1:         #1d1d1f;
  --fg-2:         #2d2d31;
  --fg-3:         #6e6e73;
  --fg-4:         #86868b;

  --border:       rgba(0,0,0,0.10);
  --border-light: rgba(0,0,0,0.06);
  --line:         rgba(0,0,0,0.10);
  --line-strong:  rgba(0,0,0,0.16);

  --accent-light: rgba(124,111,224,0.10);

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 6px 20px rgba(0,0,0,0.10);
  --shadow-lg:  0 20px 50px rgba(0,0,0,0.14);
}

[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-nav a:hover,
[data-theme="light"] .site-nav a.active {
  color: var(--violet);
  background: var(--accent-light);
}
[data-theme="light"] .hero { background: var(--bg); }
[data-theme="light"] .hero::after {
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(0,0,0,0) 42%),
    linear-gradient(180deg, transparent 68%, var(--bg) 100%);
}
[data-theme="light"] .stats-bar {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="light"] .page-hero {
  background: linear-gradient(135deg, #1a1432 0%, #0d1240 100%);
}
[data-theme="light"] .site-footer { background: #1a1432; }
[data-theme="light"] .recent-pubs { background: var(--surface); }
[data-theme="light"] .apps-stat-row { background: #1a1432; }
[data-theme="light"] .gallery-hero { background: #1a1432; }
[data-theme="light"] .gallery-overlay-placeholder { background: #2a2a40; }
[data-theme="light"] .store-btn { background: #1a1432; }
[data-theme="light"] .store-btn:hover { background: #2a2440; }
[data-theme="light"] .apd-dl-btn { background: #1a1432; }
[data-theme="light"] .apd-dl-btn:hover { background: #2a2440; }
[data-theme="light"] h1, [data-theme="light"] h2,
[data-theme="light"] h3, [data-theme="light"] h4 { color: var(--dark); }
[data-theme="light"] .ri-card { border-color: var(--border); }
[data-theme="light"] .ri-card:hover { box-shadow: 0 12px 40px rgba(124,111,224,0.14); }
[data-theme="light"] .member-card { border-color: var(--border); }
[data-theme="light"] .professor-card { border-color: var(--border); }
[data-theme="light"] .modal-card { background: var(--surface); }
[data-theme="light"] .modal-card h3 { color: var(--dark); }
[data-theme="light"] input, [data-theme="light"] textarea, [data-theme="light"] select {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="light"] input:focus, [data-theme="light"] textarea:focus {
  border-color: var(--violet);
  background: var(--surface);
}
[data-theme="light"] .tab-btn { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .year-btn { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .portal-nav { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .project-card { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .project-card:hover { border-color: var(--violet); }
[data-theme="light"] .pnav-drop-menu { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .theme-toggle { border-color: var(--border); color: var(--text); }
[data-theme="light"] .event-hero { background: #1a1432; }
[data-theme="light"] #neural-canvas { opacity: 0.5; }

/* ═══════════════════════════════════════════════════════════════
   BASE TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(124,111,224,0.45); color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   RESEARCH PORTAL — shared shell and dashboard components
   ═══════════════════════════════════════════════════════════════ */
.portal-mobile-nav { display: none; }
.lin-wrap { display: flex; height: calc(100vh - var(--nav-h)); overflow: hidden; background: var(--bg); }
.lin-sidebar { width: 232px; min-width: 232px; height: 100%; display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--surface); }
.lin-sidebar-top { padding: 14px 10px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.lin-workspace { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.lin-workspace-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 8px; background: linear-gradient(135deg, var(--violet), var(--cyan)); color: #fff; font-size: .9rem; font-weight: 900; }
.lin-workspace-name { color: var(--fg-1); font-size: .84rem; font-weight: 700; line-height: 1.2; }
.lin-workspace-user { max-width: 150px; overflow: hidden; color: var(--fg-4); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.lin-sidebar-scroll { flex: 1; overflow-y: auto; padding: 8px 0 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.lin-sidebar-bottom { padding: 8px; border-top: 1px solid var(--border); flex-shrink: 0; }
.lin-nav-section { margin-bottom: 4px; }
.lin-nav-item { display: flex; align-items: center; gap: 8px; margin: 1px 6px; padding: 7px 10px; border-radius: 8px; color: var(--fg-3); cursor: pointer; font-size: .81rem; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); user-select: none; }
.lin-nav-item:hover { background: var(--accent-light); color: var(--fg-1); }
.lin-nav-item.active { background: var(--accent-light); color: var(--violet-soft); font-weight: 700; }
.lin-nav-icon { width: 18px; flex-shrink: 0; font-size: .82rem; text-align: center; }
.lin-nav-arrow { margin-left: auto; color: var(--fg-4); font-size: .58rem; transition: transform var(--t-base); }
.lin-nav-item.expanded .lin-nav-arrow { transform: rotate(90deg); }
.lin-sub-group { display: none; }
.lin-sub-group.open { display: block; }
.lin-nav-sub { display: flex; align-items: center; gap: 8px; margin: 1px 6px; padding: 5px 10px 5px 36px; border-radius: 7px; color: var(--fg-3); font-size: .78rem; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.lin-nav-sub:hover { background: var(--accent-light); color: var(--fg-1); }
.lin-nav-sub.active { background: var(--accent-light); color: var(--violet-soft); font-weight: 700; }
.portal-home {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg);
}
.portal-home-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 56px) 64px;
}
.portal-home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: 30px;
}
.portal-eyebrow {
  color: var(--violet-soft);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.portal-home-title {
  margin: 6px 0 8px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  letter-spacing: -.04em;
}
.portal-home-subtitle { color: var(--fg-3); font-size: .92rem; }
.portal-primary-action,
.portal-quick-action {
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), border-color var(--t-fast);
}
.portal-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: var(--violet);
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.portal-primary-action:hover { transform: translateY(-1px); background: var(--violet-deep); }
.portal-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.portal-summary-card {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.portal-summary-card.is-alert { border-color: rgba(255, 204, 107, .42); }
.portal-summary-label { color: var(--fg-3); font-size: .76rem; font-weight: 600; }
.portal-summary-value { margin-top: 10px; color: var(--fg-1); font-size: 1.8rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.portal-summary-note { margin-top: 8px; color: var(--fg-4); font-size: .72rem; }
.portal-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 34px;
}
.portal-quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--fg-2);
  font-size: .82rem;
  font-weight: 650;
  text-align: left;
}
.portal-quick-action:hover { border-color: var(--line-violet); background: var(--accent-light); transform: translateY(-1px); }
.portal-quick-icon { font-size: 1.15rem; }
.portal-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); gap: 20px; }
.portal-section-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.portal-section-card + .portal-section-card { margin-top: 20px; }
.portal-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.portal-section-title { color: var(--fg-1); font-size: 1rem; font-weight: 750; letter-spacing: -.02em; }
.portal-section-link { color: var(--violet-soft); font-size: .78rem; font-weight: 650; }
.portal-section-link:hover { color: var(--cyan-soft); }
.portal-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.portal-project-card { min-height: 156px; padding: 20px; background: var(--surface); transition: background var(--t-fast), transform var(--t-fast) var(--ease-out); }
.portal-project-card:hover { background: var(--bg-elev); transform: translateY(-1px); }
.portal-project-app { color: var(--violet-soft); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.portal-project-name { display: block; margin: 8px 0 10px; color: var(--fg-1); font-size: 1rem; font-weight: 750; letter-spacing: -.02em; }
.portal-project-desc { display: -webkit-box; overflow: hidden; color: var(--fg-3); font-size: .78rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.portal-project-meta { display: flex; gap: 12px; margin-top: 18px; color: var(--fg-4); font-size: .72rem; }
.portal-list { padding: 4px 20px 12px; }
.portal-list-item { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--border-light); color: var(--fg-2); }
.portal-list-item:last-child { border-bottom: 0; }
.portal-list-icon { width: 25px; text-align: center; flex: 0 0 auto; }
.portal-list-copy { min-width: 0; flex: 1; }
.portal-list-main { overflow: hidden; color: var(--fg-2); font-size: .8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.portal-list-sub { margin-top: 1px; color: var(--fg-4); font-size: .7rem; }
.portal-list-time { color: var(--fg-4); font-size: .7rem; white-space: nowrap; }
.portal-health { padding: 16px 20px 20px; }
.portal-health-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.portal-health-item:last-child { border-bottom: 0; }
.portal-health-item strong { display: block; color: var(--fg-2); font-size: .8rem; }
.portal-health-item span { display: block; margin-top: 2px; color: var(--fg-4); font-size: .72rem; line-height: 1.45; }
.portal-health-ok { padding: 30px 20px; color: var(--fg-3); font-size: .82rem; text-align: center; }
.portal-empty { padding: 38px 20px; color: var(--fg-3); font-size: .84rem; text-align: center; }
.portal-empty strong { display: block; margin-bottom: 6px; color: var(--fg-2); }

/* Older portal templates keep their own local CSS. These safeguards make their
   shared headers, filters, and tables feel like one product in both themes. */
.portal-header { background: #15132c !important; border-bottom-color: rgba(255,255,255,.1) !important; }
.portal-header h1, .portal-header h2, .portal-header h3 { color: #fff !important; }
.lin-main .filter-bar,
.portal-wrap .filter-bar {
  border-color: var(--border) !important;
  border-radius: var(--r-lg) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-sm);
}
.lin-main .data-table th,
.portal-wrap .data-table th { background: var(--bg) !important; color: var(--fg-3) !important; }
.lin-main .data-table td,
.portal-wrap .data-table td { border-color: var(--border-light) !important; }
.lin-main .data-table tr:hover td,
.portal-wrap .data-table tr:hover td { background: var(--bg-elev); }

@media (max-width: 960px) {
  .portal-summary-grid, .portal-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lin-wrap { display: block !important; height: auto !important; min-height: calc(100vh - var(--nav-h)); overflow: visible !important; }
  .portal-mobile-nav { position: sticky; top: var(--nav-h); z-index: 20; display: flex; gap: 2px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
  .portal-mobile-nav a { flex: 0 0 auto; padding: 7px 10px; border-radius: var(--r-pill); color: var(--fg-3); font-size: .73rem; font-weight: 650; }
  .portal-mobile-nav a.active { background: var(--accent-light); color: var(--violet-soft); }
  .portal-home-inner { padding: 24px 16px 44px; }
  .portal-home-top { align-items: stretch; flex-direction: column; }
  .portal-primary-action { justify-content: center; }
  .portal-summary-grid, .portal-quick-grid, .portal-project-grid { grid-template-columns: 1fr; }
  .portal-project-card { min-height: 130px; }
  .ncal-app { height: calc(100vh - var(--nav-h) - 43px) !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--dark);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -0.03em; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { color: var(--text); }

.label {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}

em, i { font-style: italic; color: var(--violet-soft); }

code { font-family: var(--font-mono); font-size: .9em; color: var(--cyan-soft); }

/* ── Layout ── */
.container   { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.container-sm{ max-width: 860px;  margin: 0 auto; padding: 0 28px; }
section { padding: 104px 0; }

/* ─── Section header ─── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header .label { margin-bottom: 14px; display: block; }
.section-header h2 { margin-bottom: 16px; }
.section-header p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Divider ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ─── Grid helpers ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(9,9,15,0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-base);
}
/* Spacer so page content doesn't sit under fixed nav */
body::before {
  content: '';
  display: block;
  height: var(--nav-h);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 38px; height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  display: block;
  line-height: 1.1;
}
.brand-text small {
  font-size: .68rem;
  font-family: var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-4);
  font-weight: 500;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  color: var(--fg-3);
  padding: 6px 11px;
  border-radius: 8px;
  transition: color var(--t-fast), background var(--t-fast);
}
.site-nav a:hover { color: var(--fg-1); background: rgba(255,255,255,0.06); }
.site-nav a.active { color: var(--fg-1); background: rgba(124,111,224,0.12); }
.nav-cta {
  font-size: .79rem !important;
  font-weight: 600 !important;
  color: var(--violet-soft) !important;
  border: 1px solid rgba(124,111,224,0.45) !important;
  background: rgba(124,111,224,0.08) !important;
  padding: 7px 14px !important;
  border-radius: var(--r-pill) !important;
}
.nav-cta:hover {
  background: rgba(124,111,224,0.18) !important;
  border-color: var(--violet) !important;
  color: var(--violet-soft) !important;
}
.menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--fg-2); font-size: 1.3rem; padding: 4px;
}

/* Dark mode toggle */
.theme-toggle {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  transition: border-color var(--t-fast), background var(--t-fast);
  margin-left: 6px;
}
.theme-toggle:hover {
  background: rgba(124,111,224,0.14);
  border-color: var(--violet);
  color: var(--fg-1);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: #05050d;
  color: var(--fg-4);
  padding: 60px 0 36px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 52px;
  margin-bottom: 44px;
}
.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  display: block;
  margin-bottom: 10px;
}
.footer-brand p { font-size: .83rem; line-height: 1.7; color: var(--fg-4); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: .83rem;
  color: var(--fg-3);
  margin-bottom: 9px;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--fg-1); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--fg-4);
}
.footer-social { display: flex; flex-direction: row; gap: 10px; margin-top: 18px; }
.footer-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg-3) !important;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.footer-social-link svg { width: 18px; height: 18px; display: block; }
.footer-social-link:hover {
  color: var(--fg-1) !important;
  border-color: var(--line-strong);
  background: var(--bg-elev);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: var(--glow-violet);
}
.btn-primary:hover {
  background: var(--violet-soft);
  box-shadow: 0 12px 30px rgba(124,111,224,0.42);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--fg-2);
  border-color: var(--line-strong);
}
.btn-outline:hover { color: var(--cyan-soft); border-color: var(--cyan); }

/* btn-white is now a styled outline in the dark theme */
.btn-white {
  background: rgba(255,255,255,0.08);
  color: var(--fg-1);
  border-color: rgba(255,255,255,0.2);
}
.btn-white:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
}

/* Light mode adjustments for buttons */
[data-theme="light"] .btn-outline {
  color: var(--violet);
  border-color: var(--violet);
}
[data-theme="light"] .btn-outline:hover {
  background: var(--accent-light);
  border-color: var(--violet-soft);
}
[data-theme="light"] .btn-white {
  background: rgba(255,255,255,0.9);
  color: var(--violet-deep);
  border-color: rgba(124,111,224,0.3);
}
[data-theme="light"] .btn-white:hover { background: #fff; }

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
  position: relative;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  height: 1px; width: 0;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
  transform: translateX(-50%);
  transition: width var(--t-slow) var(--ease-out);
  pointer-events: none;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card:hover::before { width: 100%; }
.card-body { padding: 24px; }

/* ═══════════════════════════════════════════════════════════════
   HERO  (home page — neural canvas background)
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 96px 0;
  background: linear-gradient(165deg, #0d0d14 0%, #08080c 100%);
}
[data-theme="light"] .hero {
  background: linear-gradient(158deg, #dce7fb 0%, #ecedf1 36%, #f4efe8 70%, #f8e8de 100%);
}
#paint-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: multiply; }
[data-theme="dark"] #paint-canvas { mix-blend-mode: screen; }
/* soft bottom fade into the page */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 76%, var(--bg) 100%);
}
.hero-orb, #neural-canvas { display: none; }

/* ── Intro splash (CAU mark on a soft gradient) ── */
.intro-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(158deg, #dce7fb 0%, #ecedf1 36%, #f4efe8 70%, #f8e8de 100%);
  transition: opacity .65s var(--ease-out), visibility .65s;
}
[data-theme="dark"] .intro-overlay { background: linear-gradient(158deg, #0e0e16 0%, #141420 100%); }
.intro-overlay.hide { opacity: 0; visibility: hidden; }
.intro-mark { display: flex; align-items: center; gap: 18px; animation: introIn 1s var(--ease-out) both; }
.intro-mark img { width: 60px; height: 60px; border-radius: 15px; object-fit: cover; box-shadow: 0 12px 34px rgba(20,30,60,.16); }
.intro-mark span { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; color: #1d1d1f; }
[data-theme="dark"] .intro-mark span { color: #f5f5f7; }
@keyframes introIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .intro-mark { animation: none; } }

/* ── Scroll-expand showcase (image unfolds as you scroll) ── */
.showcase-sec { padding: 32px 0 104px; }
.showcase-wrap { max-width: 1300px; margin: 0 auto; padding: 0 28px; }
.scroll-expand { --p: 0; will-change: transform; transform: scale(calc(0.85 + 0.15 * var(--p))); transform-origin: center; transition: transform .08s linear; }
.showcase-img {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 16 / 8;
  border-radius: calc(42px - 28px * var(--p));
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
  box-shadow: 0 36px 80px rgba(20,30,60,0.20);
}
.showcase-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(8,10,22,0.58) 100%); }
.showcase-overlay { position: relative; z-index: 1; padding: clamp(26px,4vw,52px); color: #fff; }
.showcase-overlay .label { color: rgba(255,255,255,0.72); margin-bottom: 10px; display: block; }
.showcase-overlay h2 { color: #fff; max-width: 20ch; }
@media (prefers-reduced-motion: reduce) { .scroll-expand { transform: none; } .showcase-img { border-radius: 24px; } }
@media (max-width: 640px) { .showcase-img { aspect-ratio: 4 / 5; } }

/* ── Vibrant gradient cards (upsunday "Your Creative Engine" style) ── */
.ri-grid .ri-card:not(.ri-card-new) { border: none; color: #fff; border-radius: 28px; }
.ri-grid .ri-card:not(.ri-card-new):nth-child(4n+1) { background: radial-gradient(125% 95% at 50% 0%, #a8daff 0%, #5aa6f0 56%, #3d8ce6 100%); }
.ri-grid .ri-card:not(.ri-card-new):nth-child(4n+2) { background: radial-gradient(125% 95% at 50% 0%, #ffb4e0 0%, #ff7ab8 56%, #f65ea1 100%); }
.ri-grid .ri-card:not(.ri-card-new):nth-child(4n+3) { background: radial-gradient(125% 95% at 50% 0%, #ffd189 0%, #ff9f4d 56%, #fb8836 100%); }
.ri-grid .ri-card:not(.ri-card-new):nth-child(4n+4) { background: radial-gradient(125% 95% at 50% 0%, #a2ecd2 0%, #4fcfae 56%, #23b692 100%); }
.ri-grid .ri-card:not(.ri-card-new)::before { display: none; }
.ri-grid .ri-card:not(.ri-card-new) .ri-card-top { background: transparent !important; aspect-ratio: 16 / 10; }
.ri-grid .ri-card:not(.ri-card-new) .ri-card-body { color: #fff; }
.ri-grid .ri-card:not(.ri-card-new) .ri-card-body .label { color: rgba(255,255,255,0.82); }
.ri-grid .ri-card:not(.ri-card-new) .ri-card-body h3 { color: #fff; }
.ri-grid .ri-card:not(.ri-card-new) .ri-card-desc { color: rgba(255,255,255,0.92); }
.ri-grid .ri-card:not(.ri-card-new) .ri-read-more {
  background: rgba(255,255,255,0.22); color: #fff; box-shadow: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ri-grid .ri-card:not(.ri-card-new) .ri-read-more:hover { background: rgba(255,255,255,0.34); box-shadow: none; }
.ri-grid .ri-card:not(.ri-card-new):hover { transform: translateY(-6px); box-shadow: 0 34px 66px rgba(30,40,80,0.24); border: none; }

/* ── People carousel (researchers) ── */
.lab-carousel { padding: 36px 0 104px; overflow: hidden; }
.lab-carousel-head { text-align: center; max-width: 660px; margin: 0 auto 34px; padding: 0 24px; }
.lab-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 18px;
}
.lab-carousel-head h2 { margin-bottom: 12px; }
.lab-carousel-head p { color: var(--muted); font-size: 1.05rem; }
.lab-nav { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.lab-nav button {
  width: 50px; height: 50px; border-radius: 16px; border: none; cursor: pointer;
  background: var(--fg-1); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.lab-nav button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.lab-nav button:disabled { opacity: .28; cursor: default; }
.lab-viewport { overflow: visible; cursor: grab; touch-action: pan-y; }
.lab-track { display: flex; gap: 26px; will-change: transform; user-select: none; }
.lab-track.is-dragging { cursor: grabbing; }
.lab-card-photo { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.lab-card {
  flex: 0 0 min(840px, 88vw);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 26px; padding: 30px;
  display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: center;
  box-shadow: var(--shadow-sm);
  opacity: .45; transition: opacity .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.lab-card.is-active { opacity: 1; box-shadow: var(--shadow-lg); }
.lab-card-photo {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; object-fit: cover;
  filter: grayscale(1) contrast(1.05); transition: filter .55s var(--ease-out);
}
.lab-card.is-active .lab-card-photo { filter: grayscale(0); }
.lab-card-role { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.lab-card-name { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; color: var(--fg-1); line-height: 1.1; }
.lab-card-sub { color: var(--muted); font-size: .92rem; margin-top: 4px; margin-bottom: 14px; }
.lab-card-text { font-size: 1.05rem; line-height: 1.6; color: var(--fg-2); margin-top: 10px; }
@media (max-width: 640px) {
  .lab-card { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .lab-card-photo { max-width: 150px; }
}

.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 860px; }
.hero-eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 7.5vw, 5.4rem);
  font-weight: 700;
  color: var(--fg-1);
  margin-bottom: 22px;
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.hero-content .hero-sub {
  font-size: clamp(1.12rem, 1.5vw, 1.34rem);
  color: var(--fg-3);
  margin: 0 0 40px;
  max-width: 600px;
  line-height: 1.5;
  font-weight: 400;
}
[data-theme="light"] .hero-content .hero-sub { color: var(--fg-2); }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.btn-lg { padding: 15px 32px; font-size: .96rem; }
.hero-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-2);
  transition: color var(--t-fast);
}
.hero-link:hover { color: var(--fg-1); }
/* Monochrome primary CTA in the hero (black on light / white on dark) */
.hero .btn-primary {
  background: var(--fg-1);
  color: var(--bg);
  box-shadow: 0 10px 26px rgba(0,0,0,0.16);
}
.hero .btn-primary:hover {
  background: var(--fg-2);
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}

/* ── Hero graphic: Neural Aurora ── */
.hero-graphic {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  animation: heroGraphicIn 1.7s var(--ease-out) both;
}
#hero-3d { position: absolute; top: 0; right: 0; bottom: 0; width: 64%; }
#hero-3d canvas { display: block; width: 100% !important; height: 100% !important; }
@media (max-width: 760px) { #hero-3d { width: 100%; opacity: 0.5; } }
.hero-aurora { position: absolute; inset: -12%; }
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  mix-blend-mode: screen;
  opacity: 0.55;
  will-change: transform;
}
.aurora.a1 { width: 46vw; height: 46vw; left: -6vw;  top: -14vw; background: radial-gradient(circle, rgba(124,111,224,0.55), transparent 66%); animation: auroraA 20s ease-in-out infinite alternate; }
.aurora.a2 { width: 40vw; height: 40vw; right: -4vw; top: 4vw;    background: radial-gradient(circle, rgba(79,195,247,0.42), transparent 66%); animation: auroraB 26s ease-in-out infinite alternate; }
.aurora.a3 { width: 38vw; height: 38vw; left: 32vw;  bottom: -18vw; background: radial-gradient(circle, rgba(91,77,200,0.50), transparent 66%); animation: auroraC 30s ease-in-out infinite alternate; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

[data-theme="light"] .aurora { mix-blend-mode: normal; opacity: 0.42; filter: blur(78px); }

.hero::after { z-index: 1; }
.hero .container { z-index: 2; }

@keyframes auroraA { from { transform: translate3d(0,0,0) scale(1); }    to { transform: translate3d(5vw,4vw,0) scale(1.16); } }
@keyframes auroraB { from { transform: translate3d(0,0,0) scale(1); }    to { transform: translate3d(-4vw,3vw,0) scale(1.20); } }
@keyframes auroraC { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(3vw,-3vw,0) scale(1); } }
@keyframes heroGraphicIn { from { opacity: 0; transform: scale(1.07); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .aurora, .hero-graphic { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════════ */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  padding: 40px 24px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3.6vw, 3rem);
  font-weight: 800;
  color: var(--fg-1);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.stat-lbl {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   RESEARCH INTEREST CARDS
   ═══════════════════════════════════════════════════════════════ */
.ri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.ri-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: box-shadow var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  isolation: isolate;
}
.ri-card::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  height: 1px; width: 0;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
  transform: translateX(-50%);
  transition: width var(--t-slow) var(--ease-out);
  pointer-events: none;
}
.ri-card:hover {
  box-shadow: 0 24px 56px rgba(0,0,0,0.34);
  transform: translateY(-6px);
  border-color: var(--line-strong);
}
[data-theme="light"] .ri-card:hover { box-shadow: 0 24px 56px rgba(60,50,120,0.16); }
.ri-card:hover::before { width: 100%; }
.ri-card-top {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.ri-card-icon {
  width: 88px; height: 88px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,.4));
  transition: transform .4s var(--ease-out);
  flex-shrink: 0;
}
/* Emoji icons → premium iOS-style frosted app-icon tile */
span.ri-card-icon {
  width: 106px; height: 106px;
  font-size: 54px;
  border-radius: 26px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 18px 36px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.32);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  filter: none;
}
.ri-card:hover .ri-card-icon { transform: scale(1.08) translateY(-6px); }
.ri-card-img {
  width: auto; max-width: 72%; max-height: 130px;
  object-fit: contain; display: block;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,.35));
  transition: transform .35s var(--ease-out);
}
.ri-card:hover .ri-card-img { transform: scale(1.12) translateY(-5px); }
.ri-card-body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ri-card-body .label { margin-bottom: 8px; display: block; }
.ri-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fg-1);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.ri-card-desc {
  font-size: .88rem;
  color: var(--fg-3);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}
.ri-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--violet);
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  transition: background var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
  align-self: flex-start;
  white-space: nowrap;
}
.ri-read-more:hover {
  background: var(--violet-soft);
  box-shadow: var(--glow-violet);
}
/* New app card (researcher only) */
.ri-card-new { cursor: pointer; }
.ri-card-new .ri-card-top {
  background: rgba(255,255,255,0.03) !important;
  border-bottom: 1px dashed var(--border);
}
.ri-card-new:hover .ri-card-top { background: rgba(124,111,224,0.08) !important; }
.ri-card-new .ri-plus { font-size: 3rem; color: var(--border); font-weight: 300; transition: color .2s; }
.ri-card-new:hover .ri-plus { color: var(--violet); }
.ri-card-new .ri-read-more {
  background: transparent;
  color: var(--fg-3);
  border: 1px dashed var(--line-strong);
  box-shadow: none;
}
.ri-card-new:hover .ri-read-more {
  border-color: var(--violet);
  color: var(--violet-soft);
  background: rgba(124,111,224,0.08);
}

/* ═══════════════════════════════════════════════════════════════
   RECENT PUBLICATIONS (home)
   ═══════════════════════════════════════════════════════════════ */
.recent-pubs { background: var(--surface2); }
.pub-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child { border-bottom: none; }
.pub-title { font-size: .95rem; font-weight: 500; color: var(--fg-1); margin-bottom: 5px; }
.pub-meta { font-size: .8rem; color: var(--fg-3); }
.pub-doi {
  display: inline-block;
  margin-top: 4px;
  font-size: .78rem;
  color: var(--cyan);
  font-weight: 500;
}
.pub-doi:hover { text-decoration: underline; }
.pub-year {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--violet-soft);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HERO (inner pages) — always dark bg, always white text
   ═══════════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(165deg, #18181b 0%, #0c0c0f 100%);
  padding: 104px 0 88px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 78% 36%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}
/* Light mode: white banner with dark text (dark mode is the reverse) */
[data-theme="light"] .page-hero { background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%); }
[data-theme="light"] .page-hero::before { background: none; }
[data-theme="light"] .page-hero h1,
[data-theme="light"] .page-hero h2 { color: var(--dark) !important; }
[data-theme="light"] .page-hero p { color: var(--muted) !important; }
[data-theme="light"] .page-hero .label { color: var(--fg-3) !important; }
/* Force white text regardless of light/dark theme */
.page-hero .label,
.gallery-hero .label,
.event-hero .label { color: rgba(255,255,255,0.56) !important; margin-bottom: 14px; display: block; position: relative; }

.page-hero h1,
.page-hero h2,
.gallery-hero h1,
.event-hero h1 {
  color: #ffffff !important;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
  position: relative;
}

.page-hero p { color: rgba(255,255,255,0.64) !important; font-size: 1.16rem; max-width: 600px; line-height: 1.55; position: relative; }

/* ═══════════════════════════════════════════════════════════════
   RESEARCH PAGE
   ═══════════════════════════════════════════════════════════════ */
.research-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 48px; }
.tab-btn {
  font-family: var(--font-body);
  font-size: .83rem;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--fg-3);
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
}
.tab-btn.active, .tab-btn:hover {
  border-color: var(--violet);
  color: var(--violet-soft);
  background: rgba(124,111,224,0.12);
}
.research-detail { display: none; }
.research-detail.active {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.research-detail img { width: 100%; border-radius: var(--radius-lg); }
.research-text h2 { margin-bottom: 18px; }
.research-text p { color: var(--fg-3); margin-bottom: 14px; font-size: .97rem; }
.wave-list { margin: 20px 0; }
.wave-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.wave-row:last-child { border-bottom: none; }
.wave-name { font-weight: 600; font-size: .82rem; width: 60px; letter-spacing: .05em; color: var(--fg-2); }
.wave-bar-wrap { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.wave-bar { height: 100%; border-radius: 3px; background: var(--violet); }
.wave-hz { font-size: .8rem; color: var(--fg-4); width: 90px; text-align: right; }
.wave-row.highlight .wave-name { color: var(--cyan); }
.wave-row.highlight .wave-bar { background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.freq-demo {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.freq-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: .88rem; color: var(--fg-2);
}
.freq-divider { border-top: 1px dashed var(--border); margin: 6px 0; }
.freq-result { color: var(--cyan); font-weight: 600; }

/* Research sticky progress dots */
.research-progress {
  position: fixed; right: 22px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 50; opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.research-progress.visible { opacity: 1; pointer-events: auto; }
.rp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  transition: background .2s, transform .2s; padding: 0; position: relative;
}
.rp-dot::after {
  content: attr(title);
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  background: var(--surface2); color: var(--fg-1);
  font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 5px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.rp-dot:hover::after { opacity: 1; }
.rp-dot.active { background: var(--violet); transform: scale(1.5); box-shadow: 0 0 10px rgba(124,111,224,0.6); }
.rp-dot:hover { background: var(--violet-soft); }

/* ═══════════════════════════════════════════════════════════════
   TEAM PAGE
   ═══════════════════════════════════════════════════════════════ */
.professor-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 64px;
}
.professor-photo { border-radius: var(--radius); width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: contrast(1.02); transition: filter .45s var(--ease-out); }
.professor-card:hover .professor-photo { filter: contrast(1.04) brightness(1.03); }
.professor-info .label { margin-bottom: 10px; display: block; }
.professor-info h2 { margin-bottom: 8px; }
.professor-role { font-size: .9rem; color: var(--fg-3); margin-bottom: 22px; }
.professor-info p { color: var(--fg-3); font-size: .95rem; margin-bottom: 20px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.contact-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.contact-item dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); margin-bottom: 3px; }
.contact-item dd { font-size: .85rem; color: var(--fg-2); }

.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 16px 22px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), transform var(--t-fast), border-color var(--t-base);
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
}
.member-card:hover { box-shadow: 0 22px 48px rgba(20,30,60,0.13); transform: translateY(-5px); border-color: var(--line-strong); }
.member-photo {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  border-radius: 14px; object-fit: cover; border: none; margin: 0 0 16px;
  filter: contrast(1.02);
  transition: filter .45s var(--ease-out);
}
.member-card:hover .member-photo { filter: contrast(1.04) brightness(1.03); }
.member-name { font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; color: var(--fg-1); }
.member-degree { font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.member-interest { font-size: .82rem; color: var(--fg-3); line-height: 1.5; margin-top: 4px; }

.alumni-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px 24px; }
.alumni-item { text-align: center; }
.alumni-photo {
  width: 100%; max-width: 168px; aspect-ratio: 1 / 1; height: auto;
  border-radius: 50%; object-fit: cover;
  margin: 0 auto 14px;
  border: 2px solid var(--border);
  filter: contrast(1.02);
  transition: filter .4s var(--ease-out);
}
.alumni-item:hover .alumni-photo { filter: contrast(1.04) brightness(1.03); }
.alumni-name { font-size: .92rem; font-weight: 600; color: var(--fg-1); }

/* ═══════════════════════════════════════════════════════════════
   PUBLICATIONS PAGE
   ═══════════════════════════════════════════════════════════════ */
.pub-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.year-btn {
  font-family: var(--font-body);
  font-size: .8rem; font-weight: 600;
  padding: 7px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--fg-3); cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
}
.year-btn.active, .year-btn:hover {
  border-color: var(--violet);
  color: var(--violet-soft);
  background: rgba(124,111,224,0.12);
}
.pub-list-item { padding: 24px 0; border-bottom: 1px solid var(--border); }
.pub-list-item:last-child { border-bottom: none; }
.pub-list-title { font-size: .97rem; font-weight: 500; color: var(--fg-1); margin-bottom: 5px; line-height: 1.5; }
.pub-list-meta { font-size: .82rem; color: var(--fg-3); margin-bottom: 6px; }
.pub-year-group { margin-bottom: 44px; }
.pub-year-heading {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 400;
  color: var(--violet-soft);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--violet-deep);
  margin-bottom: 0;
}
.copyright-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.copyright-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  font-size: .88rem; font-weight: 500; color: var(--fg-2);
}
.copyright-icon {
  width: 32px; height: 32px;
  background: rgba(124,111,224,0.14);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--violet-soft); font-size: 1rem; flex-shrink: 0;
}
.pub-search-wrap { margin-bottom: 24px; }
.pub-search-wrap input {
  width: 100%; padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  font-size: .95rem; color: var(--fg-2);
  font-family: var(--font-body);
  transition: border-color var(--t-fast); outline: none;
}
.pub-search-wrap input:focus { border-color: var(--violet); background: rgba(124,111,224,0.06); }
.pub-search-wrap input::placeholder { color: var(--fg-4); }

/* ═══════════════════════════════════════════════════════════════
   APPS PAGE
   ═══════════════════════════════════════════════════════════════ */
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-fast), border-color var(--t-base);
  position: relative; isolation: isolate;
}
.app-card::before {
  content: "";
  position: absolute; top: 0; left: 50%; height: 1px; width: 0;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
  transform: translateX(-50%);
  transition: width var(--t-slow) var(--ease-out); pointer-events: none;
}
.app-card:hover { box-shadow: 0 16px 48px rgba(124,111,224,0.2); transform: translateY(-4px); border-color: var(--line-strong); }
.app-card:hover::before { width: 100%; }
.app-card-top {
  background: rgba(255,255,255,0.03);
  padding: 32px;
  display: flex; justify-content: center; align-items: center;
  min-height: 220px;
  border-bottom: 1px solid var(--border);
}
.app-screenshot { max-height: 180px; width: auto; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.app-card-body { padding: 28px; }
.app-name {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--fg-1); margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.app-full-name { font-size: .8rem; color: var(--fg-3); font-weight: 500; margin-bottom: 14px; }
.app-desc { font-size: .9rem; color: var(--fg-3); line-height: 1.65; margin-bottom: 20px; }
.app-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.app-badge {
  font-size: .72rem; font-weight: 600;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: rgba(124,111,224,0.14);
  color: var(--violet-soft);
  border: 1px solid rgba(124,111,224,0.25);
}
.app-badge-light { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.25); }
.app-download-row { display: flex; gap: 10px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--fg-1);
  border: 1px solid var(--line-strong);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .82rem; font-weight: 500;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.store-btn:hover { background: rgba(124,111,224,0.16); border-color: var(--violet); }
.store-btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.coming-soon {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--fg-4);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .82rem; font-weight: 500;
  border: 1px dashed var(--border);
}

/* Apps stat row */
.apps-stat-row { background: rgba(5,5,18,0.9); padding: 36px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.apps-stat-inner { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 24px; }
.apps-stat-item { text-align: center; }
.apps-stat-num { display: block; font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; color: #ffffff; letter-spacing: -0.03em; line-height: 1.05; }
.apps-stat-lbl { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-4); margin-top: 6px; display: block; }

/* Research card on apps page */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.research-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 4/3; cursor: pointer;
}
.research-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.research-card:hover img { transform: scale(1.06); }
.research-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, transparent 55%);
  padding: 24px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.research-card-overlay .label { color: var(--cyan-soft); margin-bottom: 6px; }
.research-card-overlay h3 { color: #fff; font-size: 1.3rem; margin-bottom: 6px; }
.research-card-overlay p { color: rgba(255,255,255,.7); font-size: .85rem; }

/* ═══════════════════════════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════════════════════════ */
.contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.info-block { display: flex; flex-direction: column; gap: 22px; }
.info-item { display: flex; gap: 16px; align-items: flex-start; }
.info-icon {
  width: 40px; height: 40px;
  background: rgba(124,111,224,0.14);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--violet-soft); font-size: 1rem;
  border: 1px solid rgba(124,111,224,0.25);
}
.info-label { font-size: .73rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-4); margin-bottom: 3px; }
.info-value { font-size: .95rem; color: var(--fg-2); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form h3 { margin-bottom: 26px; color: var(--fg-1); font-family: var(--font-display); font-weight: 400; }
.form-group { margin-bottom: 18px; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--fg-3); display: block; margin-bottom: 7px; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: .9rem; color: var(--fg-2);
  transition: border-color var(--t-fast), background var(--t-fast);
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--fg-4); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--violet);
  background: rgba(124,111,224,0.06);
  box-shadow: 0 0 0 3px rgba(124,111,224,0.15);
}
.form-group textarea { resize: vertical; min-height: 110px; }

/* ═══════════════════════════════════════════════════════════════
   GALLERY PAGE
   ═══════════════════════════════════════════════════════════════ */
.gallery-hero {
  background: linear-gradient(135deg, #0c0a1e 0%, #0d1228 100%);
  padding: 68px 0 56px;
  text-align: center;
  position: relative; overflow: hidden;
}
.gallery-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(124,111,224,0.28) 0%, transparent 60%);
  pointer-events: none;
}
.gallery-hero h1 { color: var(--fg-1); position: relative; margin-bottom: 8px; font-family: var(--font-display); font-weight: 400; }
.gallery-hero .label { color: var(--cyan-soft); display: block; margin-bottom: 14px; position: relative; }
.gallery-toolbar {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: var(--nav-h); z-index: 10;
}
.gallery-count-label { font-size: .83rem; font-weight: 600; color: var(--fg-3); }
.gallery-overlay-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.gallery-overlay-card {
  position: relative; border-radius: 14px; overflow: hidden;
  aspect-ratio: 4/3; background: var(--surface2);
  text-decoration: none; display: block;
  border: 1px solid var(--border);
  transition: border-color var(--t-base), transform var(--t-fast);
}
.gallery-overlay-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.gallery-overlay-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease, opacity .4s ease;
}
.gallery-overlay-card:hover img { transform: scale(1.06); opacity: .88; }
.gallery-overlay-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 2.5rem; background: rgba(255,255,255,0.03);
}
.gallery-overlay-info {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.80) 0%, rgba(0,0,0,.08) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px 20px; pointer-events: none;
}
.gallery-overlay-title {
  font-family: var(--font-body);
  font-size: .95rem; font-weight: 600; color: #fff; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-overlay-date { font-size: .73rem; color: rgba(255,255,255,.6); margin-top: 3px; }
.gallery-overlay-count {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.65); color: rgba(255,255,255,.85);
  font-size: .68rem; font-weight: 600; padding: 3px 9px;
  border-radius: var(--r-pill); backdrop-filter: blur(4px);
}
.gallery-empty-state { text-align: center; padding: 80px 0; color: var(--fg-3); }
.gallery-empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }

/* ═══════════════════════════════════════════════════════════════
   GALLERY EVENT DETAIL
   ═══════════════════════════════════════════════════════════════ */
.event-hero {
  background: linear-gradient(135deg, #0c0a1e 0%, #0d1228 100%);
  padding: 60px 0 52px; position: relative; overflow: hidden;
}
.event-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(124,111,224,0.24) 0%, transparent 65%);
  pointer-events: none;
}
.event-hero-inner { position: relative; }
.event-topbar-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.event-back-link { font-size: .82rem; font-weight: 600; color: var(--fg-3); transition: color var(--t-fast); }
.event-back-link:hover { color: var(--fg-1); }
.event-hero h1 { color: var(--fg-1); margin-bottom: 12px; font-family: var(--font-display); font-weight: 400; }
.event-hero-meta { font-size: .92rem; color: var(--fg-3); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.event-hero-meta span { display: flex; align-items: center; gap: 5px; }
.event-hero-desc { font-size: .97rem; color: var(--fg-4); max-width: 600px; margin-top: 10px; line-height: 1.7; }
.event-delete-btn {
  font-size: .78rem; font-weight: 600; color: var(--fg-4);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: all .2s;
}
.event-delete-btn:hover { background: rgba(255,100,120,.12); border-color: rgba(255,100,120,.3); color: var(--danger); }
.ev-upload-area {
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg); padding: 36px 24px;
  text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s; margin-bottom: 24px;
}
.ev-upload-area:hover, .ev-upload-area.drag-over { border-color: var(--violet); background: rgba(124,111,224,0.06); }
.ev-upload-icon { font-size: 2.2rem; margin-bottom: 10px; }
.ev-upload-title { font-size: .97rem; font-weight: 600; color: var(--fg-1); margin-bottom: 4px; }
.ev-upload-sub { font-size: .82rem; color: var(--fg-3); }
.ev-upload-link { color: var(--violet-soft); font-weight: 600; cursor: pointer; }
.ev-upload-link:hover { text-decoration: underline; }
.ev-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ev-preview-thumb { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; position: relative; border: 1px solid var(--border); }
.ev-preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ev-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ev-photo-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface2); cursor: pointer;
}
.ev-photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ev-photo-item:hover img { transform: scale(1.06); }
.ev-del-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 8px; opacity: 0; transition: opacity .2s;
}
.ev-photo-item:hover .ev-del-overlay { opacity: 1; }
.ev-del-btn {
  background: rgba(220,53,69,.85); color: #fff; border: none;
  width: 28px; height: 28px; border-radius: 6px; font-size: .8rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.ev-del-btn:hover { background: #dc3545; }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 400; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.7); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 1.2rem;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ═══════════════════════════════════════════════════════════════
   APP DETAIL PAGE
   ═══════════════════════════════════════════════════════════════ */
.apd-hero { padding: 80px 24px 72px; text-align: center; background: linear-gradient(160deg, #0c0a1e, #0a1228); }
.apd-hero-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.apd-icon { font-size: 5.5rem; line-height: 1; margin-bottom: 8px; filter: drop-shadow(0 12px 36px rgba(0,0,0,.5)); }
.apd-label-text { font-size: .73rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-soft); margin: 0; }
.apd-title { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 400; color: var(--fg-1); margin: 0; line-height: 1.08; }
.apd-subtitle { font-size: 1.1rem; color: var(--fg-3); margin: 0; }
.apd-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.apd-tag { font-size: .75rem; font-weight: 600; padding: 5px 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.08); color: var(--fg-2); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.15); }
.apd-section { padding: 72px 0; }
.apd-section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.apd-desc { font-size: 1.12rem; line-height: 1.82; color: var(--fg-2); max-width: 680px; margin: 0 auto; }
.apd-desc-kr { font-size: 1.05rem; line-height: 1.9; color: var(--fg-3); max-width: 660px; margin: 0 auto; word-break: keep-all; font-family: var(--font-kr); }
.apd-img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; align-items: start; }
.apd-img-block { text-align: center; }
.apd-img-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-4); margin-bottom: 16px; }
.apd-img { border-radius: 18px; box-shadow: 0 16px 56px rgba(0,0,0,.5); width: 100%; }
.apd-screenshot { max-width: 540px; width: 100%; border-radius: 22px; box-shadow: 0 20px 64px rgba(0,0,0,.55); }
.apd-dl-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.apd-dl-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(255,255,255,0.08);
  color: var(--fg-1); border-radius: 14px; border: 1px solid var(--line-strong);
  font-family: var(--font-body); text-decoration: none;
  transition: background .2s, transform .2s;
}
.apd-dl-btn:hover { background: rgba(124,111,224,0.18); border-color: var(--violet); transform: translateY(-2px); }
.apd-dl-flag { font-size: 1.8rem; line-height: 1; }
.apd-dl-text { display: flex; flex-direction: column; text-align: left; gap: 1px; }
.apd-dl-text small { font-size: .72rem; color: var(--fg-4); font-weight: 400; }
.apd-dl-text strong { font-size: 1rem; font-weight: 600; }
.apd-sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.apd-sub-card {
  background: var(--surface); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
  transition: transform .25s, box-shadow .25s;
}
.apd-sub-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(124,111,224,0.2); }
.apd-sub-img { aspect-ratio: 16/9; overflow: hidden; }
.apd-sub-img img { width: 100%; height: 100%; object-fit: cover; }
.apd-sub-body { padding: 24px 26px 28px; }
.apd-sub-body h3 { margin-bottom: 10px; font-size: 1.15rem; color: var(--fg-1); font-family: var(--font-display); font-weight: 400; }
.apd-sub-body p { color: var(--fg-3); font-size: .93rem; line-height: 1.7; }
.apd-sub-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.apd-sub-link {
  font-size: .8rem; font-weight: 600; padding: 5px 14px; border-radius: var(--r-pill);
  background: rgba(124,111,224,0.14); color: var(--violet-soft);
  border: 1px solid rgba(124,111,224,0.25); text-decoration: none; transition: all .2s;
}
.apd-sub-link:hover { background: var(--violet); color: #fff; box-shadow: var(--glow-violet); }
.apd-sub-link-plain { cursor: default; }
.apd-sub-link-plain:hover { background: rgba(124,111,224,0.14); color: var(--violet-soft); box-shadow: none; }

/* Wardy privacy policy */
.privacy-hero { padding-bottom: 54px; }
.privacy-page { padding: 68px 0 88px; }
.privacy-content { max-width: 760px; color: var(--fg-3); font-size: 1rem; line-height: 1.85; }
.privacy-content > p { margin-bottom: 36px; }
.privacy-content section { padding: 28px 0; border-top: 1px solid var(--border); }
.privacy-content h2 { margin: 0 0 14px; color: var(--fg-1); font-size: 1.25rem; }
.privacy-content p { margin: 0 0 12px; }
.privacy-content ul { margin: 0; padding-left: 1.25rem; }
.privacy-content li + li { margin-top: 6px; }
.privacy-content strong { color: var(--fg-2); }
.privacy-content dl { margin: 0; }
.privacy-content dl > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 8px 0; }
.privacy-content dt { color: var(--fg-2); font-weight: 600; }
.privacy-content dd { margin: 0; }
.privacy-content a { color: var(--cyan-soft); text-underline-offset: 3px; }
@media (max-width: 560px) { .privacy-page { padding: 44px 0 64px; } .privacy-content dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(8px);
  z-index: 300; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.2rem; color: var(--fg-1); font-family: var(--font-display); font-weight: 400; }
.modal-close {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  font-size: 1rem; color: var(--fg-3); cursor: pointer;
  padding: 6px 10px; border-radius: 8px; transition: background .15s; line-height: 1;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--fg-1); }

/* Portal modal variant */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 480px; margin: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.modal-box h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; color: var(--fg-1); margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.fade-up   { animation: fadeUp .8s var(--ease-out) .05s both; }
.fade-up-2 { animation: fadeUp .8s var(--ease-out) .18s both; }
.fade-up-3 { animation: fadeUp .8s var(--ease-out) .32s both; }
@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-up-2, .fade-up-3 { animation: none; }
}

/* Scroll-reveal (applied by reveal.js) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .professor-card { grid-template-columns: 1fr; }
  .professor-photo { max-width: 200px; }
  .contact-section { grid-template-columns: 1fr; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .research-detail.active { grid-template-columns: 1fr; }
  .alumni-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .copyright-grid { grid-template-columns: 1fr; }
  .gallery-overlay-grid { grid-template-columns: repeat(2, 1fr); }
  .ri-grid { grid-template-columns: repeat(2, 1fr); }
  .research-progress { display: none; }
}
@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(9,9,15,0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 20px;
    gap: 4px; z-index: 99;
  }
  .site-nav.open a { padding: 10px 12px; border-radius: 8px; }
  .site-nav.open a:hover { background: rgba(255,255,255,0.06); }
  .menu-btn { display: block; }
  [data-theme="light"] .site-nav.open { background: rgba(255,255,255,0.98); }
}
@media (max-width: 640px) {
  section { padding: 60px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .alumni-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .gallery-overlay-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ri-grid { grid-template-columns: 1fr; }
  .ev-photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .event-hero { padding: 44px 0 36px; }
  .hero-content h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
}

/* ═══════════════════════════════════════════════════════════════
   PORTAL ELEVATION — additive polish for the Linear-style portal.
   Uses `.lin-wrap …` (higher specificity than the per-template inline
   .lin-* rules) so these win globally without editing each template.
   Visual refinements only — no layout geometry changes.
   ═══════════════════════════════════════════════════════════════ */

/* Editorial display font + tighter tracking on key portal titles */
.lin-wrap .lin-workspace-name,
.lin-wrap .lin-list-title,
.lin-wrap .lin-detail-proj-name,
.lin-wrap .lin-stat-chip-val,
.lin-wrap .lin-row-name {
  font-family: var(--font-display);
  letter-spacing: -.02em;
}

/* Workspace logo tile — richer brand gradient + soft depth */
.lin-wrap .lin-workspace-icon {
  background: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
  box-shadow: 0 4px 14px rgba(124,111,224,0.35);
}

/* Active nav + count badge + app pill — consistent brand emphasis */
.lin-wrap .lin-nav-item.active { background: rgba(124,111,224,0.16); color: var(--violet-soft); }
.lin-wrap .lin-count-badge,
.lin-wrap .lin-row-app { background: rgba(124,111,224,0.16); color: var(--violet-soft); }

/* Primary buttons / actions — de-neon, soft branded shadow + hover */
.lin-wrap .lin-btn-sm.primary,
.lin-wrap .lin-action.primary { box-shadow: 0 6px 16px rgba(124,111,224,0.28); }
.lin-wrap .lin-btn-sm.primary:hover,
.lin-wrap .lin-action.primary:hover {
  background: var(--violet-soft);
  border-color: var(--violet-soft);
  box-shadow: 0 8px 22px rgba(124,111,224,0.40);
}

/* Stat chips — subtle depth + crisper edge */
.lin-wrap .lin-stat-chip { box-shadow: var(--shadow-sm); border-color: var(--line-strong); }

/* Stronger row hover affordance */
.lin-wrap .lin-proj-row:hover { background: rgba(124,111,224,0.08); }

/* Thin, themed scrollbars across portal scroll regions */
.lin-wrap .lin-list-scroll::-webkit-scrollbar,
.lin-wrap .lin-sidebar-scroll::-webkit-scrollbar,
.lin-wrap .lin-detail-inner::-webkit-scrollbar { width: 9px; height: 9px; }
.lin-wrap .lin-list-scroll::-webkit-scrollbar-thumb,
.lin-wrap .lin-sidebar-scroll::-webkit-scrollbar-thumb,
.lin-wrap .lin-detail-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.lin-wrap .lin-list-scroll::-webkit-scrollbar-thumb:hover,
.lin-wrap .lin-sidebar-scroll::-webkit-scrollbar-thumb:hover,
.lin-wrap .lin-detail-inner::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* ── Portal System B (.portal-wrap top-tab layout: project / stats / data / tests / detail) ── */
/* FIX: inline `.portal-header{background:var(--dark)}` resolves to near-WHITE in the
   default dark theme, so the white header text was invisible (white-on-white).
   Force an explicit dark header that reads correctly in both themes. */
.portal-wrap .portal-header {
  background: #15132c;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
/* Breadcrumb tabs + content tabs — branded active state */
.portal-wrap .pnav-btn.active { color: var(--violet-soft); border-bottom-color: var(--violet); }
.portal-wrap .tab-btn.active { background: var(--violet); border-bottom-color: var(--violet); color: #fff; }
/* Stat tiles — editorial display font + subtle depth */
.portal-wrap .stat-num { font-family: var(--font-display); letter-spacing: -.03em; }
.portal-wrap .stat-card { box-shadow: var(--shadow-sm); }
/* Data tables — refined header + row hover affordance */
.portal-wrap .data-table th { background: var(--surface2); color: var(--fg-3); }
.portal-wrap .data-table tbody tr:hover { background: rgba(124,111,224,0.06); }

/* ═══════════════════════════════════════════════════════════════
   UPSUNDAY-PARITY COMPONENTS
   Custom cursor · cookie banner · marquees · works grid · recognition ·
   testimonials · lab notes · mask reveal · split text
   ═══════════════════════════════════════════════════════════════ */

/* ── Custom cursor ── */
.cursor-ring, .cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0; border-radius: 50%;
}
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid var(--fg-2);
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              margin .25s var(--ease-out), background .25s var(--ease-out),
              border-color .25s var(--ease-out), opacity .3s var(--ease-out);
}
.cursor-dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--violet);
  transition: opacity .3s var(--ease-out), transform .12s var(--ease-out);
}
body.cursor-on .cursor-ring, body.cursor-on .cursor-dot { opacity: 1; }
body.cursor-hover .cursor-ring {
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  background: rgba(124,111,224,0.12); border-color: var(--violet-soft);
}
body.cursor-hover .cursor-dot { opacity: 0; }
body.cursor-down .cursor-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button,
  body.has-cursor .work-card, body.has-cursor .note-card, body.has-cursor [data-cursor] { cursor: none; }
  body.has-cursor input, body.has-cursor textarea, body.has-cursor select { cursor: auto; }
}

/* ── Cookie consent banner ── */
.cookie-banner {
  position: fixed; left: 50%; bottom: 22px;
  transform: translate(-50%, 150%);
  z-index: 1200; width: min(680px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  padding: 18px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  opacity: 0; transition: transform .5s var(--ease-out), opacity .5s var(--ease-out);
}
.cookie-banner.show { transform: translate(-50%, 0); opacity: 1; }
.cookie-text { flex: 1 1 280px; font-size: .84rem; color: var(--muted); line-height: 1.5; margin: 0; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { padding: 9px 18px; font-size: .8rem; }

/* ── Keyword marquee band ── */
.kw-marquee {
  overflow: hidden; background: var(--surface);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.kw-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: kw-scroll 38s linear infinite; }
.kw-item {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem); letter-spacing: -.02em;
  text-transform: uppercase; color: var(--fg-1); white-space: nowrap;
}
.kw-star { color: var(--violet); font-size: .85rem; }
@keyframes kw-scroll { to { transform: translateX(-50%); } }

/* ── Partner logo marquee ── */
.partners-sec { padding: 76px 0; background: var(--bg); }
.partners-eyebrow {
  text-align: center; font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 30px;
}
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.logo-track { display: flex; align-items: center; gap: 56px; width: max-content; animation: logo-scroll 48s linear infinite; }
.logo-item {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -.01em; color: var(--fg-3); white-space: nowrap; opacity: .8;
  transition: color .2s, opacity .2s;
}
.logo-item:hover { color: var(--fg-1); opacity: 1; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }

/* ── Works / case-study grid ── */
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.work-card {
  display: flex; flex-direction: column; border-radius: 24px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out),
              clip-path .9s var(--ease-out), opacity .8s var(--ease-out);
}
.work-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.work-media { position: relative; aspect-ratio: 16 / 11; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.work-media::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.18), transparent 60%); }
.work-emoji { position: relative; z-index: 1; font-size: 4.4rem; line-height: 1; filter: drop-shadow(0 8px 20px rgba(0,0,0,.25)); transition: transform .5s var(--ease-out); }
.work-card:hover .work-emoji { transform: scale(1.12) rotate(-4deg); }
.work-tags { position: absolute; left: 16px; bottom: 14px; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.work-tags span {
  font-size: .64rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #fff;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.28); padding: 5px 10px; border-radius: 999px;
}
.work-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; }
.work-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--fg-1); }
.work-full { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.work-arrow { font-size: 1.25rem; color: var(--fg-3); transition: transform .35s var(--ease-out), color .2s; }
.work-card:hover .work-arrow { transform: translateX(5px); color: var(--violet); }

/* ── Recognition ── */
.recog-sec { background: var(--surface); }
.recog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.recog-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 34px 26px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out),
              clip-path .9s var(--ease-out), opacity .8s var(--ease-out);
}
.recog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.recog-metric {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.6rem, 4.5vw, 3.4rem); letter-spacing: -.03em; line-height: 1; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.recog-label { font-weight: 700; font-size: .98rem; color: var(--fg-1); margin-bottom: 6px; }
.recog-note { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ── Testimonials slider ── */
.tmo-sec { background: var(--bg); }
.tmo-viewport { overflow: hidden; max-width: 860px; margin: 0 auto; }
.tmo-track { display: flex; transition: transform .6s var(--ease-out); }
.tmo-card { flex: 0 0 100%; padding: 8px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tmo-quote { width: 42px; height: 42px; color: var(--violet); opacity: .55; margin-bottom: 18px; }
.tmo-card blockquote {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.45; letter-spacing: -.02em;
  color: var(--fg-1); max-width: 680px;
}
.tmo-card figcaption { margin-top: 26px; display: flex; flex-direction: column; gap: 3px; }
.tmo-role { font-weight: 700; font-size: .95rem; color: var(--fg-1); }
.tmo-context { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.tmo-dots { display: flex; justify-content: center; gap: 9px; margin-top: 38px; }
.tmo-dots button { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: var(--line-strong); cursor: pointer; transition: background .25s, transform .25s; }
.tmo-dots button.on { background: var(--violet); transform: scale(1.3); }

/* ── From the lab (blog-style cards) ── */
.notes-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; flex-wrap: wrap; gap: 16px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.note-card {
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out),
              clip-path .9s var(--ease-out), opacity .8s var(--ease-out);
}
.note-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.note-media { aspect-ratio: 16 / 10; overflow: hidden; }
.note-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.note-card:hover .note-media img { transform: scale(1.06); }
.note-body { padding: 22px 22px 26px; }
.note-date { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.note-body h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; color: var(--fg-1); margin: 8px 0 6px; line-height: 1.3; }
.note-venue { font-size: .82rem; color: var(--muted); }

/* ── Mask reveal (clip-path unmask) — initial state only applies with JS (.js) ── */
.js .mask-reveal { clip-path: inset(0 0 100% 0); opacity: 0; will-change: clip-path, opacity; }
.js .mask-reveal.in { clip-path: inset(0 0 0 0); opacity: 1; }

/* ── Split-text headline (wrapped by ui-extras.js → [data-split]) ── */
.tt-split[data-split] .sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.tt-split[data-split] .sw-i { display: inline-block; transform: translateY(110%); opacity: 0; transition: transform .7s var(--ease-out), opacity .7s var(--ease-out); }
.tt-split[data-split].in .sw-i { transform: none; opacity: 1; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .works-grid, .notes-grid, .recog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .works-grid, .notes-grid, .recog-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-actions { justify-content: center; }
  .kw-item { font-size: 1.05rem; }
  .tmo-card blockquote { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kw-track, .logo-track { animation: none; }
  .tmo-track { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   INTERACTION LAYER — cursor label · scroll progress · page curtain ·
   hero cue · CTA spotlight · hide-on-scroll header · theme wipe
   ═══════════════════════════════════════════════════════════════ */

/* ── Cursor "View" label ── */
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--violet); color: #fff;
  font-family: var(--font-display); font-size: .6rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; scale: .3; transition: opacity .2s var(--ease-out), scale .2s var(--ease-out);
}
body.cursor-view .cursor-label { opacity: 1; scale: 1; }
body.cursor-view .cursor-ring, body.cursor-view .cursor-dot { opacity: 0 !important; }

/* ── Scroll-progress gauge ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1400;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

/* ── Page-transition curtain (auto-lifts via CSS; JS adds .cover on exit) ── */
.page-curtain {
  position: fixed; inset: 0; z-index: 1500; pointer-events: none;
  transform: translateY(-100%);
  background: linear-gradient(158deg, var(--violet), var(--cyan));
}
@media (prefers-reduced-motion: no-preference) {
  .curtain-in .page-curtain { animation: curtain-up .55s var(--ease-out) forwards; }
}
@keyframes curtain-up { from { transform: translateY(0); } to { transform: translateY(-100%); } }
.page-curtain.cover { animation: curtain-down .36s var(--ease-out) forwards !important; }
@keyframes curtain-down { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ── Hero scroll-cue (mouse indicator) ── */
.hero-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  width: 28px; height: 46px; border: 1.5px solid var(--line-strong); border-radius: 16px;
  display: flex; justify-content: center; padding-top: 8px; opacity: .85; transition: opacity .2s, border-color .2s;
}
.hero-cue:hover { opacity: 1; border-color: var(--violet); }
.hero-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--fg-2); animation: cue-bob 1.6s var(--ease-out) infinite; }
@keyframes cue-bob { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(13px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-cue span { animation: none; } }

/* ── CTA cursor spotlight ── */
.cta-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease-out);
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(94,230,168,0.18), transparent 70%);
}
.cta-spotlight.lit .cta-glow { opacity: 1; }

/* ── Hide-on-scroll header ── */
.site-header { transition: transform .38s var(--ease-out), background .3s var(--ease-out), backdrop-filter .3s var(--ease-out); }
.site-header.nav-hidden { transform: translateY(-100%); }

/* ── Theme-toggle circular wipe (View Transitions API) ── */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 0; }
::view-transition-new(root) { z-index: 1; }

/* ═══════════════════════════════════════════════════════════════
   QUALITY PASS — duotone research imagery · line-art work icons ·
   refined marquees
   ═══════════════════════════════════════════════════════════════ */

/* ── Duotone real photos behind research cards ── */
.ri-grid .ri-card:not(.ri-card-new) .ri-card-top { position: relative; overflow: hidden; }
.ri-card-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  filter: grayscale(1) contrast(1.03);
  transform: scale(1.03);
  transition: filter .6s var(--ease-out), transform .9s var(--ease-out);
}
.ri-card-tint { position: absolute; inset: 0; z-index: 1; mix-blend-mode: multiply; opacity: .82; }
.ri-grid .ri-card:not(.ri-card-new):hover .ri-card-photo { filter: grayscale(0) contrast(1.03); transform: scale(1.08); }
.ri-grid .ri-card:not(.ri-card-new) .ri-card-icon { position: relative; z-index: 2; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.28)); }

/* ── Line-art work icons (replaced emoji) ── */
.work-icon {
  position: relative; z-index: 1; width: 68px; height: 68px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
  transition: transform .5s var(--ease-out);
}
.work-card:hover .work-icon { transform: scale(1.1) translateY(-3px); }

/* ── Refined marquees — slower, edge-faded, more editorial ── */
.kw-marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.kw-item { font-size: clamp(1.2rem, 2.4vw, 1.9rem); letter-spacing: -.025em; }
.kw-star { opacity: .8; }
