:root {
  --bg: #0b1020;
  --bg-soft: #111933;
  --card: rgba(18, 25, 51, 0.86);
  --card-strong: #182347;
  --text: #edf2ff;
  --muted: #aab4d0;
  --accent: #8aa2ff;
  --accent-strong: #6f8cff;
  --border: rgba(138, 162, 255, 0.14);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
  --radius: 20px;
  --radius-sm: 14px;
  --max-width: 1120px;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
}

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

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

/* GLOBAL */
body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(
      circle at top left,
      rgba(138, 162, 255, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at top right,
      rgba(138, 162, 255, 0.08),
      transparent 22%
    ),
    linear-gradient(180deg, #0a1020 0%, #0b1020 100%);
}

section {
  scroll-margin-top: 90px;
}

.container {
  width: min(100% - 1.5rem, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 2rem 0;
}

.section-title {
  font-size: 1.75rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 16, 32, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.9rem;
  padding: 1rem 0;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo span {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--muted);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

/* HERO */
.hero-inner {
  margin: 0 auto;
  text-align: center;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-inner h1 {
  font-weight: 600;
  margin-left: auto;
  margin-right: auto;
  max-width: 550px;
  font-size: 1.9rem;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.hero-inner p {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
  color: var(--muted);
  font-size: 1rem;
  opacity: 0.9;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

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

.btn-primary,
.btn-secondary {
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--border);
}

/* ABOUT */
.about {
  max-width: 800px;
}

.about p {
  color: var(--muted);
  margin-bottom: 1rem;
}
.about-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.about-photo img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.about-text {
  max-width: 700px;
}

/* CARD */
.card {
  background: linear-gradient(
    180deg,
    rgba(24, 35, 71, 0.8),
    rgba(18, 25, 51, 0.88)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(138, 162, 255, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

/* SKILLS */
.skills-grid {
  display: grid;
  gap: 1.5rem;
}

.skills-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  position: relative;
}

.skills-category::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 999px;
}

.skills-category h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  color: var(--text);
}

.skills-category ul {
  list-style: none;
  padding: 0;
}

.skills-category li {
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.skills-category:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* PROJECTS */
.featured-project {
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.featured-project::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.secondary-project {
  width: 100%;
}

.project-tag {
  display: inline-block;
  margin-bottom: 0.95rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(138, 162, 255, 0.12);
  border: 1px solid rgba(138, 162, 255, 0.16);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.project-title {
  font-size: 1.45rem;
  line-height: 1.15;
  margin-bottom: 0.9rem;
  letter-spacing: -0.02em;
}

.project-description {
  color: var(--muted);
  margin-bottom: 1.35rem;
}

.project-block {
  margin-bottom: 1.6rem;
}

.project-block h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.project-block p {
  color: var(--muted);
}

.project-list {
  list-style: none;
  padding-left: 0;
  color: var(--muted);
}

.project-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
}

.project-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--accent);
}

/* MEDIA */
.project-image,
.project-video {
  width: 100%;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
  background: #000;
}

.project-video-mobile {
  max-width: 320px;
  width: 100%;
  margin: 1rem auto 0;
  display: block;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.project-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}
.secondary-project .project-note {
  margin-bottom: 0.75rem;
}
.secondary-project .project-block {
  margin-bottom: 1.4rem;
}

.demo-group {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.demo-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.demo-item + .demo-item {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.demo-title {
  font-weight: 600;
  font-size: 1rem;
}

.demo-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.carambar-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.carambar-desktop,
.carambar-mobile {
  width: 100%;
  min-width: 0;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.mus-media {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.mus-icon {
  width: 140px;
  max-width: 140px;
}

.mus-mobile {
  width: 100%;
  max-width: 260px;
}

/* LINKS */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent);
  font-weight: 600;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.small-link:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: rgba(138, 162, 255, 0.34);
  background: rgba(138, 162, 255, 0.09);
}

/* FOOTER */
.footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer p {
  color: var(--muted);
}

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

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

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

/* NAV ACTIVE */
.nav-links a.active {
  color: var(--text);
  font-weight: 600;
}

/* BOUTON TOP */
#topBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;

  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

#topBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#topBtn:hover {
  transform: translateY(-2px);
}

/* FADE IN */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

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

/* TABLET */
@media (min-width: 700px) {
  .container {
    width: min(100% - 2rem, var(--max-width));
  }

  .section {
    padding: 2.75rem 0;
  }

  .section-title {
    font-size: 1.95rem;
    margin-bottom: 1.8rem;
  }

  .nav {
    min-height: 76px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0;
  }

  .hero-inner {
    padding: 5.5rem 0 3.5rem;
  }

  .hero-inner h1 {
    font-size: 2.5rem;
  }

  .hero-inner p {
    font-size: 1.06rem;
  }

  .about-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
    text-align: left;
  }

  .about-text {
    flex: 1;
    max-width: 700px;
  }

  .about-photo {
    flex-shrink: 0;
    margin-left: auto;
  }

  .about-photo img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
  }

  .card {
    padding: 1.7rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-title {
    font-size: 1.65rem;
  }

  .carambar-media {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .carambar-desktop {
    flex: 2 1 0;
    min-width: 0;
  }

  .carambar-mobile {
    flex: 1 1 0;
    min-width: 0;
    max-width: 260px;
    width: 100%;
  }

  .mus-media {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
  }

  .mus-icon,
  .mus-mobile {
    flex: 0 0 260px;
    max-width: 260px;
  }

  .footer-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* DESKTOP */
@media (min-width: 1024px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero-inner {
    padding: 6.5rem 0 4rem;
  }

  .hero-inner h1 {
    font-size: 3rem;
  }

  .hero-inner p {
    max-width: 620px;
    font-size: 1.08rem;
  }

  .section-title {
    font-size: 2.15rem;
  }

  .card {
    padding: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .featured-project {
    margin-bottom: 1.5rem;
  }
}
