section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 8vw, 6rem);
  position: relative;
}

.section-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--blue);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 3rem;
  line-height: 1.1;
}

.section-title em {
  font-style: italic;
  color: var(--blue);
  font-weight: 400;
}

/* ── ABOUT ── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.85;
  font-size: 0.92rem;
}

.about-text strong { color: var(--text-bright); font-weight: 600; }

.about-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.about-links a:hover {
  border-color: var(--blue);
  color: var(--blue-bright);
  background: var(--blue-glow);
}

.about-img-wrap {
  position: relative;
}

.about-img-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  filter: grayscale(15%);
  transition: filter var(--transition);
}

.about-img-wrap:hover img { filter: grayscale(0%); }

.about-img-wrap::after {
  content: '';
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  z-index: -1;
  transition: opacity var(--transition);
}

/* ── TIMELINE / EXPERIENCE ── */
#experiences { background: var(--bg); }

.timeline {
  display: flex;
  flex-direction: column;
  max-width: 680px;
}

.tl-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2rem;
  padding-bottom: 2.75rem;
  position: relative;
}

.tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 109px;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-bright), var(--border));
}

.tl-date {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  padding-top: 3px;
  text-align: right;
  line-height: 1.5;
}

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

.tl-dot {
  position: absolute;
  left: -1px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--blue), 0 0 12px rgba(59,130,246,0.4);
}

.tl-role {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.2rem;
}

.tl-company {
  font-size: 0.75rem;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tl-desc {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.78;
}

/* ── PROJECTS CAROUSEL (desktop grid) ── */
#projects { background: var(--bg2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-dim), var(--blue), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.project-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.08);
}

.project-card:hover::before { opacity: 1; }

.project-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue-dim);
  padding: 0.22rem 0.65rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.project-badge.green {
  color: var(--teal);
  border-color: var(--teal-dim);
}

.project-title {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.78;
  margin-bottom: 1.25rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg4);
  border: 1px solid var(--border);
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}

.tech-tag:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.project-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.project-links a:last-child:nth-child(3) {
  grid-column: 1 / -1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  transition: all var(--transition);
  justify-content: center;
  text-align: center;
}

.project-link:hover {
  border-color: var(--blue);
  color: var(--blue-bright);
  background: var(--blue-glow);
}

.project-link.demo {
  background: rgba(59,130,246,0.1);
  border-color: var(--blue-dim);
  color: var(--blue-bright);
}

.project-link.demo:hover {
  background: rgba(59,130,246,0.2);
  box-shadow: 0 4px 16px rgba(59,130,246,0.2);
}

/* ── MOBILE CAROUSEL ── */
.projects-carousel-wrap {
  display: none;
}

.carousel-track-outer {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.carousel-track .project-card {
  flex: 0 0 100%;
  min-width: 0;
  transform: none !important;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.carousel-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.carousel-btn:hover {
  border-color: var(--blue);
  color: var(--blue-bright);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-bright);
  transition: all var(--transition);
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: var(--blue);
  transform: scale(1.3);
}

/* ── SKILLS ── */
#skills { background: var(--bg); }

.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2.5rem;
}

.skill-group h3 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

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

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.83rem;
  color: var(--text);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.skill-card:hover {
  background: var(--bg3);
  color: var(--text-bright);
}

.skill-card img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-dim);
  border: 1px solid var(--blue);
  flex-shrink: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.83rem;
  color: var(--text);
  transition: all var(--transition);
  cursor: default;
}

.skill-card:hover {
  border-color: var(--border-bright);
  background: var(--bg3);
  color: var(--text-bright);
  transform: translateY(-2px);
}

.skill-card img {
  width: 20px; height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-dim);
  flex-shrink: 0;
  border: 1px solid var(--blue);
}

/* ── FOOTER ── */
footer {
  padding: 2.5rem clamp(1.25rem, 8vw, 6rem);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg2);
}

.footer-left {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-left strong {
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 0.1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.78rem;
  transition: color var(--transition);
}

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

/* ── FADE IN SCROLL ── */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-img-wrap { max-width: 260px; }
}

@media (max-width: 768px) {
  /* Show carousel, hide grid */
  .projects-grid { display: none; }
  .projects-carousel-wrap { display: block; }

  .tl-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .tl-item::after { display: none; }
  .tl-date { text-align: left; }
  .tl-content { padding-left: 1.25rem; }
  .tl-dot { left: 0; }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-secondary { justify-content: center; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
