/* ── Base ──────────────────────────────────────────── */
:root {
  --accent: #111;
  --accent-light: #f2f2f2;
  --border: #e0e0e0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #222;
  background: #fff;
}

.section-alt { background: #f5f5f5; }

/* ── Navbar ─────────────────────────────────────────── */
#navbar {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.4s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#navbar.scrolled .navbar-brand,
#navbar.scrolled .nav-link { color: #222 !important; }
#navbar.scrolled .navbar-toggler { filter: none; }

.navbar-brand {
  color: #fff !important;
  letter-spacing: -0.5px;
  font-size: 1.1rem;
  transition: color 0.3s;
}

.nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover { color: #fff !important; }

.navbar-toggler {
  filter: invert(1);
  border-color: rgba(255,255,255,0.3);
}

/* ── Hero ───────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  background: #000;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/bg.jpeg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.15) brightness(0.38);
  z-index: 0;
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.profile-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.45);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  filter: grayscale(100%);
  transition: filter 0.35s ease, transform 0.3s ease;
}

.profile-photo:hover {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.hero-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.hero-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.8px;
}

.hero-tagline {
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  margin-inline: auto;
}

/* ── Hero Buttons ───────────────────────────────────── */
.btn-hero-primary {
  background: #fff;
  color: #111;
  border: 2px solid #fff;
  border-radius: 0;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-hero-primary:hover {
  background: #ddd;
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-hero-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 0;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-hero-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  font-size: 1.3rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 14px rgba(0,0,0,0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-social-link:hover,
.hero-social-link:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #111;
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.32);
}

.hero-social-link:focus-visible {
  outline: 3px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
}

.hero-social-link i {
  display: block;
}

/* ── Section Titles ─────────────────────────────────── */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 3px;
  background: var(--accent);
}

/* ── About ───────────────────────────────────────────── */
.about-skills { border-top: 1px solid var(--border); }

.about-skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.about-skill-item i { color: #111; font-weight: 700; }

/* ── Timeline ───────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #ddd;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #f5f5f5;
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 20px 24px;
  transition: box-shadow 0.2s;
}

.timeline-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.07); }

.period-badge {
  display: inline-block;
  background: var(--accent-light);
  color: #555;
  font-weight: 600;
  font-size: 0.73rem;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.timeline-desc {
  color: #555;
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 0;
}

/* ── Project Cards ──────────────────────────────────── */
.project-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 26px 20px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.project-icon { font-size: 1.7rem; color: #555; }

/* ── Skills ─────────────────────────────────────────── */
.skill-group {
  background: #fff;
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.skill-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  margin-bottom: 0;
}

.skill-badge {
  background: var(--accent-light);
  color: #333;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
  cursor: default;
}

.skill-badge:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Gallery Carousel ───────────────────────────────── */
.gallery-carousel-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.gallery-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-track-wrapper {
  flex: 1;
  overflow: hidden;
  background: #eee;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  flex: 0 0 auto;
  /* width set by JS to wrapperWidth / 3 */
}

.carousel-slide:not(:last-child) {
  padding-right: 10px;
}

.carousel-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  color: #888;
  font-size: 0.9rem;
  width: 100%;
}

.carousel-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: default;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-arrow:hover { background: #333; }
.carousel-arrow:disabled { background: #bbb; cursor: default; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: #ccc;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

/* ── Contact Form ───────────────────────────────────── */
.contact-input {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 11px 14px;
  font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  color: #222;
}

.contact-input:focus {
  border-color: #888;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
  outline: none;
}

.contact-input::placeholder { color: #aaa; }

.btn-dark {
  border-radius: 0;
  font-weight: 600;
  background: var(--accent);
  border-color: var(--accent);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-dark:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* ── Footer ─────────────────────────────────────────── */
footer { background: #111; }

.footer-icon {
  color: #777;
  font-size: 1.3rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-icon:hover { color: #fff; }

/* ── Fade-in animation ──────────────────────────────── */
.fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 576px) {
  .profile-photo { width: 130px; height: 130px; }
  .timeline { padding-left: 22px; }
  .timeline-card { padding: 14px 12px; }
  .gallery-carousel-wrap { max-width: 100%; }
  .carousel-arrow { width: 34px; height: 34px; }
}
