/* ============================================================
   views.css — page & component styles for public site + dashboard
   ============================================================ */

/* ---------------------------- HERO ----------------------------------- */
.hero { padding: calc(clamp(48px, 8vw, 96px) * var(--density)) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-name { font-size: clamp(40px, 6.4vw, 76px); line-height: 0.98; letter-spacing: -0.025em; margin: 18px 0 0; }
.hero-role { font-size: clamp(18px, 2.2vw, 23px); color: var(--accent); font-weight: 500; margin-top: 14px; font-family: var(--display); }
.hero-inst { color: var(--ink-2); font-size: 16px; margin-top: 4px; }
.hero-bio { color: var(--muted); font-size: 16.5px; line-height: 1.65; margin-top: 22px; max-width: 54ch; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.hero-right { position: relative; }
.hero-photo { aspect-ratio: 4/5; width: 100%; border-radius: var(--radius-lg); }
.hero-id { position: absolute; left: -10px; bottom: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 3px;
  font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); box-shadow: var(--shadow-2); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { max-width: 360px; }
  .hero-id { left: auto; right: 12px; }
}

/* ------------------------- STAT STRIP -------------------------------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.stat { padding: 24px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat-num { font-family: var(--display); font-size: clamp(26px, 3vw, 38px); font-weight: 600; letter-spacing: -0.02em; }
.stat-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@media (max-width: 700px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2){border-right:none;} .stat:nth-child(-n+2){border-bottom:1px solid var(--line);} }

/* ------------------------ HOME HIGHLIGHTS ---------------------------- */
.hl-wrap { margin-top: clamp(56px, 8vw, 90px); }
.hl-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 40px; }
.hl-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.hl-more { font-family: var(--mono); font-size: 12px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.hl-more:hover { gap: 9px; }
.hl-pubs { display: flex; flex-direction: column; }
.hl-pub { padding: 18px 0; border-top: 1px solid var(--line); display: block; transition: padding-left .18s; }
.hl-pub:first-child { border-top: none; }
.hl-pub:hover { padding-left: 8px; }
.hl-pub-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hl-yr { color: var(--muted); font-size: 12px; }
.hl-pub-title { font-family: var(--display); font-size: 17px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.hl-pub-venue { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.teach-now { padding: 22px; }
.teach-now-year { font-size: 13px; color: var(--accent); margin-bottom: 14px; letter-spacing: .05em; }
.teach-now-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.teach-now-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.teach-now-list .code { font-size: 12px; color: var(--muted); }
.teach-now-list .tn-title { font-size: 14px; color: var(--ink); }
.award-now { display: flex; gap: 14px; padding: 20px; margin-top: 16px; align-items: center; transition: border-color .15s, transform .12s; }
.award-now:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.award-now-icon { width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.award-now-yr { font-size: 11px; color: var(--accent); }
.award-now-title { font-family: var(--display); font-size: 15px; font-weight: 600; margin-top: 2px; }
.award-now-org { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 800px) { .hl-grid { grid-template-columns: 1fr; gap: 48px; } }

/* --------------------------- ABOUT ----------------------------------- */
.about-block { margin-top: clamp(64px, 9vw, 110px); }
.about-grid { display: grid; grid-template-columns: 240px 1fr; gap: 48px; border-top: 1px solid var(--line); padding-top: 44px; }
.about-aside { position: sticky; top: 90px; align-self: start; }
.about-links { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.about-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); width: fit-content; transition: color .14s, gap .14s; }
.about-link:hover { color: var(--accent); gap: 11px; }
.about-h { font-size: clamp(24px, 3vw, 34px); max-width: 18ch; line-height: 1.12; }
.about-p { color: var(--ink-2); font-size: 17px; line-height: 1.75; margin-top: 22px; max-width: 64ch; }
.about-interests { margin-top: 30px; }
.ai-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } .about-aside { position: static; } }

/* ---------------------------- PAGE ----------------------------------- */
.page { padding-top: clamp(40px, 6vw, 72px); min-height: 60vh; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.count-note { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* year grouping */
.year-group { margin-bottom: calc(48px * var(--density)); }
.year-rule { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.year-label { font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: 0.02em; }
.year-line { flex: 1; height: 1px; background: var(--line); }
.year-count { font-size: 11.5px; color: var(--faint); }

/* ------------------------- TEACHING ---------------------------------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.course-card { padding: 22px; display: flex; flex-direction: column; transition: border-color .15s, transform .12s, box-shadow .15s; }
.course-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.course-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.code-pill { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 3px; letter-spacing: 0.04em; }
.course-title { font-size: 19px; line-height: 1.2; }
.course-sum { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 10px; flex: 1; }
.course-meta { display: flex; gap: 6px; font-size: 12px; color: var(--ink-2); margin-top: 16px; flex-wrap: wrap; }
.materials { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.material { display: flex; align-items: center; gap: 9px; padding: 7px 8px; margin: 0 -8px; border-radius: var(--radius); font-size: 13.5px; color: var(--ink-2); transition: background .13s, color .13s; }
.material:hover { background: var(--surface-2); color: var(--accent); }
.material span:nth-child(2) { flex: 1; }
.mat-type { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }

/* ----------------------- PUBLICATIONS -------------------------------- */
.pub-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 9px 13px; color: var(--muted); min-width: 280px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 16%, transparent); }
.search-box.sm { min-width: 180px; padding: 7px 11px; }
.search-input { border: none; outline: none; background: transparent; font-family: var(--sans); font-size: 14px; color: var(--ink); width: 100%; }
.groupby { display: flex; align-items: center; gap: 10px; }
.gb-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg button { border: none; background: var(--surface); padding: 7px 14px; font-size: 13px; color: var(--ink-2); border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--accent); color: var(--on-accent); }

.pub-list { display: flex; flex-direction: column; }
.pub-item { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.pub-item:first-child { border-top: none; }
.pub-spine { padding-top: 2px; }
.pub-title { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.pub-authors { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; }
.pub-venue { font-size: 13px; color: var(--accent); margin-top: 5px; }
.pub-abstract { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 12px; max-width: 72ch; }
.pub-links { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.pub-link { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; padding-bottom: 2px; border-bottom: 1px solid var(--line-2); transition: color .14s, border-color .14s; }
.pub-link:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 640px) { .pub-item { grid-template-columns: 1fr; gap: 12px; } }

/* --------------------------- AWARDS ---------------------------------- */
.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 70px 32px 1fr; gap: 0; align-items: start; }
.tl-year { font-size: 14px; color: var(--accent); padding-top: 22px; text-align: right; padding-right: 4px; }
.tl-dot { display: flex; justify-content: center; position: relative; }
.tl-dot::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); left: 50%; }
.tl-item:first-child .tl-dot::before { top: 24px; }
.tl-item:last-child .tl-dot::before { bottom: auto; height: 24px; }
.tl-dot span { width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); margin-top: 24px; z-index: 1; }
.tl-card { padding: 20px 22px; margin: 12px 0; flex: 1; transition: border-color .15s; }
.tl-card:hover { border-color: var(--accent-line); }
.tl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tl-title { font-size: 18px; }
.tl-org { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.tl-sum { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 10px; }
@media (max-width: 560px){ .tl-item { grid-template-columns: 52px 24px 1fr; } .tl-year{font-size:12px;} }

/* -------------------------- RESEARCH --------------------------------- */
.research-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.research-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .12s, box-shadow .15s; }
.research-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.research-fig { height: 150px; border: none; border-bottom: 1px solid var(--line); }
.research-pad { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.research-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.research-period { font-size: 11.5px; color: var(--muted); }
.research-title { font-size: 18px; line-height: 1.25; }
.research-sum { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 10px; flex: 1; }
.research-meta { display: flex; flex-direction: column; gap: 3px; margin-top: 14px; }
.research-meta .mono { font-size: 11.5px; color: var(--ink-2); }
.research-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* -------------------------- STUDENTS --------------------------------- */
.student-list { display: flex; flex-direction: column; gap: 10px; }
.student-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; transition: border-color .15s; }
.student-row:hover { border-color: var(--line-2); }
.student-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 500; flex-shrink: 0; }
.student-main { flex: 1; min-width: 0; }
.student-name { font-weight: 500; font-size: 15.5px; }
.student-topic { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.student-meta { display: flex; align-items: center; gap: 12px; }
.student-year { font-size: 12px; color: var(--muted); }
@media (max-width: 600px){ .student-topic{ display:none; } }

/* ---------------------------- TALKS ---------------------------------- */
.talk-list { display: flex; flex-direction: column; }
.talk-row { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 18px; align-items: center; padding: 18px 12px; margin: 0 -12px; border-top: 1px solid var(--line); border-radius: var(--radius); transition: background .13s; }
.talk-row:first-child { border-top: none; }
.talk-row:hover { background: var(--surface-2); }
.talk-date { font-size: 12.5px; color: var(--accent); }
.talk-title { font-family: var(--display); font-size: 16.5px; font-weight: 500; line-height: 1.3; }
.talk-event { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.talk-ext { color: var(--faint); }
@media (max-width: 640px){ .talk-row { grid-template-columns: 1fr auto; } .talk-date{ grid-column:1; } }

/* --------------------------- CONTACT --------------------------------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 8px; }
.contact-line { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ci-icon { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.ci-label { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ci-val { display: block; font-size: 15px; color: var(--ink); margin-top: 2px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; }
.contact-form { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.contact-sent { text-align: center; padding: 24px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.contact-sent .ci-icon { width: 48px; height: 48px; border: none; }
@media (max-width: 720px){ .contact-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ===========================================================
   ADMIN — login
   =========================================================== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(120% 100% at 50% 0%, color-mix(in oklch, var(--accent) 7%, var(--bg)), var(--bg) 60%); }
.login-card { width: 100%; max-width: 400px; padding: 36px 34px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: var(--shadow-3); }
.login-mark { width: 52px; height: 52px; border-radius: var(--radius-lg); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; margin-bottom: 4px; }
.login-title { font-size: 24px; }
.login-sub { font-size: 14px; text-align: center; margin-top: -6px; }
.login-hint { font-size: 11.5px; color: var(--muted); background: var(--surface-2); padding: 8px 14px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.login-back { font-size: 13px; color: var(--muted); margin-top: 4px; }
.login-back:hover { color: var(--accent); }

/* ===========================================================
   ADMIN — dashboard
   =========================================================== */
.dash { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.dash-side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.dash-brand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 20px; }
.dash-brand .mark { width: 38px; height: 38px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.dash-brand-name { font-family: var(--display); font-weight: 600; font-size: 15px; }
.dash-brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius); border: none; background: transparent; color: var(--ink-2); font-size: 14px; font-family: var(--sans); width: 100%; text-align: left; transition: background .13s, color .13s; }
.dash-nav-item span:first-of-type { flex: 1; }
.dash-nav-item:hover { background: var(--surface-2); color: var(--ink); }
.dash-nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.dash-nav-count { font-size: 11px; color: var(--faint); background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }
.dash-nav-item.active .dash-nav-count { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent); }
.dash-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.dash-nav-item.subtle { color: var(--muted); font-size: 13px; }
.dash-main { padding: 36px clamp(20px, 4vw, 48px); overflow-x: hidden; }

