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

:root {
  --bg:          #080d18;
  --surface:     #0d1526;
  --card:        #111827;
  --border:      #1e293b;
  --accent:      #818cf8;
  --accent-dim:  rgba(129, 140, 248, 0.12);
  --accent-glow: rgba(129, 140, 248, 0.18);
  --text:        #e2e8f0;
  --muted:       #94a3b8;
  --faint:       #475569;
  --radius:      10px;
  --nav-h:       64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #a5b4fc; }

img { display: block; max-width: 100%; }

ul { list-style: none; }

/* ============================================================
   Nav
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(8, 13, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.nav-logo:hover { color: var(--accent); }

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ============================================================
   Hero
   ============================================================ */
#hero {
  height: clamp(220px, 25vw, 350px);
  overflow: hidden;
  background: url("../../images/brain_banner.png") center / cover no-repeat var(--bg);
}

.banner-links {
  background: var(--surface);
  padding: 1.25rem 2rem 0;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: rgba(8, 13, 24, 0.72);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hero-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(129, 140, 248, 0.14);
}

/* ============================================================
   Shared section styles
   ============================================================ */
section {
  padding: 6rem 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ============================================================
   About
   ============================================================ */
#about { background: var(--surface); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-text h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  margin-top: 2rem;
}
.about-text h3:first-child { margin-top: 0; }

.about-text ul {
  list-style: none;
  padding: 0;
}

.about-text ul li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.about-text ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.about-image-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.about-image-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  filter: grayscale(20%);
  transition: filter 0.3s;
}
.about-image-wrap img:hover { filter: grayscale(0%); }

/* ============================================================
   Research
   ============================================================ */
#research { background: var(--bg); }

.papers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.paper-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.paper-card:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-3px);
}

.paper-img-wrap {
  width: 100%;
  height: 180px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.paper-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.paper-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.venue-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.paper-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.paper-abstract {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.25rem;
  transition: gap 0.2s;
}
.paper-link:hover { gap: 0.55rem; color: #a5b4fc; }

/* ============================================================
   Contact
   ============================================================ */
#contact {
  background: var(--surface);
  text-align: center;
}

#contact .section-header {
  margin-bottom: 2rem;
}

.contact-body {
  max-width: 520px;
  margin: 0 auto;
}

.contact-body p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.contact-email:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--faint);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-image-wrap {
    position: static;
    max-width: 240px;
    margin: 0 auto;
  }
  .papers-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  section { padding: 4rem 0; }
  .nav-inner { padding: 0 1.25rem; }
  .container { padding: 0 1.25rem; }
  #hero { height: 220px; }
  .banner-links { padding: 1rem 1.25rem 0; }
  .hero-links { gap: 0.5rem; }
  .hero-link span { display: none; }
  .hero-link { padding: 0.55rem 0.75rem; }
}
