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

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.75;
  color: #1c1c1e;
  background-color: #ffffff;
}

a {
  color: #1a56db;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: #1040a8; text-decoration: underline; }

/* ─── Page Container ───────────────────────────────────── */
.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

/* ─── Section Divider ──────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid #e8e8e4;
  margin: 36px 0;
}

/* ─── Section Row ──────────────────────────────────────── */
.section-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.section-label {
  flex: 0 0 100px;
  padding-top: 2px;
}

.section-label h5 {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8e;
  margin: 0;
}

.section-content {
  flex: 1;
  min-width: 0;
}

/* ─── Header ───────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 36px;
}

.headshot {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #e8e8e4;
}

.header-info { flex: 1; }

.header-name {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  font-weight: 400;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.2;
}

.header-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  font-size: 13.5px;
  color: #555;
}

.contact-emails {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 14px;
}

.contact-emails a {
  color: #444;
  font-size: 13px;
}
.contact-emails a:hover { color: #1a56db; }

.contact-phone {
  color: #555;
  font-size: 13px;
  margin-right: 14px;
}

.header-divider {
  color: #ccc;
  margin: 0 6px;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-links a {
  color: #555;
  font-size: 18px;
  transition: color 0.15s ease;
}
.contact-links a:hover { color: #0f172a; text-decoration: none; }

.contact-links .link-label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #555;
  vertical-align: middle;
}

/* ─── About ────────────────────────────────────────────── */
.about-text p {
  margin: 0 0 14px;
  color: #2c2c2e;
  font-size: 14.5px;
}
.about-text p:last-child { margin-bottom: 0; }

/* ─── News ─────────────────────────────────────────────── */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0ee;
  font-size: 14px;
}
.news-list li:last-child { border-bottom: none; }

.news-date {
  flex: 0 0 80px;
  font-size: 12px;
  font-weight: 600;
  color: #8a8a8e;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.news-text { color: #2c2c2e; }

/* ─── Projects ─────────────────────────────────────────── */
.project-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0ee;
}
.project-card:first-child { padding-top: 0; }
.project-card:last-child { border-bottom: none; padding-bottom: 0; }

.project-thumb {
  flex: 0 0 120px;
  width: 120px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f0ee;
  border: 1px solid #e4e4e0;
}

.project-thumb-placeholder {
  flex: 0 0 120px;
  width: 120px;
  height: 88px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f0f0ee 0%, #e8e8e4 100%);
  border: 1px solid #e4e4e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b0b0;
  font-size: 11px;
  text-align: center;
}

.project-body { flex: 1; min-width: 0; }

.project-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 5px;
}

.project-desc {
  font-size: 13.5px;
  color: #555;
  margin: 0 0 8px;
  line-height: 1.6;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #1a56db;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  padding: 2px 9px;
  letter-spacing: 0.02em;
  transition: background 0.12s, border-color 0.12s;
}
.project-link-badge:hover {
  background: #dbeafe;
  border-color: #bfdbfe;
  text-decoration: none;
  color: #1040a8;
}

/* ─── Employment & Education ───────────────────────────── */
.entry-list { display: flex; flex-direction: column; gap: 0; }

.entry-item {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0ee;
}
.entry-item:first-child { padding-top: 0; }
.entry-item:last-child { border-bottom: none; padding-bottom: 0; }

.entry-logo {
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-logo img {
  width: 68px;
  max-height: 52px;
  object-fit: contain;
}

.entry-body { flex: 1; }

.entry-org {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 1px;
}

.entry-role {
  font-size: 13.5px;
  color: #555;
  font-style: italic;
}

.entry-period {
  font-size: 12px;
  color: #8a8a8e;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 1px;
}

/* ─── Additional Info ──────────────────────────────────── */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0ee;
  font-size: 14px;
  color: #2c2c2e;
  line-height: 1.65;
}
.info-list li:first-child { padding-top: 0; }
.info-list li:last-child { border-bottom: none; padding-bottom: 0; }

.info-list .info-key {
  font-weight: 600;
  color: #0f172a;
  margin-right: 4px;
}

.highlight-green {
  color: #15803d;
  font-weight: 600;
}

