/* ============================================================
   JANS ALZATE-MORALES — Portfolio Stylesheet
   Theme: Hybrid Innovator (Glassmorphism + Gradient)
   ============================================================ */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colours */
  --bg-primary:     #080c18;
  --bg-secondary:   #0d1526;
  --bg-tertiary:    #111d35;
  --accent:         #00d4ff;
  --accent-dark:    #0099cc;
  --secondary:      #7c3aed;
  --secondary-light:#a855f7;
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border:         rgba(255, 255, 255, 0.08);
  --glass-bg:       rgba(255, 255, 255, 0.04);
  --glass-hover:    rgba(255, 255, 255, 0.07);
  --gradient-hero:  linear-gradient(135deg, #080c18 0%, #0d1a3a 50%, #150d2e 100%);
  --gradient-accent:linear-gradient(135deg, var(--accent), var(--secondary));
  --shadow-sm:      0 4px 20px rgba(0,0,0,0.3);
  --shadow-md:      0 8px 40px rgba(0,0,0,0.4);
  --shadow-glow:    0 0 30px rgba(0, 212, 255, 0.15);

  /* Typography */
  --font-body:     'Inter', sans-serif;
  --font-heading:  'Space Grotesk', sans-serif;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-max:   1200px;
  --radius:          12px;
  --radius-lg:       20px;

  /* Transitions */
  --transition:  all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary-light); }

ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }

/* ===== UTILITY CLASSES ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.hidden { display: none !important; }

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(0, 212, 255, 0.15);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ===== NAVIGATION ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(8, 12, 24, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 0.5rem 1.25rem !important;
  background: var(--gradient-accent);
  color: #fff !important;
  border-radius: 50px;
  font-weight: 600;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-2px);
  color: var(--accent);
}

.btn-ghost {
  background: var(--glass-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: 8rem 2rem 4rem;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #a8d8f0 50%, #c4a8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.typed-text {
  color: var(--accent);
  font-weight: 600;
}

.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
  position: relative;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-plus {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  vertical-align: super;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.35rem;
  text-align: center;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
  z-index: 2;
}

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

/* ===== SECTION SHARED ===== */
.section { padding: var(--section-padding); }

.section-alt { background: var(--bg-secondary); }

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
}

.section-desc {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 3.5rem 0 1.75rem;
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-image-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
}

