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

:root {
  --text: #222;
  --text-light: #555;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --bg: #fff;
  --border: #e5e7eb;
  --nav-bg: #fafafa;
  --max-width: 760px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

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

/* ── Navigation ── */
.navbar {
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-brand:hover {
  text-decoration: none;
  color: var(--link);
}

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

.nav-links a {
  color: var(--text-light);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--link);
  text-decoration: none;
}

/* ── Profile / About ── */
.profile-section {
  padding: 3rem 0 2rem;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.profile-photo img {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-info h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.profile-tagline {
  color: var(--text-light);
  font-size: 1rem;
}

.profile-bio {
  font-size: 1rem;
  line-height: 1.8;
}

.profile-bio p {
  margin-bottom: 1rem;
}

.profile-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.profile-link {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--link);
  border-radius: 3px;
  color: var(--link);
  transition: background 0.15s, color 0.15s;
}

.profile-link:hover {
  background: var(--link);
  color: #fff;
  text-decoration: none;
}

/* ── Gallery ── */
.gallery-section {
  padding: 2rem 0;
}

.gallery-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-item figcaption {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.4rem;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Publications ── */
.publications-section {
  padding: 2rem 0;
}

.publications-section h1,
.publications-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.publication-list {
  list-style: none;
  counter-reset: pub-counter;
}

.publication-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.pub-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--link);
  border-radius: 3px;
  color: var(--link);
  transition: background 0.15s, color 0.15s;
}

.pub-link:hover {
  background: var(--link);
  color: #fff;
  text-decoration: none;
}

/* ── Blog ── */
.blog-section {
  padding: 2rem 0;
}

.blog-section h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

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

.blog-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.blog-item a {
  font-weight: 600;
  font-size: 1.05rem;
}

.blog-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.blog-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

/* ── Blog Post ── */
.blog-post {
  padding: 2rem 0;
}

.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.post-date {
  color: var(--text-light);
  font-size: 0.9rem;
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
}

.post-content h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.3rem;
}

.post-content code {
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.post-content pre {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Footer ── */
.footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.social-links a {
  color: var(--text-light);
  transition: color 0.15s;
}

.social-links a:hover {
  color: var(--link);
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo img {
    width: 120px;
    height: 120px;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 1rem;
  }
}