/* ─── Footer ───────────────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid #e8e8e4;
  padding: 24px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888;
}

.footer-links a {
  color: #555;
  font-weight: 500;
}
.footer-links a:hover { color: #0f172a; }

.footer-sep { color: #ccc; }

.footer-seal {
  width: 32px;
  height: 32px;
  opacity: 0.35;
}

.footer-credit {
  font-size: 11.5px;
  color: #bbb;
}
.footer-credit a { color: #bbb; }
.footer-credit a:hover { color: #888; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .page-wrap { padding: 28px 16px 0; }

  .site-header { flex-direction: column; gap: 18px; }

  .headshot { width: 84px; height: 84px; }

  .header-name { font-size: 22px; }

  .section-row { flex-direction: column; gap: 10px; }

  .section-label { flex: none; }

  .section-label h5 { margin-bottom: 4px; }

  .project-card { flex-direction: column; }
  .project-thumb,
  .project-thumb-placeholder { width: 100%; height: 140px; flex: none; }

  .entry-logo { flex: 0 0 52px; }
  .entry-logo img { width: 52px; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ─── Language Switcher ────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.lang-btn {
  background: none;
  border: 1px solid #d1d1d6;
  border-radius: 4px;
  padding: 2px 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8a8a8e;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  border-color: #0f172a;
  color: #0f172a;
}

.lang-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.lang-sep {
  color: #d1d1d6;
  font-size: 12px;
}


/* ─── Walking Robot pentru animatie ────────────────────────────────────── */
/* ─── Walking Robot ────────────────────────────────────── */
.walking-robot {
  position: fixed;
  width: 50px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 999;
}


/* ══════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════ */
.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid #d1d1d6;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}
.theme-toggle:hover {
  border-color: #0f172a;
  transform: scale(1.1);
}

/* ══════════════════════════════════════
   DARK MODE
══════════════════════════════════════ */
html[data-theme="dark"] body {
  background-color: #1a1a1a;
  color: #e8e8e8;
}

html[data-theme="dark"] .header-name,
html[data-theme="dark"] .project-title,
html[data-theme="dark"] .entry-org,
html[data-theme="dark"] .info-list .info-key {
  color: #f5f5f7;
}

html[data-theme="dark"] .about-text p,
html[data-theme="dark"] .news-text,
html[data-theme="dark"] .info-list li {
  color: #d4d4d8;
}

html[data-theme="dark"] .project-desc,
html[data-theme="dark"] .entry-role,
html[data-theme="dark"] .contact-emails a,
html[data-theme="dark"] .contact-links a,
html[data-theme="dark"] .contact-links .link-label,
html[data-theme="dark"] .header-contact {
  color: #a8a8b0;
}

html[data-theme="dark"] .news-date,
html[data-theme="dark"] .entry-period,
html[data-theme="dark"] .section-label h5 {
  color: #8a8a92;
}

html[data-theme="dark"] a {
  color: #6db3f2;
}
html[data-theme="dark"] a:hover {
  color: #9bc8f5;
}

html[data-theme="dark"] .contact-emails a:hover,
html[data-theme="dark"] .contact-links a:hover,
html[data-theme="dark"] .footer-links a:hover {
  color: #f5f5f7;
}

html[data-theme="dark"] .section-divider,
html[data-theme="dark"] .site-footer {
  border-color: #2a2a2e;
}

html[data-theme="dark"] .news-list li,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .entry-item,
html[data-theme="dark"] .info-list li {
  border-color: #2a2a2e;
}

html[data-theme="dark"] .headshot {
  border-color: #2a2a2e;
}

html[data-theme="dark"] .project-thumb {
  background: #242428;
  border-color: #2a2a2e;
}

html[data-theme="dark"] .project-link-badge {
  background: #1e293b;
  border-color: #2d3a52;
  color: #6db3f2;
}
html[data-theme="dark"] .project-link-badge:hover {
  background: #2d3a52;
  border-color: #3b4a66;
  color: #9bc8f5;
}

html[data-theme="dark"] .highlight-green {
  color: #4ade80;
}

html[data-theme="dark"] .lang-btn {
  border-color: #3a3a3e;
  color: #8a8a92;
}
html[data-theme="dark"] .lang-btn:hover {
  border-color: #f5f5f7;
  color: #f5f5f7;
}
html[data-theme="dark"] .lang-btn.active {
  background: #f5f5f7;
  border-color: #f5f5f7;
  color: #0f172a;
}
html[data-theme="dark"] .lang-sep {
  color: #3a3a3e;
}

