/* ===== Variables — Pacific Ocean Theme ===== */
:root {
  --primary: #0c4a6e;
  --primary-light: #0369a1;
  --accent: #0891b2;
  --accent-light: #06b6d4;
  --bg: #f0f7ff;
  --bg-section: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(12,74,110,0.04);
  --shadow-md: 0 8px 30px rgba(12,74,110,0.08);
  --shadow-lg: 0 20px 60px rgba(12,74,110,0.12);
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Navigation ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(240,247,255,0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(12,74,110,0.06);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(12,74,110,0.08); }

.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  font-size: 1.1rem; font-weight: 800; color: var(--primary);
  letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-brand img { height: 28px; width: 28px; }
.nav-brand img.nav-logo { height: 30px; width: auto; margin-right: 2px; }

.nav-links { display: flex; align-items: center; gap: 2rem; }

.nav-link {
  position: relative; color: var(--text-secondary);
  font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4rem 0; transition: color 0.3s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); font-weight: 700; }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
}
.hamburger span { width: 22px; height: 2px; background: var(--text-primary); transition: all 0.3s; display: block; }

.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: rgba(240,247,255,0.98); backdrop-filter: blur(20px);
  z-index: 200; flex-direction: column; align-items: center;
  justify-content: center; gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { font-size: 1.1rem; }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }
}

/* ===== Hero ===== */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 40%, #f0f9ff 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(8,145,178,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -40%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(12,74,110,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-grid {
  display: flex; align-items: center; gap: 3rem;
}

.profile-img {
  width: 180px; height: 180px; border-radius: 20px;
  object-fit: cover; box-shadow: var(--shadow-lg); flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-img:hover { transform: scale(1.03) translateY(-4px); }

@media (max-width: 768px) {
  .hero { padding: 100px 0 60px; }
  .hero-grid { flex-direction: column; text-align: center; }
  .profile-img { width: 160px !important; height: 200px !important; }
}

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-section); }

.section-label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.section-title {
  font-size: 2rem; font-weight: 800; color: var(--primary);
  line-height: 1.2; margin-bottom: 1rem;
}
.section-title-sm {
  font-size: 1.25rem; font-weight: 700; color: var(--primary);
  margin-bottom: 1rem;
}
.track-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; min-height: 3.5rem;
}

/* ===== Cards ===== */
.card {
  background: white; border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-flat { box-shadow: none; }
.card-link { cursor: pointer; }

/* ===== Nav Cards (Home page) ===== */
.nav-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem;
}
.nav-card {
  background: white; border-radius: var(--radius); padding: 1.75rem;
  border: 1px solid var(--border); transition: all var(--transition);
  display: flex; align-items: flex-start; gap: 1rem;
}
.nav-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-3px);
  border-color: var(--accent);
}
.nav-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.2rem;
}
.nav-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.nav-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.nav-card .arrow {
  margin-left: auto; color: var(--text-muted);
  transition: transform 0.3s, color 0.3s; flex-shrink: 0; align-self: center;
}
.nav-card:hover .arrow { transform: translateX(4px); color: var(--accent); }

