/* ============================================================
   ELENA GONZALEZ-BLANCO GARCIA — Personal Branding Website
   Styles — Modern, Professional, Elegant
   ============================================================ */

/* ── CSS Custom Properties ───────────────────────────── */
:root {
  --bg:           #080810;
  --bg-alt:       #0d0d18;
  --surface:      #111120;
  --surface-2:    #181828;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(200,16,46,0.35);

  --primary:      #c8102e;
  --primary-dim:  rgba(200,16,46,0.15);
  --primary-glow: rgba(200,16,46,0.25);
  --gold:         #e8c07c;
  --gold-dim:     rgba(232,192,124,0.12);

  --text:         #f0f0f5;
  --text-muted:   #8888aa;
  --text-faint:   #50507a;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-xl:    32px;

  --shadow-sm:    0 2px 8px rgba(0,0,0,0.4);
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:    0 20px 60px rgba(0,0,0,0.6);
  --shadow-red:   0 8px 32px rgba(200,16,46,0.2);

  --nav-h:        68px;
  --transition:   0.3s 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 {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Selection ────────────────────────────────────────── */
::selection { background: var(--primary); color: #fff; }

/* ── Layout Helpers ───────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.section-alt { background: var(--bg-alt); }

.mt-lg { margin-top: 2rem; }

/* ── Typography ───────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeSlideUp 0.6s ease forwards;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.section-title em {
  font-style: italic;
  color: var(--primary);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.highlight { color: var(--primary); font-weight: 600; }
.link-inline {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}
.link-inline:hover { opacity: 0.8; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn-primary:hover {
  background: #e01230;
  box-shadow: 0 12px 40px rgba(200,16,46,0.4);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
  transform: translateY(-2px);
}

/* ── NAVBAR ───────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(8,8,16,0.97);
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links li a {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 0.45rem 1rem !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-red);
}

.nav-cta:hover {
  background: #e01230 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Language toggle button */
.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  padding: 0 0.75rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}
.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

/* ── HERO ─────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  animation: pulse 6s ease-in-out infinite alternate;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200,16,46,0.18), transparent 70%);
  top: -100px;
  right: 20%;
}

.hero-glow-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(232,192,124,0.1), transparent 70%);
  bottom: 0;
  left: 10%;
  animation-delay: -3s;
}

@keyframes pulse {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}

.hero-inner {
  container: hero / inline-size;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem clamp(1.25rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: var(--text);
  animation: fadeSlideUp 0.8s ease 0.1s both;
}

.hero-name em {
  font-style: italic;
  color: var(--primary);
  display: block;
}

.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  animation: fadeSlideUp 0.8s ease 0.2s both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  animation: fadeSlideUp 0.8s ease 0.3s both;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-meta i { color: var(--primary); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  animation: fadeSlideUp 0.8s ease 0.4s both;
}

.hero-socials {
  display: flex;
  gap: 0.75rem;
  animation: fadeSlideUp 0.8s ease 0.5s both;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.hero-socials a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
  transform: translateY(-2px);
}

/* Photo */
.hero-photo-wrap {
  position: relative;
  animation: fadeSlideUp 0.9s ease 0.2s both;
}

.hero-photo-frame {
  position: relative;
  width: clamp(260px, 30vw, 380px);
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-red);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}

.hero-photo-frame:hover .hero-photo { transform: scale(1.04); }

.hero-photo-ring {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), transparent 40%, var(--gold) 100%);
  z-index: -1;
}

.hero-photo-accent {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 60%;
  height: 60%;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(200,16,46,0.3);
  pointer-events: none;
}

/* Stat cards */
.hero-stat-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: floatCard 4s ease-in-out infinite;
}

.hero-stat-card.hsc-1 {
  top: 12%;
  left: -18%;
  animation-delay: 0s;
}
.hero-stat-card.hsc-2 {
  bottom: 20%;
  left: -14%;
  animation-delay: -1.5s;
}
.hero-stat-card.hsc-3 {
  top: 40%;
  right: -16%;
  animation-delay: -3s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hsc-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.hsc-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounceDown 2s ease infinite;
}

.hero-scroll-hint i { font-size: 0.8rem; }

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%       { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ── ABOUT ────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-top: 3rem;
}

.about-bio p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  line-height: 1.8;
}

.about-bio p strong { color: var(--text); }

