/* 
  MODERN ACADEMIC THEME
  ---------------------
  Designed for cleanliness, readability, and a premium feel.
*/

:root {
  /* COLORS - ACADEMIC BLUE THEME */
  --primary: #34ADEE;
  /* Bright Blue */
  --primary-light: #7dd3fc;
  /* Light Blue */
  --accent: #0ea5e9;
  /* Accent Blue */
  --dark: #0f172a;
  /* Slate 900 */
  --text: #334155;
  /* Slate 700 */
  --text-light: #64748b;
  /* Slate 500 */
  --bg: #f8fafc;
  /* Slate 50 */
  --white: #ffffff;
  --border: #e2e8f0;
  /* Slate 200 */

  /* SPACING & SIZING */
  --max-width: 1200px;
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* FONTS */
  --font-main: 'Inter', sans-serif;
}

/* RESET & BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

/* TYPOGRAPHY UTILS */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.2;
}

.text-center {
  text-align: center;
}

/* LAYOUT UTILITIES */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.main-layout {
  padding-top: 40px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.section {
  position: relative;
  counter-reset: pub-counter;
}

/* NAVBAR */
.navbar {
  background: var(--primary);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.nav-container {
  height: 100%;
  display: flex;
  justify-content: center;
  /* Centered menu */
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--white);
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
}

/* HEADER BANNER */
.header-banner {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* MAIN HEADER INFO */
.header-content {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/Sierra-de-San-Miguelito-2494094927.jpg') no-repeat center center/cover;
  padding: 120px 0 100px;
  margin-bottom: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-logo-float {
  position: absolute;
  top: 40px;
  height: 100px; /* Big logo */
  background-color: rgba(255, 255, 255, 0.9); /* White Background */
  padding: 12px;
  border-radius: var(--radius-md);
  opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  transition: transform 0.3s;
}

.header-logo-float:hover {
  transform: scale(1.05);
}

.header-logo-left {
  left: 40px;
}

.header-logo-right {
  right: 40px;
}

.header-name {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 12px;
}

.header-title {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  margin-bottom: 4px;
}

.header-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
}

/* RESEARCH SECTION (Grid Layout) */
.research-section {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 60px;
  align-items: start;
}

.profile-card {
  position: sticky;
  top: 100px;
  /* Sticky sidebar effect */
}

.profile-image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--white);
  padding: 8px;
  border: 1px solid var(--border);
}

.profile-img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-md) - 4px);
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.bio-content {
  padding-top: 10px;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 24px;
  margin-top: 40px;
  color: var(--dark);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin-top: 8px;
  border-radius: 2px;
}

.lead-text {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.7;
  text-align: justify;
}

.sub-heading {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-list li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2em;
  line-height: 1;
  top: 2px;
}

/* EDUCATION SECTION (Timeline) */
.timeline-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  border-left: 3px solid var(--border);
  padding-left: 40px;
}

.section-header.center-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header.center-header .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -52px;
  /* Adjust based on padding + border */
  top: 6px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border: 3px solid var(--primary);
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.degree-title {
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.degree-info {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* SCHOLAR LINKS (Call to Action) */
.scholar-section {
  margin-top: 20px;
}

.scholar-box {
  background: linear-gradient(135deg, var(--primary), #1e3a8a);
  padding: 60px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* Abstract decoration */
.scholar-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.scholar-box .section-title {
  color: white;
  margin-bottom: 30px;
}

.scholar-box .section-title::after {
  background: rgba(255, 255, 255, 0.3);
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 100px;
  /* Pill shape */
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover {
  background: #f0fdf4;
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

/* FOOTER */
.site-footer {
  background: var(--dark);
  color: var(--text-light);
  text-align: center;
  padding: 40px 0;
  margin-top: auto;
  font-size: 0.9rem;
}


/* FACILITIES & GALLERY PAGE */
.facilities-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}



.facility-item,
.gallery-item {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.facility-item:hover,
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.facility-img,
.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--border);
}

.facility-caption,
.gallery-caption {
  padding: 16px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* GRANTS PAGE */
.grant-item {
  margin-bottom: 40px;
  border-left: 4px solid var(--primary);
  padding-left: 24px;
  background: var(--white);
  padding: 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}

.grant-item.award {
  border-left-color: #d97706;
  /* Amber 600 */
}

.grant-title {
  color: var(--dark);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.grant-year {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: inline-block;
  background: rgba(6, 78, 59, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.grant-item.award .grant-year {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
}

.grant-agency {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 12px;
}

.grant-desc {
  color: var(--text);
}

/* CONTACT PAGE */
.contact-form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
  background: var(--white);
}

.form-textarea {
  height: 160px;
  resize: vertical;
}

.submit-btn {
  background-color: var(--primary);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  width: 100%;
}

.submit-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.contact-info-box {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* MEMBERS PAGE */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 30px;
}

.member-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.member-photo {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  background-color: var(--border);
}

.member-info {
  padding: 24px;
}

.member-name {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.member-role {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 12px;
}

.member-research {
  font-size: 0.95rem;
  margin-bottom: 12px;
  text-align: justify;
}

.member-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  text-align: justify;
}

/* PUBLICATIONS PAGE */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.publication-item {
  position: relative;
  padding-left: 50px;
  padding-right: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

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

.publication-item::before {
  counter-increment: pub-counter;
  content: counter(pub-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.pub-title {
  color: var(--dark);
  font-weight: 600;
}

.pub-meta {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 4px;
}

.pub-links {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.pub-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pub-btn:hover {
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .research-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .profile-card {
    position: static;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    position: absolute;
    right: 24px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--primary);
    padding: 24px;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .header-name {
    font-size: 2rem;
  }
}