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

:root {
  --navy:    #1a2e4a;
  --blue:    #2563eb;
  --blue-lt: #dbeafe;
  --red:     #ab0520;
  --gray:    #64748b;
  --light:   #f8fafc;
  --border:  #e2e8f0;
  --text:    #1e293b;
  --radius:  10px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--light);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ── */
header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
nav {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem; gap: 1rem;
}
.site-name {
  color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: .02em;
  white-space: nowrap;
}
.site-name span { color: #93c5fd; }
nav ul { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
nav ul a {
  color: #cbd5e1; font-size: .875rem; font-weight: 500;
  padding: .25rem 0; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
nav ul a:hover, nav ul a.active {
  color: #fff; border-color: #93c5fd; text-decoration: none;
}

/* ── HERO (home page) ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d4a6e 100%);
  color: #fff;
  padding: 4rem 1.5rem 3rem;
}
.hero-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; gap: 3rem; flex-wrap: wrap;
}
.hero-photo {
  width: 160px; height: 200px;
  border-radius: var(--radius); object-fit: cover;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); flex-shrink: 0;
}
.hero-text h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.15; margin-bottom: .5rem; }
.hero-text .title { font-size: 1.1rem; color: #93c5fd; font-weight: 500; margin-bottom: 1.25rem; }
.hero-meta { display: flex; flex-direction: column; gap: .35rem; }
.hero-meta span { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: #cbd5e1; }
.cv-btn {
  display: inline-block; margin-top: 1.5rem;
  background: var(--red); color: #fff;
  padding: .6rem 1.4rem; border-radius: 6px;
  font-weight: 600; font-size: .9rem;
  transition: background .15s, transform .1s;
}
.cv-btn:hover { background: #8a0418; text-decoration: none; transform: translateY(-1px); }

/* ── PAGE HEADER (non-home pages) ── */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, #2d4a6e 100%);
  color: #fff; padding: 2.5rem 1.5rem;
}
.page-header-inner { max-width: 960px; margin: 0 auto; }
.page-header h1 { font-size: 1.9rem; font-weight: 800; }
.page-header p { color: #93c5fd; margin-top: .4rem; font-size: .95rem; }

/* ── MAIN LAYOUT ── */
main {
  max-width: 960px; margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.two-col {
  display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start;
}

/* ── CARDS ── */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden;
}
.card + .card { margin-top: 1.5rem; }
.card-header {
  background: var(--navy); color: #fff;
  padding: .7rem 1.25rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.card-body { padding: 1.25rem; }

/* ── TAGS ── */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  background: var(--blue-lt); color: var(--blue);
  padding: .3rem .75rem; border-radius: 20px; font-size: .85rem; font-weight: 500;
}

/* ── NEWS ── */
.news-list { list-style: none; }
.news-item { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-badge {
  display: inline-block;
  background: #fef3c7; color: #92400e;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: .15rem .5rem;
  border-radius: 4px; margin-bottom: .3rem;
}
.news-badge.award { background: #dcfce7; color: #166534; }
.news-item p { font-size: .9rem; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.link-list { list-style: none; }
.link-list li { border-bottom: 1px solid var(--border); }
.link-list li:last-child { border-bottom: none; }
.link-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 0; font-size: .9rem; font-weight: 500; color: var(--text);
  transition: color .15s;
}
.link-list a:hover { color: var(--blue); text-decoration: none; }
.link-list .arrow { color: var(--gray); font-size: .8rem; }
.contact-detail { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; margin-bottom: .7rem; }
.contact-detail:last-child { margin-bottom: 0; }
.contact-label { color: var(--gray); min-width: 56px; flex-shrink: 0; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding-top: .1rem; }

/* ── PROJECT CARDS ── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.project-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
  box-shadow: var(--shadow);
}
.project-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.project-card p { font-size: .875rem; color: var(--gray); line-height: 1.5; }
.project-card a { font-size: .8rem; font-weight: 600; margin-top: .6rem; display: inline-block; }
.badge-current { display: inline-block; background: #dcfce7; color: #166534; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 4px; margin-left: .4rem; vertical-align: middle; }
.badge-past { background: #f1f5f9; color: var(--gray); }

/* ── PUBLICATIONS ── */
.pub-jump { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.pub-jump a {
  background: var(--navy); color: #fff;
  padding: .4rem .9rem; border-radius: 6px; font-size: .85rem; font-weight: 600;
  transition: background .15s;
}
.pub-jump a:hover { background: var(--blue); text-decoration: none; }
.pub-section { margin-bottom: 2.5rem; }
.pub-section h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); padding-bottom: .4rem; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
.pub-entry { padding: .9rem 0; border-bottom: 1px solid var(--border); }
.pub-entry:last-child { border-bottom: none; }
.pub-title { font-weight: 700; font-size: .95rem; color: var(--text); }
.pub-authors { font-size: .85rem; color: var(--gray); margin: .2rem 0; }
.pub-venue { font-size: .85rem; font-style: italic; color: var(--text); }
.pub-links { margin-top: .4rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.pub-links a { font-size: .8rem; font-weight: 600; }
.pub-award { display: inline-block; background: #dcfce7; color: #166534; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 4px; margin-left: .5rem; }
.pub-nominee { background: #fef3c7; color: #92400e; }

/* ── STUDENTS ── */
.student-section { margin-bottom: 2rem; }
.student-section h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); padding-bottom: .4rem; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.student-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: .85rem 1rem; box-shadow: var(--shadow);
}
.student-card .name { font-weight: 600; font-size: .95rem; }
.student-card .name a { color: var(--text); }
.student-card .name a:hover { color: var(--blue); }
.student-card .meta { font-size: .8rem; color: var(--gray); margin-top: .2rem; }
.student-card .placement { font-size: .8rem; color: var(--gray); }

/* ── COURSE PAGE ── */
.course-hero {
  background: linear-gradient(135deg, #0f2540 0%, var(--navy) 100%);
  color: #fff; padding: 2.5rem 1.5rem;
}
.course-hero-inner { max-width: 960px; margin: 0 auto; }
.course-hero h1 { font-size: 1.6rem; font-weight: 800; }
.course-hero .subtitle { color: #93c5fd; margin-top: .3rem; font-size: .95rem; }
.course-nav {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 56px; z-index: 90;
}
.course-nav-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; gap: 0; overflow-x: auto;
}
.course-nav a {
  display: block; padding: .7rem 1rem; font-size: .8rem; font-weight: 600;
  color: var(--gray); white-space: nowrap; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.course-nav a:hover { color: var(--navy); border-color: var(--navy); text-decoration: none; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.info-item { background: var(--light); border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; }
.info-item .label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); }
.info-item .value { font-size: .9rem; font-weight: 600; margin-top: .2rem; }
.topic-list { list-style: none; }
.topic-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; display: flex; align-items: baseline; gap: .6rem; }
.topic-list li:last-child { border-bottom: none; }
.topic-list li::before { content: "→"; color: var(--blue); font-weight: 700; flex-shrink: 0; }
.person-block { padding: .5rem 0; font-size: .9rem; }
.person-block + .person-block { border-top: 1px solid var(--border); }
.person-block .pname { font-weight: 600; }
.person-block .pdetail { color: var(--gray); font-size: .85rem; }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2rem 1.5rem;
  color: var(--gray); font-size: .8rem;
  border-top: 1px solid var(--border); background: #fff;
  margin-top: 2rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .hero-text h1 { font-size: 1.75rem; }
  .hero-meta { align-items: center; }
  .two-col { grid-template-columns: 1fr; }
  nav ul { gap: .9rem; }
  .site-name { font-size: .85rem; }
  .project-grid { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .student-grid { grid-template-columns: 1fr; }
}
