/* ── DESIGN SYSTEM & VARIABLE TOKENS ── */
:root {
  /* Soft warm-academic color palette */
  --bg: #fafaf8;
  --bg-card: #ffffff;
  --fg: #1a1a1a;
  --fg-soft: #4a4a4a;
  --fg-muted: #737373; /* Neutral gray (no brown/warm tint) */
  --accent: #9e6b55;
  --accent-light: #c8907a;
  --teal: #3d7a8c;
  --border: #e8e6e2;
  --border-light: #f3f1ed;
  
  /* Fonts */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── BASE STYLES ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 60px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 {
  font-weight: 400;
  line-height: 1.25;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

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

/* ── LAYOUT ── */
.container {
  max-width: 820px; /* Slightly narrower than standard for focused academic feel */
  margin: 0 auto;
  padding: 0 32px;
}

/* ── HEADER ── */
.header {
  padding: 80px 0 48px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.portrait-container {
  position: relative;
  flex-shrink: 0;
}

.portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.portrait-container:hover .portrait {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.header-text {
  flex: 1;
}

.header-text h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--fg);
}

.header-text .subtitle {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.header-text .specializations {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-muted);
  margin-bottom: 16px;
  letter-spacing: -0.1px;
}

.header-text .bio {
  font-size: 13px;
  line-height: 1.75;
  color: var(--fg-soft);
}

.header-text .bio a {
  color: var(--accent);
}

.header-text .bio a:hover {
  color: var(--accent-light);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
  font-size: 12px;
}

.links a {
  color: var(--fg-muted);
  font-weight: 500;
}

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

/* ── DIVIDER ── */
.divider {
  height: 1px;
  border: none;
  background: var(--border);
  margin: 0;
}

/* ── SECTIONS ── */
section {
  padding: 44px 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
  color: var(--fg);
}

/* ── NEWS ── */
.news-list {
  list-style: none;
}

.news-list li {
  display: flex;
  gap: 24px;
  padding: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  white-space: nowrap;
  padding-top: 3px;
  flex-shrink: 0;
  width: 90px;
}

.news-text {
  color: var(--fg-soft);
}

.news-text a {
  font-weight: 500;
}

.news-text a:hover {
  color: var(--accent-light);
}

.highlight-tag {
  display: inline-block;
  background: rgba(158, 107, 85, 0.08);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── POSITIONS ── */
.positions-grid {
  display: flex;
  flex-direction: column;
}

.pos-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.pos-item:first-child {
  padding-top: 0;
}

.pos-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pos-emoji {
  font-size: 20px;
  flex-shrink: 0;
  padding-top: 2px;
}

.pos-content {
  flex: 1;
}

.pos-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-role {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg);
}

.pos-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--teal);
  background: rgba(61, 122, 140, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: middle;
}

.pos-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
}

.pos-org {
  font-size: 12.5px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.pos-org a {
  color: var(--accent);
}

.pos-org a:hover {
  color: var(--accent-light);
}

.pos-desc {
  font-size: 12px;
  color: var(--fg-soft);
  margin-top: 8px;
  line-height: 1.6;
}

/* ── PUBLICATIONS ── */
.pub-list {
  list-style: none;
}

.pub-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  align-items: baseline;
  transition: opacity var(--transition-fast);
}

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

.pub-item:hover {
  opacity: 0.95;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}

.pub-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg);
  line-height: 1.5;
  margin-bottom: 4px;
}

.pub-title a {
  color: var(--fg);
}

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

.pub-authors {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.pub-authors strong {
  color: var(--fg-muted);
  font-weight: normal;
}

.pub-venue {
  font-size: 11.5px;
  color: var(--teal);
  font-family: var(--font-mono);
}

.pub-more {
  margin-top: 24px;
  font-size: 12.5px;
  font-family: var(--font-mono);
}

/* ── ABOUT DETAILS ── */
.about-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--fg-soft);
  max-width: 720px;
}

.about-text p {
  margin-bottom: 16px;
}

.detail-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.detail-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  line-height: 1.8;
}

.tag {
  display: inline-flex;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--fg-soft);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.tag:not(:last-child)::after {
  content: "·";
  color: rgba(26, 26, 26, 0.22);
  font-weight: 700;
  margin: 0 8px;
}

.tag:hover {
  color: var(--accent);
}

/* ── FOOTER ── */
footer {
  padding: 40px 0 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.8;
}

footer a {
  color: var(--fg-muted);
}

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

/* ── PROJECTS ── */
.project-desc {
  font-size: 13.5px;
  color: var(--fg-soft);
  line-height: 1.6;
}



/* ── RESPONSIVE STYLES ── */
@media (max-width: 680px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 48px;
    gap: 24px;
  }

  .portrait {
    width: 120px;
    height: 120px;
  }

  .links {
    justify-content: center;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }



  .news-list li {
    flex-direction: column;
    gap: 4px;
  }

  .news-date {
    width: auto;
    padding-top: 0;
  }

  .detail-groups {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