.rm { max-width: 1000px; }
.rm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.rm-title { font-size: 26px; }
.rm-count { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rm-actions { display: flex; gap: 10px; align-items: center; }

/* overview */
.ov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.ov-card { padding: 22px; text-align: left; position: relative; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .15s; }
.ov-card:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ov-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.ov-num { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.ov-label { color: var(--muted); font-size: 14px; margin-top: 4px; }
.ov-go { position: absolute; top: 22px; right: 22px; color: var(--faint); transition: color .15s, transform .15s; }
.ov-card:hover .ov-go { color: var(--accent); transform: translateX(2px); }
.ov-recent { }
.ov-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ov-row:first-of-type { border-top: none; }
.ov-row-title { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-row-yr { font-size: 12px; color: var(--muted); }
@media (max-width: 760px){ .ov-grid { grid-template-columns: repeat(2,1fr); } }

/* profile manager */
.profile-cards { display: flex; flex-direction: column; gap: 18px; }

/* dashboard responsive */
@media (max-width: 820px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .dash-brand { padding: 0 8px 0 0; width: 100%; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .dash-nav-item { width: auto; }
  .dash-nav-item .dash-nav-count { display: none; }
  .dash-nav-item span:first-of-type { flex: none; }
  .dash-side-foot { margin: 0; border: none; padding: 0; flex-direction: row; width: 100%; }
}
