/* ============================================
   Peeyush Kumar - Research Portfolio
   Clean academic design
   ============================================ */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-text-tertiary: #888;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --color-tag-bg: #f0f4ff;
  --color-tag-text: #2563eb;
  --color-section-alt: #f5f7fa;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 860px;
  --max-width-wide: 1100px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.2rem; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
h4 { font-size: 0.95rem; font-weight: 500; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

p { margin-bottom: 1rem; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: var(--max-width-wide); margin: 0 auto; padding: 0 1.5rem; }

/* ============================================
   Navigation
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-width-wide);
}

.nav-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
}
.nav-name:hover { color: var(--color-accent); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--color-text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle svg { width: 24px; height: 24px; stroke: var(--color-text); }

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 120px 0 60px;
}

.hero-content {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
}

.hero-text h1 { margin-bottom: 0.5rem; }

.hero-tagline {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.hero-affiliations {
  font-size: 0.9rem;
  color: var(--color-text-tertiary);
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: all 0.15s;
}

.hero-links a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  text-decoration: none;
  background: var(--color-tag-bg);
}

.hero-links a svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Sections
   ============================================ */
section {
  padding: 4rem 0;
}

section:nth-child(even) {
  background: var(--color-section-alt);
}

.section-header {
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-text);
}

.section-header h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  max-width: 700px;
}

/* ============================================
   Project Cards
   ============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

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

.project-card-body {
  padding: 1.25rem;
}

.project-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.project-card-body p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.project-links a {
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ============================================
   Publications
   ============================================ */
.pub-list {
  list-style: none;
}

.pub-year-group {
  margin-bottom: 2rem;
}

.pub-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.pub-item:last-child { border-bottom: none; }

.pub-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.4;
}

.pub-title a { color: var(--color-text); }
.pub-title a:hover { color: var(--color-accent); }

.pub-authors {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}

.pub-authors .me { font-weight: 600; color: var(--color-text); }

.pub-venue {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  font-style: italic;
  margin-top: 0.15rem;
}

.pub-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.pub-meta a {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* ============================================
   Patents
   ============================================ */
.patent-list { list-style: none; }

.patent-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.patent-item:last-child { border-bottom: none; }

.patent-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-accent);
  font-weight: 500;
}

.patent-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.1rem;
}

.patent-meta {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  margin-top: 0.1rem;
}

/* ============================================
   Mentorship
   ============================================ */
.mentee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.mentee-card {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.mentee-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.mentee-detail {
  font-size: 0.83rem;
  color: var(--color-text-secondary);
  margin-top: 0.15rem;
}

.mentee-outcome {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ============================================
   Talks & Service
   ============================================ */
.talks-list, .service-list {
  list-style: none;
}

.talks-list li, .service-list li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.talks-list li:last-child, .service-list li:last-child { border-bottom: none; }

.talk-year, .service-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

.subsection {
  margin-bottom: 2.5rem;
}

.subsection h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

/* ============================================
   Education & Awards
   ============================================ */
.edu-timeline {
  list-style: none;
  position: relative;
}

.edu-item {
  padding: 1rem 0 1rem 1.75rem;
  border-left: 2px solid var(--color-border);
  position: relative;
}

.edu-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 1.35rem;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.edu-degree {
  font-weight: 600;
  font-size: 1rem;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.edu-years {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
}

.edu-detail {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

.awards-list {
  list-style: none;
}

.awards-list li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.awards-list li:last-child { border-bottom: none; }

.award-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

/* ============================================
   News / Press
   ============================================ */
.news-list { list-style: none; }

.news-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.news-item:last-child { border-bottom: none; }

.news-source {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-title {
  font-size: 0.92rem;
  font-weight: 500;
  margin-top: 0.1rem;
}

.news-title a { color: var(--color-text); }
.news-title a:hover { color: var(--color-accent); }

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 2.5rem 0;
  background: var(--color-text);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  text-align: center;
}

footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: #fff; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }

  .hero { padding: 100px 0 40px; }

  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-photo img { width: 120px; height: 120px; }
  .hero-links { justify-content: center; }

  .project-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  .nav-toggle { display: block; }

  .talks-list li, .service-list li, .awards-list li {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (max-width: 480px) {
  .hero-photo img { width: 100px; height: 100px; }
  .mentee-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Utility
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 1.5rem; }
}
