/* ============================================================
   style.css — Bryan Ferreira Portfolio
   Paleta: fundo #0f172a | cards #1e293b | texto #e2e8f0 | destaque #38bdf8
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #0f172a;
  --bg-alt:    #111827;
  --card:      #1e293b;
  --card-hover:#243044;
  --border:    #334155;
  --text:      #e2e8f0;
  --text-muted:#94a3b8;
  --accent:    #38bdf8;
  --accent2:   #0ea5e9;
  --radius:    12px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Container ── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Sections ── */
.section {
  padding: 6rem 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--text);
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* ── Highlight ── */
.highlight {
  color: var(--accent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* WhatsApp — verde harmonizado com o tema escuro/claro */
.btn-whatsapp {
  background: transparent;
  color: #25d366;
  border-color: #25d366;
}

.btn-whatsapp:hover {
  background: #25d366;
  color: #0f172a;
  border-color: #25d366;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25);
}

[data-theme="light"] .btn-whatsapp:hover {
  color: #fff;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

/* ── Tags / Pills ── */
.tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Reveal animation (scroll) ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient background */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1000px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

/* Photo */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
  /* Dimensões explícitas garantem que o wrapper sempre reserve espaço no
     flex row, mesmo quando a <img> está display:none. Sem isso, o wrapper
     colapsa para 0x0 e o placeholder (position:absolute) flutua sobre o texto. */
  width: 160px;
  height: 160px;
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  position: relative;
  z-index: 1;
}

/* Placeholder shown when photo is missing */
.hero-photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Hide placeholder if photo loaded */
.hero-photo:not([style*="display:none"]) ~ .hero-photo-placeholder,
.hero-photo:not([style*="display: none"]) ~ .hero-photo-placeholder {
  display: none;
}

/* Text */
.hero-name {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-tag {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
}

.hero-subtag {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1rem;
  font-family: monospace;
  letter-spacing: 0.04em;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* Authority stats row */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0;
  margin-bottom: 2rem;
}

.hero-stat {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-stat:not(:last-child)::after {
  content: "•";
  margin: 0 0.75rem;
  color: var(--border);
  font-weight: 400;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Social links row below CTAs */
.hero-social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-social-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition);
  outline-offset: 3px;
}

.hero-social-links a:hover,
.hero-social-links a:focus-visible {
  color: var(--accent);
}

.hero-social-sep {
  color: var(--border);
  font-size: 0.85rem;
  user-select: none;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

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

/* Stack visual */
.about-stack {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.about-stack-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.about-stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-stack-item {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
}

/* ============================================================
   TIMELINE (Experiência)
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

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

.timeline-dot {
  position: absolute;
  left: -1.625rem;
  top: 1.2rem;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
  z-index: 1;
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.1);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.timeline-company {
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.timeline-period {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 0.2rem;
  font-family: monospace;
}

.timeline-desc {
  list-style: none;
  margin-bottom: 1rem;
}

.timeline-desc li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.2rem 0;
  position: relative;
  padding-left: 1rem;
}

.timeline-desc li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.project-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--bg-alt);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.project-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
  z-index: 0;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.project-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.skill-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition);
}

.skill-category:hover {
  border-color: var(--accent);
}

.skill-cat-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.skill-icon {
  color: var(--accent);
  font-size: 0.85rem;
}

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

.skill-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 400;
  transition: all var(--transition);
}

.skill-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 600px;
}

.contact-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color var(--transition);
}

.contact-item:hover {
  color: var(--accent);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.contact-item:hover .contact-icon {
  border-color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============================================================
   FLOATING CONTACT BUTTON (WhatsApp)
   ============================================================ */
.fab-contact {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  z-index: 90;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fab-contact:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

.fab-contact:active {
  transform: scale(0.95);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  /* Drawer mobile */
  .nav-links {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 5rem 2rem 2rem;
    z-index: 200;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: var(--accent);
  }

  .hamburger {
    display: flex;
  }

  /* Hero mobile */
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-desc {
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-photo-wrap {
    width: 120px;
    height: 120px;
  }

  .hero-photo,
  .hero-photo-placeholder {
    width: 120px;
    height: 120px;
  }

  /* Timeline mobile */
  .timeline-header {
    flex-direction: column;
  }

  /* About card mobile */
  .about-content {
    grid-template-columns: 1fr;
  }

  .about-card {
    padding: 1.5rem;
  }

  /* Contact card mobile */
  .contact-card {
    padding: 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
  }

  .btn {
    font-size: 0.82rem;
    padding: 0.55rem 1.1rem;
  }
}

/* ============================================================
   LIGHT MODE — sobrescreve as variáveis do :root
   ============================================================ */
[data-theme="light"] {
  --bg:        #f8fafc;
  --bg-alt:    #f1f5f9;
  --card:      #ffffff;
  --card-hover:#f8fafc;
  --border:    #e2e8f0;
  --text:      #0f172a;
  --text-muted:#64748b;
  --accent:    #0284c7;
  --accent2:   #0369a1;
}

/* Transição suave ao trocar de tema */
html {
  transition: background-color 0.3s ease;
}

body,
.navbar,
.about-card,
.about-stack,
.timeline-card,
.project-card,
.skill-category,
.contact-card,
.contact-icon,
.section-alt {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Navbar scrolled no light mode */
[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 1px 0 var(--border);
}

/* Drawer mobile no light mode */
@media (max-width: 768px) {
  [data-theme="light"] .nav-links {
    background: var(--bg-alt);
  }
}

/* Scrollbar light mode */
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-alt); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border); }

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(2, 132, 199, 0.08);
}

/* ============================================================
   "VER TODOS OS PROJETOS" LINK
   ============================================================ */
.projects-more {
  text-align: center;
  margin-top: 2.5rem;
}

/* ============================================================
   PÁGINA PROJETOS (projetos.html)
   ============================================================ */
.page-header {
  padding: 8rem 1.5rem 3rem;
  text-align: center;
}

.page-header-tag {
  font-size: 0.88rem;
  color: var(--accent);
  font-family: monospace;
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.projects-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0 5rem;
}

/* ============================================================
   PROJECT DETAIL PAGE (vertical layout)
   ============================================================ */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.project-detail-left,
.project-detail-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.project-detail-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.project-detail-desc {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.project-detail-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.project-detail-features li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 1rem;
  position: relative;
}

.project-detail-features li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Wider container for carousel */
.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Clickable project card overlay */
.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.project-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.project-card {
  position: relative;
}

.project-card .project-links {
  position: relative;
  z-index: 3;
}

/* ============================================================
   PROJECT CAROUSEL (image slider in detail page)
   ============================================================ */
.project-carousel {
  position: relative;
  user-select: none;
}

.carousel-slides {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.carousel-slide img:hover {
  transform: scale(1.015);
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 22px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 2;
}

.carousel-btn:hover {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  transform: scale(1.1);
}

.carousel-prev {
  left: 0.75rem;
}

.carousel-next {
  right: 0.75rem;
}

.carousel-footer {
  margin-top: 1rem;
}

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

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

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

.carousel-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

[data-theme="light"] .carousel-btn {
  background: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   LIGHTBOX (fullscreen image viewer)
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

.lightbox-caption {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 1001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* ============================================================
   GITHUB SECTION
   ============================================================ */
.github-repo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.github-repo-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.github-repo-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.github-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.github-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.github-stars {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.github-updated {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.github-commit-msg {
  font-style: italic;
  opacity: 0.7;
  font-size: 0.76rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3rem 0;
  opacity: 0.7;
}

.github-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3rem 0;
}
