/* =============================================
   Colors Palette
============================================= */
:root {
  --polar-mist: #E2E8F0;
  --text-color: #162A45;
  --background-dark: #070b14;
  --arrow-indicator: rgba(255, 255, 255, 0.6);
}

/* =============================================
   Base Styles
============================================= */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* fix mobile overflow */
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', serif;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-color);
  background-color: var(--polar-mist);
  font-size: 1.1rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 30px;
}

/* =============================================
   Hero Section
============================================= */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  background-color: var(--background-dark);
  color: #fff;
  padding: 2rem;
  min-height: 60vh;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* fix mobile overflow */
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

@media screen and (min-width: 1024px) {
  .hero {
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: 3rem;
  }

  .hero.has-overflow::after {
    content: "↓";
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--arrow-indicator);
    animation: bounce 1.5s infinite;
    pointer-events: none;
  }
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

.hero-text {
  flex: 1 1 300px;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--polar-mist);
}

.subtitle {
  font-size: 1.4rem;
  margin-bottom: 1.7rem;
  font-weight: 300;
  color: var(--polar-mist);
}

.hero-figure {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
}

.hero-figure img {
  max-width: 30rem;
  height: auto;
}

/* =============================================
   Social Icons
============================================= */
.social-icons a {
  display: inline-block;
  margin-right: 1rem;
}

.social-icons img {
  width: 2.7rem;
  height: auto;
}

/* =============================================
   Responsive
============================================= */
@media screen and (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
  }

  .hero-text {
    margin-bottom: 1rem;
  }

  .social-icons a {
    margin-right: 0.5rem;
  }
}

@media screen and (min-width: 1024px) {
  .hero-text {
    margin-left: 10%;
  }
}

/* =============================================
   Navigation
============================================= */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
}

.sticky-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0rem;
  position: relative;
}

@media (max-width: 768px) {
  .sticky-header {
    padding: 1.6rem;
  }
}

.menu-toggle {
  position: absolute;
  width: 30px;
  height: 22px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  left: 1rem;
  top: 1rem;
}

.menu-toggle span {
  display: block;
  height: 4px;
  background: #333;
  border-radius: 2px;
  transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  padding: 0.5rem;
  transition: background 0.2s ease;
}

.nav-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.nav-menu.active {
  display: flex;
  max-height: 500px;
  opacity: 1;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  .nav-menu {
    position: absolute;
    top: 51px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    align-items: center;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  .nav-menu.active {
    max-height: 500px;
    opacity: 1;
    padding: 1rem 0;
  }

  .nav-menu a {
    margin-bottom: 0.5rem;
  }
}

/* =============================================
   Titles
============================================= */
h1 {
  font-family: 'Lustria', serif;
  font-weight: 500;
  color: var(--text-color);
  font-size: 2em;
}

h2, h3 {
  font-family: 'Lustria', serif;
  font-weight: 500;
  color: var(--text-color);
  font-size: 1.8em;
}

h2 {
  margin-top: 3rem;
}

/* Remove underline and fix layout for full-card links */
.project-card a,
.event-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.3s ease;
}

.project-card a:hover,
.event-card a:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.project-card a:hover h3,
.event-card a:hover h3 {
  text-decoration: underline;
}

/* =============================================
   Footer
============================================= */
footer {
  background: var(--polar-mist);
  text-align: center;
  padding: 15px 0;
  border-top: 1px solid #ddd;
  margin-top: 20px;
  font-weight: 300;
  font-size: 18px;
}

/* =============================================
   Publication Cards
============================================= */
.publication-card {
  background: var(--polar-mist);
  border: 1px solid #ddd;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.publication-card .pub-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.publication-card .pub-details {
  color: #555;
  margin-bottom: 15px;
}

.pub-buttons a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 0.9rem;
  margin-right: 10px;
  transition: background 0.3s, color 0.3s;
}

.btn-online {
  background: transparent;
  border: 1px solid var(--text-color);
  color: var(--text-color);
}

.btn-pdf {
  background: transparent;
  border: 1px dashed var(--text-color);
  color: var(--text-color);
}

.btn-info {
  background: transparent;
  border: 1px dotted var(--text-color);
  color: var(--text-color);
}

.pub-buttons a:hover {
  background: var(--text-color);
  color: #fff;
}

/* =============================================
   Event & Project Cards
============================================= */
.events-container,
.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: start;
}

.event-card,
.project-card {
  background: var(--polar-mist);
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.event-card {
  width: calc(33.333% - 20px);
}

.project-card {
  width: calc(50% - 20px);
}

.event-card img,
.project-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.event-info,
.project-info {
  padding: 15px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-info h3,
.project-info h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.event-date,
.project-date {
  color: #555;
  font-size: 0.9rem;
  margin-top: auto;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .event-card,
  .project-card {
    width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .event-card,
  .project-card {
    width: 100%;
  }
}

/* =============================================
   Breadcrumb
============================================= */

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 5px;
  color: #888;
}
