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

:root {
  --bg:           #06080f;
  --surface:      #0d1020;
  --border:       #1e2040;
  --accent:       #7aafd4;
  --accent-hover: #a3c9e8;
  --accent-teal:  #00d4a8;
  --accent-gold:  #e8b84b;
  --text:         #ffffff;
  --text-muted:   #94a3b8;
  --white:        #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ── Header ── */
header {
  text-align: center;
  margin-bottom: 56px;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent));
  box-shadow: 0 0 24px rgba(122, 175, 212, 0.35);
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  display: block;
}

.avatar-fallback {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.email a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.email a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── Nav links ── */
nav.links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.9rem;
}

nav.links a {
  color: var(--accent);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

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

.sep {
  color: var(--border);
  user-select: none;
}

/* ── Sections ── */
section a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

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

section {
  margin-bottom: 48px;
}

section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: none;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent-teal), var(--accent), var(--border) 85%);
}

section p {
  color: var(--text);
  margin-bottom: 12px;
  text-align: justify;
}

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

/* ── News ── */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  display: flex;
  gap: 20px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.news-date {
  flex-shrink: 0;
  align-self: center;
  color: var(--accent-teal);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--accent-teal);
  border-radius: 20px;
  padding: 2px 10px;
}

.news-text {
  color: var(--text);
  text-align: justify;
}

.news-text em {
  font-style: italic;
  color: var(--white);
}

.news-text strong {
  color: var(--accent);
  font-weight: 500;
}

/* ── Publications ── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pub-entry {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-teal);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.pub-entry:hover {
  border-color: var(--accent);
  border-left-color: var(--accent-teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 212, 168, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pub-thumb {
  flex-shrink: 0;
  width: 200px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.pub-thumb img,
.pub-thumb video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-title {
  font-weight: 500;
  color: #00ffcc;
  margin-bottom: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.pub-venue strong {
  display: inline-block;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  background: rgba(232, 184, 75, 0.1);
  padding: 1px 8px;
  border-radius: 4px;
}

.pub-venue strong a {
  color: var(--accent-gold);
}

.pub-venue strong a:hover {
  color: var(--accent-gold);
  opacity: 0.8;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pub-authors strong {
  color: var(--text);
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.pub-footnote {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: left;
}

/* ── Education ── */
.edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edu-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.6;
}

.edu-date {
  flex-shrink: 0;
  min-width: 148px;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding-top: 2px;
}

.edu-info {
  color: var(--text);
}

.edu-info strong {
  color: var(--white);
}

@media (max-width: 520px) {
  .edu-item {
    flex-direction: column;
    gap: 4px;
  }
}

/* ── Teaching ── */
.teaching-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teaching-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.teaching-list li:hover {
  border-color: var(--accent);
}

.course-name {
  font-weight: 500;
  color: var(--white);
}

.course-meta {
  color: var(--text-muted);
}

/* ── Footer ── */
footer {
  margin-top: 60px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .pub-entry {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    height: auto;
  }

  header h1 {
    font-size: 1.6rem;
  }
}