html[data-theme="dark"] .theme-toggle {
  border-color: #3a3a3e;
  color: #f5f5f7;
}
html[data-theme="dark"] .theme-toggle:hover {
  border-color: #f5f5f7;
}

html[data-theme="dark"] .footer-links {
  color: #8a8a92;
}
html[data-theme="dark"] .footer-links a {
  color: #a8a8b0;
}
html[data-theme="dark"] .footer-sep {
  color: #3a3a3e;
}
html[data-theme="dark"] .footer-credit,
html[data-theme="dark"] .footer-credit a {
  color: #6a6a72;
}
html[data-theme="dark"] .footer-credit a:hover {
  color: #a8a8b0;
}

/* Smooth transition */
body, a, .project-card, .entry-item, .news-list li, .info-list li,
.project-link-badge, .lang-btn, .theme-toggle, .headshot {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ══════════════════════════════════════
   SKILLS GRID
══════════════════════════════════════ */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 16px;
  padding: 4px 0;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 6px;
  width: 75px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.skill-item:hover {
  transform: translateY(-2px);
  background: #f5f5f3;
}

.skill-item i {
  font-size: 36px;
  line-height: 1;
}

.skill-item span {
  font-size: 11px;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.02em;
}

/* Dark mode */
html[data-theme="dark"] .skill-item:hover {
  background: #242428;
}
html[data-theme="dark"] .skill-item span {
  color: #a8a8b0;
}

/* Mobile */
@media (max-width: 640px) {
  .skills-grid {
    gap: 14px 10px;
  }
  .skill-item {
    width: 64px;
    padding: 6px 2px;
  }
  .skill-item i {
    font-size: 28px;
  }
  .skill-item span {
    font-size: 10px;
  }
}

/* ══════════════════════════════════════
   SMOOTH SCROLL (global)
══════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px; /* compenseaza inaltimea meniului sticky */
}

/* ══════════════════════════════════════
   STICKY NAVIGATION MENU
══════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #e8e8e4;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  margin: -48px -24px 24px;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.site-nav a:hover {
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
}

/* Dark mode */
html[data-theme="dark"] .site-nav {
  background: rgba(26, 26, 26, 0.85);
  border-color: #2a2a2e;
}

html[data-theme="dark"] .site-nav a {
  color: #a8a8b0;
}

html[data-theme="dark"] .site-nav a:hover {
  background: #f5f5f7;
  color: #0f172a;
}

/* Responsive */
@media (max-width: 640px) {
  .site-nav {
    margin: -28px -16px 16px;
    padding: 10px 8px;
    gap: 2px;
  }
  .site-nav a {
    font-size: 10px;
    padding: 5px 8px;
    letter-spacing: 0.04em;
  }
}

/* ══════════════════════════════════════
   FADE-IN ON SCROLL
══════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ══════════════════════════════════════
   PUBLICATIONS
══════════════════════════════════════ */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0ee;
}
.pub-item:first-child { padding-top: 0; }
.pub-item:last-child { border-bottom: none; padding-bottom: 0; }

.pub-citation {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #2c2c2e;
}

.pub-authors {
  font-weight: 600;
  color: #0f172a;
}

.pub-year {
  color: #555;
}

.pub-title {
  font-style: italic;
  color: #0f172a;
}

.pub-venue {
  color: #555;
}

.pub-note {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #8a8a8e;
  font-style: normal;
}

/* Dark mode */
html[data-theme="dark"] .pub-item {
  border-color: #2a2a2e;
}
html[data-theme="dark"] .pub-authors,
html[data-theme="dark"] .pub-title {
  color: #f5f5f7;
}
html[data-theme="dark"] .pub-citation,
html[data-theme="dark"] .pub-year,
html[data-theme="dark"] .pub-venue {
  color: #d4d4d8;
}
html[data-theme="dark"] .pub-note {
  color: #8a8a92;
}


/* ══════════════════════════════════════
   PARTICLES BACKGROUND
══════════════════════════════════════ */
#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

#particles-bg canvas {
  display: block;
  pointer-events: auto;
}

/* Dark mode — particulele albastre nu se vad bine pe negru, le facem mai luminoase */
html[data-theme="dark"] #particles-bg canvas {
  opacity: 0.7;
}