/* ================= GLOBAL ================= */
/* Reset & base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  translate: no;
}

html, body {
  overflow-x: hidden !important;
}

body {
  font-family: 'Inter', sans-serif;
  background: #05070d;
  color: #e5e7eb;
  line-height: 1.7;
  position: relative;
}

/* Blueprint grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* ================= NAVIGATION ================= */
nav {
  position: fixed;
  width: 100%;
  background: rgba(5,7,13,0.95);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  padding: 20px 8%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

nav a {
  color: #9ca3af;
  text-decoration: none;
  margin-left: 30px;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover { color: #ffffff; }

nav a.btn { text-align: center; }

/* ================= HERO ================= */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 8%;
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 70px;
  z-index: 1;
}

.hero img {
  width: 260px;
  border-radius: 50%;
  border: 3px solid #1f2937;
}

.hero-text h1 { font-size: 52px; font-weight: 800; letter-spacing: 1px; }
.hero-text h2 { color: #9ca3af; font-weight: 400; margin: 15px 0 25px; }
.hero-text p { font-size: 18px; max-width: 650px; color: #d1d5db; }

.hero::after {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 70%);
  top: 50%;
  right: -250px;
  transform: translateY(-50%);
  z-index: 0;
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 28px;
  border: 1px solid #ffffff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: 0.3s;
}

.btn:hover { background: #ffffff; color: #05070d; }

/* ================= SECTIONS ================= */
.section {
  padding: 120px 8%;
  position: relative;
  z-index: 1;
}

.section h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 60px;
  letter-spacing: 1px;
}

/* ================= CARDS ================= */
.card {
  background: #0c111b;
  padding: 35px;
  margin-bottom: 35px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: 0.3s;
}

.card:hover { border-color: rgba(255,255,255,0.2); }
.card p { font-size: 18px; margin-bottom: 20px; }
.card ul { margin-left: 20px; }
.card h3 { font-size: 20px; }

/* ================= TIMELINE ================= */
.timeline { border-left: 2px solid rgba(255,255,255,0.1); padding-left: 40px; }
.timeline-item { margin-bottom: 60px; position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -49px;
  top: 5px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
}
.timeline-date { color: #9ca3af; margin-bottom: 10px; font-weight: 600; letter-spacing: 1px; }

/* ================= SKILLS ================= */
.skill-category { margin-bottom: 40px; }
.skill-category h3 { margin-bottom: 20px; font-weight: 700; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 15px; }
.skill-tag { padding: 10px 18px; border: 1px solid rgba(255,255,255,0.2); font-size: 14px; letter-spacing: 1px; }

/* ================= COURSES ================= */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 30px; }

/* ================= CONTACT ================= */
.contact-section { background: #0c111b; padding: 100px 8%; text-align: center; border-top: 1px solid rgba(255,255,255,0.08); }
.contact-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; margin-top: 40px; }
.contact-item { min-width: 250px; font-size: 18px; text-align: center; }
.contact-item a { color: #ffffff; text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }
.contact-item i { color: #ffffff; margin-right: 12px; font-size: 20px; vertical-align: middle; }

/* ================= FADE ANIMATION ================= */
.fade-in { opacity: 0; transform: translateY(40px); transition: all 1s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ================= IFRAME ================= */
iframe { width: 100%; height: 80vh; border: none; margin-bottom: 20px; }

/* ================= CAPTIONS ================= */
.caption {
  margin-top: 15px;
  color: #e5e7eb;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.caption h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.caption p { font-size: 1rem; line-height: 1.5; color: #d1d5db; }

/* ================= EXPERIENCE CARD ================= */
.experience-card { position: relative; overflow: hidden; }

.media-banner {
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: url('images/profile.png') center/cover no-repeat;
  opacity: 0.12;
  transform: translateX(30%) scale(1);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.experience-card:hover .media-banner {
  opacity: 0.25;
  transform: translateX(-10%) scale(1.15); /* slide left and grow bigger */
}

.card-content { position: relative; z-index: 2; }


/* PDF and Video Slides */
.pdf-slide iframe,
.video-slide video {
  width: 100%;
  max-height: 450px;
  border-radius: 6px;
}

/* Make Swiper pagination always below content */
.swiper-pagination {
  position: relative !important; /* instead of absolute */
  margin-top: 15px;
}

/* ================= ANAC SLIDING GALLERY ================= */
.swiper { width: 100%; padding-top: 70px; padding-bottom: 60px; }
.swiper-slide {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.swiper-slide img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: 0.4s ease;
}
.swiper-slide img:hover { transform: scale(1.02); }



/* PDF Slide */
.pdf-slide {
  height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #0c111b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}
.pdf-slide i {
  font-size: 80px;
  color: #ff4d4d;
  margin-bottom: 0px;
  transition: 0.3s ease;
}
.pdf-slide i:hover { transform: scale(1.1); }

/* Pagination & arrows */
.swiper-pagination { bottom: 0 !important; }
.swiper-button-next,
.swiper-button-prev { color: #ffffff; }
.swiper-button-next:hover,
.swiper-button-prev:hover { opacity: 0.7; }
.swiper-slide-active img { box-shadow: 0 0 25px rgba(255,255,255,0.05); }

/* ================= MOBILE / RESPONSIVE ================= */
@media (max-width: 900px) {
  nav { flex-direction: column; align-items: center; padding: 15px 5%; width: 100%; }
  nav div:nth-child(2) { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
  nav a { margin-left: 0; margin-bottom: 10px; font-size: 16px; }
  nav a.btn { flex: 1 1 100%; }

  .hero { flex-direction: column; text-align: center; padding-top: 220px; height: auto; overflow: hidden; }
  .hero-content { flex-direction: column; gap: 20px; width: 100%; padding: 0 5%; align-items: center; }
  .hero img { width: 160px; max-width: 50%; margin: 0 auto; border: 2px solid #1f2937; }
  .hero-text { width: 100%; }
  .hero-text h1 { font-size: 28px; }
  .hero-text h2 { font-size: 18px; margin: 10px 0; }
  .hero-text p { font-size: 16px; max-width: 90%; margin: 0 auto 20px auto; }
  .hero-text .btn { display: inline-block; margin: 0 auto; }

  .timeline { padding-left: 20px; border-left: 2px solid rgba(255,255,255,0.08); }
  .timeline-item::before { left: -32px; }

  .skill-tags { justify-content: center; }

  .contact-grid { flex-direction: column; gap: 25px; align-items: center; }
  .contact-item { text-align: center; font-size: 18px; min-width: 200px; }

  .course-grid { grid-template-columns: 1fr; gap: 20px; }
  .card h3 { font-size: 20px; }
  .card p { font-size: 16px; }

  .gallery { flex-direction: column; gap: 15px; }
}

@media (max-width: 500px) {
  .hero img { width: 140px; }
  .hero-text h1 { font-size: 24px; }
  .hero-text h2 { font-size: 16px; }
  .hero-text p { font-size: 14px; }
  nav a { font-size: 14px; }
}

/* ================= EDUCATION BANNERS ================= */
.edu-card .media-banner {
  position: absolute;
  top: 50%;
  right: 30px;               /* gap from edge */
  transform: translateY(-50%);
  width: 20%;                /* smaller */
  height: 80px;              /* give height so background shows */

  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;

  opacity: 1;                
  pointer-events: none;
}
/* then set the correct background for each card inline or via class */
.edu-card.msc-ist .media-banner {
  background-image: url('images/ist.svg');
}

.edu-card.tum .media-banner {
  background-image: url('images/TUM.svg');
}

.edu-card.bsc-ist .media-banner {
  background-image: url('images/ist.svg');
}

.edu-card.hs .media-banner {
  background-image: url('images/francisco_franco.png');
}

.edu-card:hover .media-banner {
  transform: translateY(-50%);     /* no change on hover */
  opacity: 1;
}

.edu-card .media-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 900px) {
  .edu-card .media-banner {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    margin-top: 20px;
    opacity: 0.1;
  }
}