/* css/style.css */

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

/* Base image rule */
img {
  display: block;
  max-width: 100%;
}

:root {
  --ink: #0f172a;
  --ink-muted: #475569;
  --accent: #3b82f6;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --paper: #f8fafc;
  --panel: #ffffff;
  --border: rgba(148, 163, 184, 0.3);
  --shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 14px 28px rgba(15, 23, 42, 0.08);
}

/* Body and container */
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #e0f2fe 0%, #f8fafc 45%, #eef2ff 100%);
  color: var(--ink);
  line-height: 1.6;
  padding: 30px 16px 42px;
}

.container {
  max-width: 1120px;
  margin: auto;
  background: var(--panel);
  padding: 28px 36px 36px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Header */
header {
  margin-bottom: 30px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.header-grid {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 28px;
  align-items: start;
}

.profile-wrapper {
  width: 132px;
  height: 132px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 16px 28px rgba(30, 64, 175, 0.18);
}

.profile-wrapper .profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-content h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 2.35rem;
  letter-spacing: 0.3px;
  color: var(--ink);
  margin-bottom: 6px;
}

.bio {
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.contact-block {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  color: var(--ink);
}

.contact-label {
  font-weight: 600;
  color: var(--ink);
}

.profile-links a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.profile-links a:hover {
  text-decoration: underline;
}

main {
  display: grid;
  gap: 22px;
}

/* Sections */
section {
  padding: 22px 22px 18px;
  background: var(--panel);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  font-family: "Playfair Display", "Times New Roman", serif;
  color: var(--ink);
  margin-bottom: 12px;
  font-size: 1.5rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 12px;
}

h2::before {
  content: "";
  width: 30px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(59, 130, 246, 0.3));
}

h3 {
  color: var(--ink);
  font-size: 1.12rem;
  margin-bottom: 6px;
}

/* Experience entries */
.experience {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
  margin-bottom: 14px;
}

.experience:last-child {
  margin-bottom: 0;
}

.experience .logo-wrapper {
  width: 64px;
  height: 64px;
  background-color: #fff;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.experience .logo-wrapper .logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.experience p {
  margin-bottom: 6px;
  color: var(--ink-muted);
}

.experience ul {
  list-style-type: disc;
  margin-left: 20px;
  color: var(--ink);
}

/* Publications styling */
.publications ul {
  list-style-type: none;
  margin: 0;
  display: grid;
  gap: 14px;
}

.publications .pub-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
}

.publications .pub-image-wrapper {
  width: 146px;
  height: 108px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.publications .pub-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publications .pub-text strong {
  display: block;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.publications .pub-spotlight {
  color: #15803d;
  font-weight: 400;
}

.publications a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.publications a:hover {
  text-decoration: underline;
}

/* TAships styling */
.ta-ships .experience {
  margin-bottom: 14px;
}

.ta-ships ul {
  list-style-type: disc;
  margin-left: 20px;
}

.ta-ships li {
  margin-bottom: 6px;
}

a {
  color: var(--accent-strong);
  text-decoration-color: rgba(59, 130, 246, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

img {
  border-radius: inherit;
}

html {
  scroll-behavior: smooth;
}

#publications,
#education,
#experience,
#ta-ships {
  scroll-margin-top: 80px; /* adjust if needed */
}

.top-nav {
  position: sticky;
  top: 12px;
  z-index: 20;

  display: flex;
  justify-content: center;   /* centers the words */
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  width: 100%;               /* reach container edges */
  margin: 0 0 18px;          /* no auto */
  padding: 12px;

  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.top-nav a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.top-nav a:hover {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-strong);
}

.award-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
}

/* Responsive adjustments */
@media (max-width: 860px) {
  .container {
    padding: 24px 22px 30px;
  }

  .header-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .contact-block {
    justify-items: center;
  }

  .profile-links {
    text-align: center;
  }

  .experience,
  .publications .pub-item {
    grid-template-columns: 1fr;
  }

  .experience .logo-wrapper,
  .publications .pub-image-wrapper {
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  body {
    padding: 18px 12px 30px;
  }

  .container {
    padding: 18px 14px 24px;
  }

  h2 {
    font-size: 1.28rem;
  }

  header {
    padding: 18px;
  }
}
