:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #3b82f6;
  --accent-glow: #60a5fa;
  --accent-secondary: #8b5cf6;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #f8fafc;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --border: #334155;
  --gradient-1: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    var(--bg);
  z-index: -1;
}

/* Header */
.site-header {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 100%);
  backdrop-filter: blur(10px);
  padding: 50px 20px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.site-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-header .tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

nav a:hover {
  color: var(--text-bright);
  background: var(--bg-card);
  border-color: var(--border);
}

nav a.active {
  color: var(--accent-glow);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Main content */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 20px;
}

/* Hero section */
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 50px;
  align-items: start;
  margin-bottom: 60px;
  padding: 40px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
}

.hero-image img {
  width: 220px;
  height: 275px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
}

.hero-content h2 {
  font-size: 1.8rem;
  color: var(--text-bright);
  margin-bottom: 18px;
  font-weight: 600;
}

.hero-content p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.05rem;
}

.hero-content a {
  color: var(--accent-glow);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.hero-content a:hover {
  border-color: var(--accent-glow);
}

.hero-links {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient-1);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.hero-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

/* Section headings */
.section-title {
  font-size: 1.5rem;
  color: var(--text-bright);
  margin: 50px 0 25px;
  padding-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-1);
  border-radius: 3px;
}

/* Event cards */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.event-card {
  padding: 28px;
  border-radius: 16px;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.event-card:hover {
  transform: translateY(-4px);
}

.event-card.purple {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.event-card.green {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
}

.event-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.event-card p {
  font-size: 0.9rem;
  opacity: 0.95;
  margin-bottom: 8px;
}

.event-card a {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Project cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.project-card-content {
  padding: 24px;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-bright);
}

.project-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.project-card h3 a:hover {
  color: var(--accent-glow);
}

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

.project-tag {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-glow);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  margin-top: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* NSF Banner */
.nsf-banner {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%);
  color: white;
  padding: 35px;
  border-radius: 16px;
  margin: 25px 0;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: 0 4px 20px rgba(3, 105, 161, 0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

.nsf-banner h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.nsf-banner p {
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.6;
}

.nsf-banner a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Article content */
article h1 {
  font-size: 2.2rem;
  color: var(--text-bright);
  margin-bottom: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.content {
  font-size: 1.05rem;
}

.content h2 {
  font-size: 1.6rem;
  color: var(--text-bright);
  margin: 45px 0 18px;
  font-weight: 600;
}

.content h3 {
  font-size: 1.25rem;
  color: var(--text-bright);
  margin: 30px 0 14px;
}

.content p {
  margin-bottom: 1.3em;
  color: var(--text);
}

.content a {
  color: var(--accent-glow);
  text-decoration: none;
  border-bottom: 1px solid rgba(96, 165, 250, 0.3);
  transition: border-color 0.2s;
}

.content a:hover {
  border-color: var(--accent-glow);
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 25px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.content figure {
  margin: 30px 0;
}

.content figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

.content blockquote {
  border-left: 4px solid var(--accent);
  padding: 20px 28px;
  margin: 30px 0;
  background: var(--bg-card);
  border-radius: 0 12px 12px 0;
  color: var(--text);
}

.content ul, .content ol {
  margin: 1.3em 0;
  padding-left: 1.8em;
}

.content li {
  margin-bottom: 0.6em;
  color: var(--text);
}

.content code {
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  color: var(--accent-glow);
  border: 1px solid var(--border);
}

.content pre {
  background: var(--primary-light);
  color: var(--text);
  padding: 24px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid var(--border);
}

/* Lists outside content */
ul:not(.content ul) {
  list-style: none;
  padding-left: 0;
}

ul:not(.content ul) li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text);
}

ul:not(.content ul) li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

ul:not(.content ul) a {
  color: var(--accent-glow);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

ul:not(.content ul) a:hover {
  border-color: var(--accent-glow);
}

/* Footer */
.site-footer {
  background: var(--primary-light);
  color: var(--text-muted);
  padding: 50px 20px;
  margin-top: 80px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent-glow);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header h1 { font-size: 2rem; }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px;
  }
  .hero-image img {
    width: 180px;
    height: 225px;
    margin: 0 auto;
  }
  .hero-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  nav { gap: 6px; }
  nav a { padding: 8px 16px; font-size: 0.9rem; }
  .project-grid { grid-template-columns: 1fr; }
  .nsf-banner { flex-direction: column; text-align: center; }
}
