/* ============================================================
   Jacob Eisenstein – Modern Academic Portfolio
   Design: Dark mode, compact academic layout, tight vertical spacing
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:           #0d1117;
  --bg-surface:   #161b22;
  --bg-card:      #1c2128;
  --border:       #30363d;
  --border-light: #21262d;

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;

  --accent:       #58a6ff;
  --accent-dim:   rgba(88, 166, 255, 0.1);
  --green:        #3fb950;
  --purple:       #bc8cff;

  --radius-sm:  6px;
  --radius-md:  8px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

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

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

a:hover {
  text-decoration: underline;
}

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Nav ────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
  text-decoration: none;
}

/* ── Hero / Profile ─────────────────────────────────────────── */
.hero {
  padding: 24px 0 20px;
}

.profile-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.profile-photo img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--border);
  display: block;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

.profile-title {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}

.profile-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.profile-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}

.profile-link svg {
  width: 13px;
  height: 13px;
}

.divider {
  height: 1px;
  background: var(--border);
}

/* ── Sections ───────────────────────────────────────────────── */
main {
  padding-bottom: 30px;
}

.section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.section:last-child {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.section-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.research-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Research Areas & Papers ───────────────────────────────── */
.research-area {
  margin-bottom: 16px;
}

.research-area-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.paper-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.paper-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.paper-item:hover {
  border-color: var(--border);
  background: var(--bg-card);
  text-decoration: none;
}

.paper-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 2px;
}

.paper-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.paper-venue {
  color: var(--purple);
  font-weight: 500;
}

/* ── Professional Service List ─────────────────────────────── */
.service-list {
  padding-left: 20px;
  margin: 0;
  list-style-type: disc;
}

.service-item {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}

.service-item strong {
  color: var(--text-primary);
}

/* ── Teaching & Advisees ────────────────────────────────────── */
.teaching-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.course-list {
  list-style: none;
  margin-bottom: 16px;
}

.course-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.course-item:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}

.course-term {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}

.course-code {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--purple);
  width: 95px;
  flex-shrink: 0;
}

.advisees-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.advisee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px;
  list-style: none;
}

.advisee-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-secondary);
}

.advisee-card:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

.advisee-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.advisee-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.advisee-position {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .profile-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-links {
    justify-content: center;
  }
  .advisee-grid {
    grid-template-columns: 1fr;
  }
}