/* ===== News Timeline ===== */
.news-item {
  position: relative; padding-left: 1.75rem; padding-bottom: 1.75rem;
  border-left: 2px solid #e2e8f0; transition: all 0.3s;
}
.news-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.news-item::before {
  content: ''; position: absolute; left: -5.5px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #cbd5e0; border: 2px solid white; transition: all 0.3s;
}
.news-item:hover::before { background: var(--accent); transform: scale(1.3); }
.news-item.award::before { background: #d69e2e; }
.news-date { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.news-title { font-weight: 600; margin-top: 0.2rem; font-size: 0.95rem; }
.news-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }
.news-image {
  margin-top: 0.75rem; border-radius: var(--radius-sm);
  max-width: 320px; border: 1px solid var(--border);
}

/* ===== Publication Items ===== */
.pub-item {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  transition: all 0.3s; border-left: 3px solid transparent;
}
.pub-item:hover {
  background: white; border-left-color: var(--accent);
  box-shadow: 0 4px 20px rgba(12,74,110,0.06);
}
.pub-venue {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
  margin-right: 0.4rem; white-space: nowrap;
  vertical-align: middle;
}
/* Conference venues */
.pub-venue.conference { background: #dbeafe; color: #1e40af; }
/* Journal venues */
.pub-venue.journal { background: #d1fae5; color: #065f46; }
.pub-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.pub-text strong { color: var(--text-primary); }
.pub-link { color: var(--primary-light); text-decoration: none; font-weight: 500; }
.pub-link:hover { color: var(--accent); text-decoration: underline; }

.award-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.65rem; font-weight: 700;
  background: #fefcbf; color: #975a16;
  margin-right: 0.4rem; vertical-align: middle;
}

/* Year filter tabs */
.year-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem;
  position: sticky; top: 60px; background: var(--bg-section); z-index: 10;
  padding: 0.75rem 0;
}
.year-tab {
  padding: 0.35rem 0.9rem; border-radius: 20px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: all 0.3s; background: transparent;
  color: var(--text-secondary); border: 1px solid var(--border);
}
.year-tab:hover { background: #e0f2fe; border-color: #7dd3fc; }
.year-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

.pub-year-section { display: block; margin-bottom: 2rem; }
.pub-year-heading {
  font-size: 1.1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 0.75rem; padding-top: 0.5rem;
}

.space-y > * + * { margin-top: 0.25rem; }

/* ===== Student Cards ===== */
.student-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.student-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: all 0.3s;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit; cursor: pointer;
}
.student-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(12,74,110,0.08); transform: translateY(-4px);
}
.student-photo {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  display: block; background: #e0f2fe;
}
.student-avatar {
  width: 100%; aspect-ratio: 3/4;
  background: linear-gradient(135deg, #e0f2fe, #ecfeff);
  display: flex; align-items: center; justify-content: center;
}
.student-avatar svg { width: 48px; height: 48px; color: #7dd3fc; }
.student-text { padding: 1rem 1.25rem; }
.student-name { font-weight: 600; font-size: 1rem; }
.student-info { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.student-tagline { font-size: 0.75rem; color: #64748b; margin-top: 0.4rem; font-style: italic; }

/* ===== Member Profile Page ===== */
.member-header {
  display: flex; gap: 2.5rem; align-items: flex-start; margin-top: 1.5rem;
}
.member-photo-wrap { flex-shrink: 0; }
.member-photo {
  width: 200px; height: 260px; object-fit: cover;
  border-radius: 16px; display: block;
  border: 3px solid var(--border);
}
.member-avatar {
  width: 200px; height: 260px; border-radius: 16px;
  background: linear-gradient(135deg, #e0f2fe, #ecfeff);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--border);
}
.member-avatar svg { width: 64px; height: 64px; color: #7dd3fc; }
.member-info { flex: 1; padding-top: 0.5rem; }
.member-status {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.4rem;
}
.member-name {
  font-size: 2rem; font-weight: 800; color: var(--primary);
  line-height: 1.2; margin-bottom: 0.4rem;
}
.member-detail {
  font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem;
}
.member-tagline {
  font-size: 0.9rem; color: var(--text-muted); font-style: italic;
  margin-bottom: 1rem;
}
.member-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.member-tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600;
  background: #e0f2fe; color: var(--primary-light);
}
.member-bio {
  margin-top: 1.5rem; padding: 1.25rem 1.5rem;
  background: white; border-radius: var(--radius); border: 1px solid var(--border);
}
.member-bio p {
  color: var(--text-secondary); line-height: 1.7; font-size: 0.9rem;
}
@media (max-width: 768px) {
  .member-header { flex-direction: column; align-items: center; text-align: center; }
  .member-photo, .member-avatar { width: 160px; height: 200px; }
  .member-tags { justify-content: center; }
}

/* ===== Course Cards ===== */
.course-card {
  background: white; border-radius: var(--radius-sm); padding: 1.25rem;
  border: 1px solid var(--border); transition: all 0.3s;
}
.course-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(12,74,110,0.06);
}
.course-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.course-badge.grad { background: #ccfbf1; color: #0f766e; }
.course-badge.undergrad { background: #dbeafe; color: #1e40af; }
.course-name { font-weight: 600; margin-top: 0.5rem; font-size: 0.95rem; }

/* ===== Research Images ===== */
.research-img {
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.research-img:hover { transform: scale(1.02); }

/* ===== Hiring Banner ===== */
.hiring-banner {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 60%, #155e75 100%);
  border-radius: 20px; padding: 3rem; color: white;
  position: relative; overflow: hidden;
}
.hiring-banner::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.hiring-banner::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(14,116,144,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

/* ===== Slogan Section ===== */
.slogan-section {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #155e75 100%);
  padding: 3.5rem 0 3rem;
  position: relative; overflow: hidden;
  text-align: center;
}
.slogan-section::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 50px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23f0f7ff' d='M0 0h1440v20Q1200 50 720 30Q240 10 0 40V0z'/%3E%3C/svg%3E") no-repeat top center;
  background-size: 100% 100%;
}
.slogan-section::after {
  content: ''; position: absolute; top: 20%; right: 5%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.slogan-brand {
  font-size: 1.6rem; font-weight: 800; color: white;
  letter-spacing: 0.15em; margin-bottom: 0.3rem;
}
.slogan-full {
  font-size: 0.72rem; color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em; font-weight: 500;
  margin-bottom: 1.25rem;
}
.slogan-text {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem; font-weight: 300;
  letter-spacing: 0.02em; font-style: italic;
  max-width: 600px; margin: 0 auto;
  position: relative; z-index: 1;
}

/* ===== Email Obfuscation ===== */
.email-protected {
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem;
  transition: color 0.3s;
}
.email-protected:hover { color: var(--accent); }

/* ===== Tags / Pills ===== */
.tag {
  display: inline-block;
  padding: 0.4rem 1rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.3s; border: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-outline { background: white; border: 1px solid #cbd5e0; color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: #ecfeff; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(20px);
  transition: all 0.4s; box-shadow: 0 4px 15px rgba(12,74,110,0.3);
  z-index: 50; border: none;
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); transform: translateY(-2px); }

/* ===== Footer ===== */
.footer {
  padding: 1.5rem 0; border-top: 1px solid var(--border); background: white;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-text {
  font-size: 0.8rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.4rem;
}
.footer-text img { height: 20px; width: 20px; opacity: 0.5; }
.footer-text img.footer-logo { height: 22px; width: auto; opacity: 0.6; }
.footer-text strong { color: var(--primary); letter-spacing: 0.06em; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); transition: color 0.3s; }
.footer-links a:hover { color: var(--accent); }

/* ===== Scroll Animations ===== */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-left {
  opacity: 0; transform: translateX(-30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-left.visible { opacity: 1; transform: translateX(0); }

.fade-right {
  opacity: 0; transform: translateX(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

.stagger > * {
  opacity: 0; transform: translateY(15px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger.visible > * { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: 0.03s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.06s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.09s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.18s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.21s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.24s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.27s; }
.stagger.visible > *:nth-child(10) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(11) { transition-delay: 0.33s; }
.stagger.visible > *:nth-child(12) { transition-delay: 0.36s; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem;
  padding-top: 80px;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }
  .nav-cards { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .teaching-grid { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .slogan-brand { font-size: 1.3rem; }
  .slogan-text { font-size: 1rem; }
}

@media (max-width: 480px) {
  .student-grid { grid-template-columns: 1fr; }
}
