*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111827;
  background: radial-gradient(circle at top left, #e0ebff 0, #f5f7fb 40%, #f9fafb 100%);
  min-height: 100vh;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: rgba(15, 23, 42, 0.96);
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #e5e7eb;
}

.brand-name:hover {
  text-decoration: none;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-link {
  color: #9ca3af;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: #e5e7eb;
}

.nav-link.is-active {
  color: #f9fafb;
  border-color: #3b82f6;
}

.page-main {
  padding: 2.5rem 0 3.5rem;
}

.card {
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  padding: 2.25rem 2.3rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

@media (max-width: 720px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-wrap: wrap;
  }
  .card {
    padding: 1.75rem 1.5rem;
  }
}

.page-title {
  margin: 0 0 0.4rem;
  font-size: 1.9rem;
  letter-spacing: 0.03em;
  font-weight: 650;
  color: #0f172a;
}

.page-lead {
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  color: #6b7280;
}

.hero {
  margin-bottom: 2rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.04s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  text-decoration: none;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.65);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.02);
  color: #111827;
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-secondary:hover {
  text-decoration: none;
  background: rgba(148, 163, 184, 0.08);
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 0.75rem;
  align-items: end; /* aliniem baza coloanelor */
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
  color: #1d4ed8;
  font-size: 0.8rem;
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.prose ul {
  padding-left: 1.1rem;
}

.prose li {
  margin-bottom: 0.75rem;
}

.prose p {
  margin: 0;
}

.pub-section .h1 {
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #374151;
  margin: 2rem 0 0.4rem;
}

.pub-section hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0 0 1rem;
}

.pub-section ol,
.pub-section ul {
  margin: 0;
  padding-left: 1rem;
}

.pub-section ol {
  list-style: none;
  counter-reset: pubcounter;
  padding-left: 0;
}

.pub-section ol > li {
  counter-increment: pubcounter;
  padding-left: 2.25rem;
  position: relative;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed #e5e7eb;
}

.pub-section ol > li:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.pub-section ol > li::before {
  content: counter(pubcounter) ".";
  position: absolute;
  left: 0.3rem;
  top: 0.1rem;
  font-weight: 600;
  color: #6b7280;
}

.pub-section li p {
  margin: 0;
}

.pub-section li p + p {
  margin-top: 0.3rem;
}

.pub-section a[href*="/publications/"] {
  font-weight: 500;
  border-bottom: 1px dashed rgba(37, 99, 235, 0.6);
}

.pub-section a[href*="/publications/"]:hover {
  border-bottom-style: solid;
  text-decoration: none;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
}

.contact-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.8rem;
  color: #374151;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
}

.badge-link:hover {
  text-decoration: none;
  border-color: #2563eb;
  color: #1d4ed8;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.9rem 0 1.3rem;
  font-size: 0.8rem;
  color: #6b7280;
  background: rgba(249, 250, 251, 0.9);
  margin-top: -1.5rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.8);
}

.footer-inner a:hover {
  border-bottom-style: solid;
}

/* Hero layout with photo */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1 1 260px;
}

.hero-photo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo img {
  width: 180px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3);
}

@media (max-width: 720px) {
  .hero-content {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .hero-photo img {
    width: 150px;
  }
}

.home-photo-card {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.home-photo-card .hero-photo img {
  width: 230px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3);
  transform: translate(-36px, -20px); /* spre stânga (-x) și în sus (-y) */
}

.home-photo-card .hero-photo img {
  width: 230px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.3);
  transform: translate(-36px, -20px);
}

@media (max-width: 900px) {
  .home-photo-card .hero-photo {
    align-self: flex-start;
  }

  .home-photo-card .hero-photo img {
    width: 230px;
    transform: translate(-36px, -20px);
}
}
