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

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

:root {
  --bg:        #f5f4f0;
  --surface:   #fdfcf8;
  --border:    #e2dfd8;
  --text:      #2c2a26;
  --muted:     #7a7670;
  --accent:    #3a6ea8;
  --accent-lt: #eaf0f8;
  --tag-bg:    #ede9e2;
  --tag-fg:    #3a4a5c;
  --radius:    8px;
  --max-w:     760px;
  --mono:      'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ─── Nav ──────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.25rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-lt);
}

/* ─── Main container ───────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ─── About page ───────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
  background: var(--border);
}

.profile-photo-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent-lt);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
}

.profile-info h1 {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.profile-info .role {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #245888; }

.btn-outline {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-lt); }

/* ─── Bio ──────────────────────────────────────────────────── */
.bio p {
  margin-bottom: 1.1rem;
  color: var(--text);
  font-size: 0.975rem;
}

.bio p:last-child { margin-bottom: 0; }

/* ─── Section titles ───────────────────────────────────────── */
.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

/* ─── Research interests ───────────────────────────────────── */
.research-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

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

.tag {
  background: var(--tag-bg);
  color: var(--tag-fg);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ─── Contact / PhD section ────────────────────────────────── */
.contact-section {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--accent-lt);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.contact-section p {
  font-size: 0.9rem;
  color: var(--text);
}

.contact-section a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.contact-section a:hover { text-decoration: underline; }

/* ─── Projects page ────────────────────────────────────────── */
.projects-intro {
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(45, 106, 159, 0.1);
}

.project-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.project-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.project-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-fg);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-card .desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-card .tags { margin-bottom: 1rem; }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-links  { justify-content: center; }
  .nav-brand      { font-size: 0.9rem; }
}
