/* === CSS Variables (Easy theming) === */
:root {
  --bg: #ffffff;
  --text: #111111;
  --text-light: #666666;
  --accent: #0071e3; /* Apple-like blue */
  --section-padding: 120px 24px;
  --max-width: 900px;
}

/* === Modern Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.section {
  min-height: 100vh;
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === Navigation === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.logo { font-weight: 600; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* Mobile nav toggle (we'll add JS later) */
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* === Home Section === */
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.home-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.home-text {
  max-width: 450px;
}
.home-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.home-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-light);
  margin-bottom: 24px;
  font-weight: 500;
}
.home-bio {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.7;
}
.home-cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s, background 0.2s;
}
.home-cta:hover {
  background: var(--accent);
  transform: scale(1.03);
}
.home-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  object-fit: cover;
}

/* Initial hidden state for GSAP */
.home-text > * {
  opacity: 0;
  transform: translateY(30px);
}
.home-image {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
}

/* Mobile layout */
@media (max-width: 768px) {
  .home-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .home-text { max-width: 100%; }
  .home-image img { max-width: 280px; margin: 0 auto; }
}

/* === About Section === */
.section-container {
  max-width: 720px; /* Slightly narrower for better reading rhythm */
  margin: 0 auto;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: -0.015em;
}
.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}
.about-text:last-child {
  margin-bottom: 0;
}

/* Initial hidden state for GSAP */
.about .section-title,
.about .about-text {
  opacity: 0;
  transform: translateY(30px);
}

/* === Flags & Links === */
.flags-container {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  align-items: center;
}
.flag-link {
  display: inline-block;
  text-decoration: none;
}
.flag {
  width: 32px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;
}
.flag-link:hover .flag {
  transform: scale(1.12);
}

.about-links {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: #f5f5f7; /* Apple-like subtle gray */
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.link-btn:hover {
  background: #e8e8ed;
  transform: translateY(-2px);
}

/* Add to initial hidden state for GSAP */
.about-links {
  opacity: 0;
  transform: translateY(30px);
}

/* === Experience Section (Updated) === */
:root {
  --exp-track: #f2f2f2;
  --exp-progress: #a0a0a0; /* Gray fill line */
  --exp-bubble-inactive: #e5e5e5;
  --exp-bubble-active: #b71c1c; /* Dark red */
}

.experience .section-container { max-width: 820px; }

.exp-timeline {
  position: relative;
  padding-left: 70px; /* Space for bubble + line */
}

.exp-line {
  position: absolute;
  left: 50px; /* Line sits cleanly to the right of the bubble */
  top: 0;
  width: 2px;
  height: 100%;
}

.exp-track {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--exp-track);
  border-radius: 2px;
}

.exp-progress {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 0%;
  background: var(--exp-progress);
  border-radius: 2px;
}

.exp-items { display: flex; flex-direction: column; gap: 32px; }

.exp-item {
  position: relative;
  opacity: 1; /* Always visible */
  transform: none;
}

.year-marker {
  position: absolute;
  left: 0;
  top: -18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--exp-bubble-inactive);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 0 6px var(--bg); /* Creates a clean gap so it never touches the line */
}

.exp-item.active .year-marker {
  background: var(--exp-bubble-active);
  color: #fff;
  transform: scale(0.96);
  box-shadow: 0 0 0 8px rgba(183, 28, 28, 0.12);
}

.exp-content {
  background: #fafafa;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  margin-left: 12px; /* Space from line */
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.exp-item.active .exp-content {
  background: #fff;
  border-color: rgba(183, 28, 28, 0.25);
  transform: translateX(2px);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.exp-role { font-size: 1.2rem; font-weight: 600; color: var(--text); }
.exp-period { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }
.exp-company { font-size: 0.95rem; color: var(--text-light); margin-bottom: 0; font-weight: 500; }

.exp-details {
  list-style: none;
  padding: 0; margin: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin 0.4s ease;
}

.exp-item.active .exp-details {
  max-height: 250px;
  opacity: 1;
  margin-top: 14px;
}

.exp-details li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}
.exp-details li::before {
  content: "•";
  position: absolute; left: 0; color: var(--exp-bubble-active); font-weight: bold;
}

@media (max-width: 768px) {
  .exp-timeline { padding-left: 56px; }
  .exp-line { left: 36px; }
  .year-marker { width: 32px; height: 32px; font-size: 11px; box-shadow: 0 0 0 4px var(--bg); }
  .exp-content { padding: 16px; margin-left: 8px; }
}

/* === Skills Section === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.skill-cat-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-tag {
  padding: 8px 16px;
  background: #f5f5f7;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, transform 0.2s;
}
.skill-tag:hover {
  background: #e8e8ed;
  transform: translateY(-2px);
}

/* === Education Section === */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.edu-card {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.edu-role {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.edu-period {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.edu-institution {
  font-size: 0.95rem;
  color: rgb(183, 28, 28);
  margin-bottom: 12px;
  font-weight: 500;
}

.edu-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.edu-details li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}

.edu-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: rgb(183, 28, 28);
  font-weight: bold;
}

.edu-languages {
  margin-top: 48px;
  text-align: center;
}

.section-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.lang-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lang-tag {
  padding: 10px 20px;
  background: #f5f5f7;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, transform 0.2s;
}

.lang-tag:hover {
  background: #e8e8ed;
  transform: translateY(-2px);
}

/* GSAP hidden states */
.edu-grid,
.edu-languages {
  opacity: 0;
  transform: translateY(30px);
}

/* === Contact Section === */
.contact-content {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-top: 40px;
}

.contact-image {
  flex: 0 0 280px;
  height: 280px;
}

.contact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* Fully rounded */
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.contact-info {
  flex: 1;
}

.contact-text {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hide old form elements if they linger */
.contact-form-wrapper { display: none !important; }

/* GSAP hidden state */
.contact-content {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .contact-content {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }
  .contact-image {
    flex: 0 0 220px;
    height: 220px;
  }
  .contact-links {
    justify-content: center;
  }
}

