/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: 80px; /* Adjust this value to match your navbar height */
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #0f0f13;
  color: #fff;
  overflow-x: hidden;
}

/* Color Palette */
:root {
  --accent-color: #5D3FD3; /* Deep Violet */
  --secondary-color: #FF6B6B; /* Coral Pink */
  --tertiary-color: #4ECDC4; /* Teal */
  --light-bg: #1a1a24;
  --dark-bg: #0a0a12;
  --light-text: #f0f0f0;
  --medium-text: #b0b0b0;
  --dark-text: #707070;
}

/* Utility Classes */
.highlight {
  color: var(--accent-color);
}

.highlight-secondary {
  color: var(--secondary-color);
}

.highlight-tertiary {
  color: var(--tertiary-color);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(10, 10, 18, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-scrolled {
  padding: 0.8rem 5%;
  background: rgba(10, 10, 18, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s;
}
.nav-links li a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a001a, #0f0f13);
  padding-top: 80px; /* offset for navbar */
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(93, 63, 211, 0.15) 0%, transparent 50%);
  z-index: 1;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* Hero photo container with instant background image */
.hero-photo-instant {
  width: 320px;
  height: 427px;
  border-radius: 12px;
  background-image: url('../images/jorgephoto1.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  border: 4px solid rgba(93, 63, 211, 0.2);
  /* Fallback for browsers without WebP support */
  background-image: url('../images/jorgephoto1.JPG'), url('../images/jorgephoto1.webp');
}

.hero-photo-instant:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(93, 63, 211, 0.3);
}

.hero-photo {
  max-width: 320px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  border: 4px solid rgba(93, 63, 211, 0.2);
}

.hero-photo:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(93, 63, 211, 0.3);
}

.hero-text {
  max-width: 600px;
  text-align: left;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.hero-text p {
  font-size: 1.3rem;
  margin-bottom: 1.8rem;
  color: var(--medium-text);
  line-height: 1.6;
}

.cta-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(93, 63, 211, 0.4);
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.cta-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(93, 63, 211, 0.6);
}

.cta-btn:hover::before {
  left: 100%;
}
  
/* Timeline Section (Vertical, Single-Sided) */
#timeline {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 5%;
  text-align: left;
}
#timeline h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--accent-color);
}
.timeline {
  position: relative;
  margin: 2rem 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 20px; /* vertical line near left */
  top: 0;
  width: 3px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
}
.timeline-item {
  position: relative;
  margin: 2rem 0;
  background: var(--light-bg);
  border-radius: 8px;
  padding: 1rem 1rem 1rem 3rem;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.timeline-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 15px var(--accent-color);
}
.timeline-date {
  position: absolute;
  top: 1rem;
  left: -25px; /* positions the circle around the line */
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-weight: 700;
  font-size: 1rem;
}
.timeline-item h3 {
  margin-bottom: 0.5rem;
  color: #fff;
  font-weight: 700;
}
.timeline-item p {
  color: #ccc;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Contact Section */
#contact {
  text-align: center;
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 5%;
}
#contact h2 {
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  background: #000;
  opacity: 0.8;
}

/* Fade-in Effect */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
/* Sub-item for "Machine Learning Model" or other subsets */
.timeline-subitem {
    margin: 1rem 0 2rem 5rem; /* indent left for a nested feel */
    background: var(--light-bg);
    border-left: 3px dashed var(--accent-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .timeline-subitem:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px var(--accent-color);
  }
  .timeline-subitem h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }
  .timeline-subitem p {
    color: #ccc;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
  }
  