.about-photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(99,102,241,0.15), 0 8px 32px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-badges {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.badge i { color: var(--accent); width: 16px; flex-shrink: 0; }

.about-lead {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.about-text p { color: var(--text-secondary); margin-bottom: 1.1rem; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.highlight-item i {
  color: var(--accent);
  font-size: 1.25rem;
  width: 20px;
  flex-shrink: 0;
}

.highlight-item div { display: flex; flex-direction: column; gap: 0.2rem; }
.highlight-item strong { color: var(--text-primary); font-size: 0.95rem; }
.highlight-item span { color: var(--text-muted); font-size: 0.82rem; }

.about-details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detail-item i { color: var(--accent); width: 14px; }
.detail-item a { color: var(--text-secondary); }
.detail-item a:hover { color: var(--accent); }

/* ===== SKILLS SECTION ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  padding: 2rem;
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.skill-cat-header i {
  font-size: 1.5rem;
  color: var(--accent);
  width: 48px;
  height: 48px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-cat-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-list { display: flex; flex-direction: column; gap: 1rem; }

.skill-item { display: flex; flex-direction: column; gap: 0.4rem; }

.skill-name { font-size: 0.88rem; color: var(--text-secondary); font-weight: 500; }

.skill-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--gradient-accent);
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 3rem;
  justify-content: center;
}

.tag {
  padding: 0.4rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
}

/* ===== EXPERIENCE / TIMELINE ===== */
.timeline-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.tab-btn {
  padding: 0.7rem 2rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #fff;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--secondary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 2rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -2.55rem;
  top: 1.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  z-index: 1;
}

.timeline-dot.accent {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.timeline-dot.secondary {
  background: var(--secondary);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
}

.timeline-content {
  padding: 1.75rem 2rem;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.timeline-org i { margin-right: 0.35rem; color: var(--accent); }

.timeline-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.timeline-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.timeline-content li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.timeline-tags span {
  padding: 0.3rem 0.8rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

/* ===== RESEARCH SECTION ===== */
/* Impact grid: see responsive section above */
.impact-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  position: relative;
}

.impact-stat + .impact-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border);
}

.impact-stat i {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.impact-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.impact-stat span:not(.impact-num):not(.impact-label) {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.impact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.grants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grant-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.grant-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: fit-content;
}

.grant-period {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

.grant-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.grant-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.grant-org {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

.grant-org i { margin-right: 0.35rem; color: var(--secondary-light); }

.research-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.area-card {
  padding: 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.area-card i {
  font-size: 2rem;
  color: var(--accent);
  width: 60px;
  height: 60px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.area-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.area-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.project-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon i { font-size: 1.4rem; color: #fff; }

.project-content { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.project-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-tech span {
  padding: 0.25rem 0.6rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--secondary-light);
  font-weight: 500;
}

.projects-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.projects-note i { color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
.projects-note a { color: var(--accent); font-weight: 500; }

/* Featured project card */
.project-card-featured {
  padding: 2rem 2.25rem;
  margin-bottom: 0.5rem;
  position: relative;
  border: 1px solid rgba(99,102,241,0.35);
}

.project-featured-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.project-featured-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.project-icon-featured {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: var(--gradient-accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon-featured i { font-size: 1.6rem; color: #fff; }

@media (max-width: 600px) {
  .project-featured-body { flex-direction: column; }
}

/* Project GitHub link button */
.project-links {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.project-link-btn:hover {
  background: rgba(99,102,241,0.12);
  color: var(--accent-light);
}

/* ===== CONTACT SECTION ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
}

.contact-card i {
  color: var(--accent);
  font-size: 1.2rem;
  width: 20px;
  flex-shrink: 0;
}

.contact-card div { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-card strong { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-card a, .contact-card span { font-size: 0.92rem; color: var(--text-primary); }
.contact-card a:hover { color: var(--accent); }

.contact-interests { padding: 1.5rem 0 0; }
.contact-interests h4 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.75rem; }

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.interest-tags span {
  padding: 0.35rem 0.9rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--secondary-light);
}

.contact-form {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.93rem;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group select option { background: var(--bg-secondary); color: var(--text-primary); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.form-note i { color: var(--accent); }

/* ===== FOOTER ===== */
#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 260px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social a {
  width: 42px;
  height: 42px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--gradient-accent);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.grants-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-top: -1.5rem;
}

.grants-role-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.82rem;
  margin: 2.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.grants-role-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.grant-badge-init { background: linear-gradient(135deg, #059669, #10b981); }
.grant-badge-sponsor { background: linear-gradient(135deg, #0099cc, #00d4ff); }
.grant-badge-assoc { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.grant-badge-spain { background: linear-gradient(135deg, #b91c1c, #ef4444); }

.grants-grid-secondary { opacity: 0.92; }

.grant-card-secondary {
  border-color: rgba(255,255,255,0.05);
}

.grant-card-secondary h4 {
  font-size: 0.95rem;
}

.grant-card-secondary p {
  font-size: 0.85rem;
}

/* ===== PEER REVIEW GRID ===== */
.peer-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.peer-review-item {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
  align-items: center;
}

.pr-count {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.pr-journal {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.pr-publisher {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.peer-review-note {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.peer-review-note a { color: var(--accent); font-weight: 500; }

/* ===== PUBLICATIONS SECTION ===== */
.pub-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.pub-filter-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pub-filter-btn.active,
.pub-filter-btn:hover {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #fff;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pub-card {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pub-card.pub-hidden { display: none; }

.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-year-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.y2026 { background: linear-gradient(135deg, #00d4ff, #0066cc); }
.y2025 { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.y2024 { background: linear-gradient(135deg, #059669, #10b981); }
.y2023 { background: linear-gradient(135deg, #d97706, #f59e0b); }
.yolder { background: linear-gradient(135deg, #6b7280, #9ca3af); }

.pub-journal {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  font-style: italic;
}

.pub-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.pub-authors {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pub-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.pub-doi {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.pub-doi:hover { color: var(--secondary-light); text-decoration: underline; }

.pub-type {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
}

.pub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.pub-footer-text {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pub-footer-text i {
  font-size: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.pub-footer-text div { display: flex; flex-direction: column; gap: 0.2rem; }
.pub-footer-text strong { color: var(--text-primary); font-size: 0.95rem; }
.pub-footer-text span { color: var(--text-muted); font-size: 0.82rem; }

.pub-footer-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Impact grid: 5 columns on large screens */
.research-impact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 2.5rem;
  margin-bottom: 4rem;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .research-impact { grid-template-columns: repeat(3, 1fr); }
  .impact-stat + .impact-stat::before { display: none; }
}

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image-wrapper { flex-direction: row; justify-content: flex-start; align-items: flex-start; flex-wrap: wrap; }
  .about-badges { flex-direction: row; flex-wrap: wrap; }
  .skills-grid { grid-template-columns: 1fr; }
  .research-impact { grid-template-columns: repeat(2, 1fr); }
  .impact-stat + .impact-stat::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-padding: 4rem 0; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 24, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    font-size: 1.2rem;
    z-index: 999;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; z-index: 1000; }

  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }

  .stat-divider { width: 80%; height: 1px; }
  .stat-item { padding: 0; }

  .hero-buttons { flex-direction: column; align-items: center; }

  .timeline { padding-left: 1.5rem; }

  .research-impact { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; padding: 1.5rem; }

  .grants-grid { grid-template-columns: 1fr; }
  .research-area-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }

  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .research-impact { grid-template-columns: 1fr; }
  .research-area-grid { grid-template-columns: 1fr; }
  .tab-btn { padding: 0.6rem 1.25rem; font-size: 0.85rem; }
}