.about-skills h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.tag-primary  { background: var(--primary-dim); color: var(--primary); border-color: rgba(200,16,46,0.2); }
.tag-secondary { background: rgba(232,192,124,0.08); color: var(--gold); border-color: rgba(232,192,124,0.2); }
.tag-accent   { background: rgba(100,200,255,0.08); color: #64c8ff; border-color: rgba(100,200,255,0.2); }
.tag-neutral  { background: var(--surface); color: var(--text-muted); border-color: var(--border); }

.tag:hover { transform: scale(1.05); }

/* Education list */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--primary);
  min-width: 36px;
  padding-top: 0.2rem;
}

.edu-list li > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.edu-list li strong {
  font-size: 0.9rem;
  color: var(--text);
}

.edu-list li span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── TIMELINE ─────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 1.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: translateX(-6px);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-red);
}

.tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.tc-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.tc-org {
  font-size: 0.85rem;
  color: var(--gold);
  display: block;
}

.tc-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
  background: var(--surface-2);
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.timeline-card > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.tc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tc-tags span {
  font-size: 0.72rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.6rem;
  color: var(--text-faint);
}

/* ── PUBLICATIONS ─────────────────────────────────────── */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.pub-filter {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.pub-filter.active,
.pub-filter:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.pub-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  opacity: 0;
  transition: opacity var(--transition);
}

.pub-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
}

.pub-card:hover::before { opacity: 1; }

.pub-card.hidden { display: none; }

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
}

.pub-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
  font-weight: 600;
}

.pub-authors {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.pub-venue {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pub-venue em { color: var(--gold); }

.pub-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.pub-cite {
  font-size: 0.75rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pub-type {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

.pub-type.journal      { background: rgba(100,200,100,0.12); color: #64c864; border: 1px solid rgba(100,200,100,0.2); }
.pub-type.conference   { background: rgba(100,160,255,0.12); color: #64a0ff; border: 1px solid rgba(100,160,255,0.2); }
.pub-type.preprint     { background: rgba(255,180,50,0.12); color: #ffb432; border: 1px solid rgba(255,180,50,0.2); }
.pub-type.book         { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(200,16,46,0.2); }
.pub-type.book-chapter { background: rgba(232,192,124,0.1); color: var(--gold); border: 1px solid rgba(232,192,124,0.2); }

.pub-link {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  transition: gap var(--transition);
}

.pub-link:hover { gap: 0.55rem; }

.pub-more {
  text-align: center;
  margin-top: 3rem;
}

/* ── PROJECTS ─────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
}

.project-card.project-featured {
  grid-column: 1 / -1;
  border-color: rgba(200,16,46,0.2);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(200,16,46,0.05) 100%);
}

.project-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.project-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.35rem;
  display: block;
}

.project-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.project-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.project-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tech span {
  font-size: 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.2rem 0.6rem;
  color: var(--text-faint);
}

/* ── CONTACT ──────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 3rem;
  align-items: start;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-list i {
  width: 36px;
  height: 36px;
  background: var(--primary-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.contact-list li > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.contact-list strong {
  font-size: 0.85rem;
  color: var(--text);
}

.contact-list a,
.contact-list span {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.contact-list a:hover { color: var(--primary); }

.contact-socials {
  display: flex;
  gap: 0.65rem;
}

.contact-socials a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.contact-socials a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

/* CTA card */
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(200,16,46,0.08), transparent 60%);
  pointer-events: none;
}

.cta-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-dim);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.6rem;
  margin: 0 auto 1.5rem;
  animation: floatCard 3s ease-in-out infinite;
}

.cta-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.cta-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* ── FOOTER ───────────────────────────────────────────── */
#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.footer-links a:hover { color: var(--text); background: var(--surface-2); }

.footer-note p {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ── CHAT WIDGET ──────────────────────────────────────── */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9000;
}

.chat-toggle-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(200,16,46,0.5);
  transition: all var(--transition);
  position: relative;
}

.chat-toggle-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(200,16,46,0.6);
}

.chat-notification {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.chat-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-red);
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  transform: scale(0.9) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 580px;
}

.chat-widget.chat-open .chat-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--primary);
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.chat-header-info strong {
  font-size: 0.88rem;
  color: var(--text);
}

.chat-status {
  font-size: 0.72rem;
  color: #4caf50;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-status i { font-size: 0.5rem; animation: blink 2s ease infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.chat-minimize {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all var(--transition);
}
.chat-minimize:hover { background: var(--primary-dim); color: var(--primary); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 380px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); }

