/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  font-size: 18px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter",
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #0f172a 0, #020617 45%, #000 100%);
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
  line-height: 1.6;
}

::selection {
  background: rgba(56, 189, 248, 0.35);
  color: #f9fafb;
}

:root {
  --bg: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.9);
  --bg-soft: rgba(15, 23, 42, 0.7);
  --bg-alt: #020617;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-strong: #0ea5e9;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.25);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.85);
  --container-width: 1280px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  padding: 96px 0;
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
}

.section h2 {
  font-size: 2.3rem;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.section-lead {
  max-width: 640px;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.section-filters select,
.section-filters input[type="search"] {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font-size: 0.9rem;
}

.section-filters input::placeholder {
  color: var(--muted);
}

/* Make native date/time picker icons visible on dark background */
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  color-scheme: dark;
  padding-right: 2.2rem;
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
}

/* Hide default icon and draw our own light calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2' stroke='%23ffffff' stroke-width='1.6' fill='none'/%3E%3Cline x1='3' y1='9' x2='21' y2='9' stroke='%23ffffff' stroke-width='1.6'/%3E%3Cline x1='9' y1='2' x2='9' y2='6' stroke='%23ffffff' stroke-width='1.6'/%3E%3Cline x1='15' y1='2' x2='15' y2='6' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E");
}

.members-filters {
  margin-bottom: 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.75),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.site-header .container {
  padding-left: 16px;
  padding-right: 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.logo img {
  width: auto;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.logo-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-left: 24px;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.92), rgba(14, 165, 233, 0.95));
  color: #0b1120;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.75);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(1.03);
}

.back-to-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 18px 55px rgba(15, 23, 42, 0.75);
}

.nav a {
  position: relative;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  transition: width 0.25s ease;
}

.nav a:hover {
  color: #f9fafb;
}

.nav a:hover::after {
  width: 100%;
}

.nav a.nav-login {
  margin-left: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1120;
  font-weight: 600;
}
.nav a.nav-login::after {
  display: none;
}
.nav a.nav-login:hover {
  color: #0b1120;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.nav .nav-user {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
  color: #e5e7eb;
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav .nav-logout {
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1120;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  white-space: nowrap;
}
.nav .nav-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.nav-toggle {
  display: none;
  border: none;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.hero-section {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 5% 10%;
  border-radius: 999px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  z-index: 1;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 18px;
}

.hero-text p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-out;
  border: 1px solid transparent;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1120;
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.5);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 60px rgba(56, 189, 248, 0.65);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
}

.btn.secondary:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: var(--accent);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.hero-logo img {
  display: block;
  width: 360px;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5)) drop-shadow(0 0 24px rgba(56, 189, 248, 0.35));
}

.hero-card {
  width: 100%;
  max-width: 360px;
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: radial-gradient(circle at top left, #0f172a, #020617);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.4);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from 210deg,
    rgba(56, 189, 248, 0.6),
    transparent,
    rgba(129, 140, 248, 0.7),
    transparent,
    rgba(56, 189, 248, 0.6)
  );
  opacity: 0.5;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-card h2 {
  position: relative;
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.hero-card ul {
  position: relative;
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.hero-card li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  position: relative;
  padding: 20px 18px 18px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #0b1220, #020617);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.85);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
    border-color 0.18s ease-out;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 1);
  border-color: rgba(56, 189, 248, 0.8);
}

.card:hover::before {
  opacity: 1;
}

#professor-card-root {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.member-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.member {
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0;
  overflow: hidden;
}

.member-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.member-link-wrapper {
  display: block;
  color: inherit;
  text-decoration: none;
}

.member-link-wrapper:hover .member-content h4 {
  text-decoration: underline;
}

.member-photo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.member-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
  box-shadow: none;
}

.member-photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--accent-soft), rgba(15, 23, 42, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.9;
}

.member-content {
  padding: 1rem 1.25rem 1.25rem;
  text-align: center;
}

.member-content h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.member h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.member p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.member-content p:last-child {
  margin-bottom: 0;
}

.member-keywords {
  margin-top: 8px;
  font-size: 0.98rem;
  color: #cbd5f5;
  line-height: 1.45;
}

.member-links {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.member-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(2, 6, 23, 0.35);
  color: #e5e7eb;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.member-link-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(56, 189, 248, 0.12);
}

.member-profile {
  max-width: 900px;
  margin: 0 auto;
}

.member-profile-card {
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.5rem 1.75rem;
}

.member-profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.member-profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.member-profile-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-soft), rgba(15, 23, 42, 0.9));
  color: var(--accent);
}

.member-profile-meta h1 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
}

.member-profile-meta .line {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.member-profile-section {
  margin-top: 1.25rem;
}

.member-profile-section h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.professor-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #0b1220, #020617);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.professor-photo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-soft);
  overflow: hidden;
}

.professor-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.professor-info {
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
}

.professor-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.professor-title {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.professor-contact {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 8px;
}

.professor-contact a {
  color: var(--accent);
}

.members-root {
  margin-top: 8px;
}

.members-root h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--text);
}

.members-root h3:first-of-type {
  margin-top: 0;
}

.pub-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.pub-list li {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: start;
}

.pub-index {
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.pub-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pub-title {
  display: block;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
}

.pub-authors,
.pub-venue {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
}

.pub-link {
  display: inline-block;
  margin-top: 4px;
  width: fit-content;
  font-size: 0.85rem;
  color: var(--accent);
}

.pub-tags {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}

.project-meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.project-index {
  margin-right: 0.35rem;
  font-weight: 600;
  color: var(--muted);
}

.course-list {
  list-style: none;
  display: grid;
  gap: 16px;
}

.course {
  padding: 14px 14px 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.course h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.course p {
  font-size: 0.88rem;
  color: var(--muted);
}

#contact p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

#contact a {
  color: var(--accent);
}

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-top: 12px;
}

.contact-info {
  flex: 1 1 260px;
}

.contact-map {
  flex: 0 0 320px;
  max-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 220px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 22px 0 28px;
  background: rgba(2, 6, 23, 0.98);
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.section,
.hero-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.is-visible,
.hero-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .hero-section {
    padding-top: 64px;
  }

  .hero-visual {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  #professor-card-root {
    grid-template-columns: 1fr;
  }

  .member-list {
    grid-template-columns: 1fr;
  }

  .header-inner {
    height: 64px;
  }

  .nav {
    position: fixed;
    inset: 64px 16px auto 16px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: var(--shadow-soft);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  }

  .nav a {
    font-size: 0.95rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header.nav-open .nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hero-section {
    padding-top: 56px;
  }

  .section,
  .section-alt {
    padding: 72px 0;
  }

  .admin-wrap {
    padding: 1.25rem 1rem;
  }

  .admin-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2.1rem;
  }

  .hero-card {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .professor-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .professor-photo {
    flex: 0 0 auto;
  }
}

html {
  scroll-behavior: smooth;
}