.chat-msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  line-height: 1.55;
}

.chat-msg.bot .msg-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: var(--radius-sm);
}

.chat-msg.user .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: var(--radius-sm);
}

.msg-time {
  display: block;
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-top: 0.3rem;
}

.chat-msg.user .msg-time { text-align: right; }

/* Typing indicator */
.typing-indicator .msg-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.75rem 1rem;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s ease infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(-5px); opacity: 1; }
}

/* Suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-left: 34px;
}

.suggestion-chip {
  font-size: 0.73rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.3rem 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.suggestion-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

/* Input */
.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

#chatInput {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

#chatInput:focus { border-color: var(--primary); }
#chatInput::placeholder { color: var(--text-faint); }

#chatSendBtn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition);
  flex-shrink: 0;
}

#chatSendBtn:hover {
  background: #e01230;
  transform: scale(1.05);
}

/* ── ANIMATIONS ───────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos="fade-right"] {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos="fade-left"] {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translate(0);
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text { order: 2; }
  .hero-photo-wrap { order: 1; margin: 0 auto; }

  .hero-meta, .hero-actions, .hero-socials { justify-content: center; }
  .hero-tagline { margin: 0 auto 1.75rem; }

  .hero-stat-card.hsc-1 { left: -12px; }
  .hero-stat-card.hsc-2 { left: -5px; }
  .hero-stat-card.hsc-3 { right: -12px; }

  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(8,8,16,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  /* Keep lang button & hamburger side by side on mobile */
  .nav-inner { gap: 0.75rem; }
  .lang-btn { order: 1; }
  .nav-toggle { order: 2; }

  .pub-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { flex-direction: column; }
  .project-card.project-featured { grid-column: 1; }

  .hero-photo-frame { width: min(260px, 80vw); }
  .hero-stat-card { display: none; }

  .chat-panel { width: calc(100vw - 2rem); right: -1rem; }
}

@media (max-width: 480px) {
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.5rem; }
  .tc-header { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ======= TWINFLUENCE AVATAR WIDGET ======= */
#avatar-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

#avatar-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--clr-primary, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 2rem;
  padding: 0.55rem 1.1rem 0.55rem 0.55rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}
#avatar-toggle:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.4); }
#avatar-toggle img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
}

#avatar-frame-wrap {
  display: none;
  position: relative;
  width: 380px;
  height: 560px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  background: #000;
}
#avatar-frame-wrap.open { display: block; }

#avatar-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#avatar-close:hover { background: rgba(0,0,0,0.8); }

#avatar-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 480px) {
  #avatar-frame-wrap { width: calc(100vw - 2rem); height: 70vh; }
}

/* ======= CONTACT FORM ======= */
.contact-form-wrap {
  max-width: 700px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text-muted, #94a3b8);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.req { color: var(--clr-primary, #7c3aed); }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--clr-surface, #1e293b);
  border: 1px solid var(--clr-border, #334155);
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  color: var(--clr-text, #f1f5f9);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--clr-text-muted, #64748b);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-primary, #7c3aed);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.contact-form .btn {
  align-self: flex-start;
  min-width: 180px;
  justify-content: center;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ======= KEYNOTES GRID ======= */
.keynotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.keynote-card {
  background: var(--clr-surface, #1e293b);
  border: 1px solid var(--clr-border, #334155);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.keynote-card:hover {
  border-color: var(--clr-primary, #7c3aed);
  transform: translateY(-2px);
}

.keynote-year {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--clr-primary, #7c3aed);
  text-transform: uppercase;
}

.keynote-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text, #f1f5f9);
  line-height: 1.4;
  margin: 0 0 0.3rem;
}

.keynote-venue {
  font-size: 0.82rem;
  color: var(--clr-text-muted, #94a3b8);
  margin: 0;
}

.keynote-link {
  font-size: 0.8rem;
  color: var(--clr-primary, #7c3aed);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
}
.keynote-link:hover { text-decoration: underline; }

.keynote-type {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  margin-top: auto;
}
.keynote-type.keynote { background: rgba(124,58,237,0.15); color: #a78bfa; }
.keynote-type.pub     { background: rgba(16,185,129,0.15); color: #34d399; }
.keynote-type.media   { background: rgba(245,158,11,0.15); color: #fbbf24; }

.pub-more {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}
