:root {
  --bg: #070b14;
  --bg2: #0a1020;
  --card: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #e9eefc;
  --muted: rgba(233, 238, 252, 0.72);
  --accent: #ff5d4a;
  --accent2: #ff6b57;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-lg: 22px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: var(--text);
  background: radial-gradient(
      1200px 700px at 20% 10%,
      rgba(255, 93, 74, 0.08),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 80% 30%,
      rgba(255, 93, 74, 0.06),
      transparent 55%
    ),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

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

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

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.center {
  text-align: center;
}

/* NAV */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 20, 0.92),
    rgba(7, 11, 20, 0.72)
  );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-size: 14px;
  color: rgba(233, 238, 252, 0.78);
  position: relative;
  padding: 6px 2px;
}

.nav-link:hover {
  color: rgba(233, 238, 252, 0.95);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 38px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  background: rgba(233, 238, 252, 0.9);
  margin: 5px auto;
  border-radius: 999px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease,
    border-color 160ms ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #0b0f1a;
  box-shadow: 0 10px 26px rgba(255, 93, 74, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(255, 93, 74, 0.26);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(233, 238, 252, 0.18);
  color: rgba(233, 238, 252, 0.9);
}

.btn-ghost:hover {
  border-color: rgba(233, 238, 252, 0.32);
  transform: translateY(-1px);
}

.btn-wide {
  width: 100%;
}

/* HERO */
.hero {
  min-height: calc(100vh - 78px);
  padding: 56px 0 24px;
  display: grid;
  align-items: center;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
}

.hero-kicker {
  margin: 0 0 10px;
  color: rgba(233, 238, 252, 0.82);
  font-weight: 500;
}

.hero-title {
  margin: 0;
  font-size: clamp(42px, 4.8vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.6px;
}

.hero-title-strong {
  color: rgba(233, 238, 252, 0.95);
}

.hero-accent {
  color: var(--accent);
}

.hero-cta {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.avatar-ring {
  width: min(430px, 86vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  padding: 22px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 93, 74, 0.08),
    rgba(255, 93, 74, 0) 60%
  );
}

.avatar-ring::before,
.avatar-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 93, 74, 0.25);
  transform: scale(1.12);
}

.avatar-ring::after {
  transform: scale(1.28);
  opacity: 0.55;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 50%;
  border: 10px solid rgba(0, 0, 0, 0.35);
  box-shadow: var(--shadow);
  filter: saturate(0.95) contrast(1.05);
  transform: translateX(-5%);
}

/* TICKER */
.ticker {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 11, 20, 0.55);
  overflow: hidden;
}

.ticker-inner {
  display: inline-flex;
  gap: 56px;
  padding: 16px 24px;
  white-space: nowrap;
  animation: ticker 18s linear infinite;
  opacity: 0.9;
}

.ticker-inner span {
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(233, 238, 252, 0.65);
  text-transform: uppercase;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* SECTIONS */
.section {
  padding: 86px 0;
}

.section-head {
  margin-bottom: 34px;
}

.section-title {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.4px;
}

.section-title.accent {
  color: var(--accent);
}

.underline {
  width: 86px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 93, 74, 0.18);
  margin: 14px auto 0;
  position: relative;
}
.underline::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 46px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  margin: auto;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 46px;
  align-items: start;
}

.about-left {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 18px;
  align-items: stretch;
}

.section-mark {
  position: relative;
  width: 26px;
  display: flex;
  justify-content: center;
}
.section-mark .line {
  width: 2px;
  height: 100%;
  background: rgba(255, 93, 74, 0.55);
  border-radius: 999px;
}
.section-mark .dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
}
.section-mark .dot.top {
  top: 6px;
}
.section-mark .dot.bottom {
  bottom: 6px;
  opacity: 0.95;
}

.about-content .section-title {
  margin-top: 4px;
}

.social {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  color: rgba(233, 238, 252, 0.78);
}
.social a {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(233, 238, 252, 0.12);
  background: rgba(255, 255, 255, 0.02);
}
.social a:hover {
  border-color: rgba(255, 93, 74, 0.35);
  color: rgba(233, 238, 252, 0.92);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-top: 14px;
}

.stat-num {
  font-size: 44px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.6px;
  line-height: 1.05;
}
.stat-label {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(233, 238, 252, 0.7);
  text-transform: uppercase;
}
.plus,
.pct {
  font-size: 26px;
  font-weight: 800;
}

.about-cards {
  display: grid;
  gap: 16px;
}

.about-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: "";
  position: absolute;
  inset: -40px -40px auto auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 93, 74, 0.18), transparent 60%);
  filter: blur(2px);
}

.about-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(255, 93, 74, 0.1);
  border: 1px solid rgba(255, 93, 74, 0.18);
  margin-bottom: 10px;
}

.about-card__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.about-card__text {
  margin: 0;
  color: rgba(233, 238, 252, 0.72);
  line-height: 1.7;
}

.about-card:hover {
  border-color: rgba(255, 93, 74, 0.22);
  transform: translateY(-1px);
  transition: transform 160ms ease, border-color 160ms ease;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.skill-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.skill-top {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.skill-ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 93, 74, 0.1);
  border: 1px solid rgba(255, 93, 74, 0.18);
  color: var(--accent);
}

.skill-name {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.skill-val {
  color: rgba(233, 238, 252, 0.75);
  font-weight: 600;
  font-size: 13px;
}

.bar {
  height: 8px;
  background: rgba(233, 238, 252, 0.1);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(233, 238, 252, 0.08);
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}

.projects-grid .project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.projects-grid .project-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.05) brightness(0.9);
  transform: none;
  transition: transform 220ms ease, filter 220ms ease;
}

.projects-grid .project-card:hover .project-media img {
  transform: scale(1.06);
  filter: grayscale(0.55) contrast(1.05) brightness(0.95);
}

.project-link {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #0b0f1a;
  box-shadow: 0 14px 26px rgba(255, 93, 74, 0.18);
}

.project-body {
  padding: 18px 18px 20px;
}

.project-title {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: start;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.panel-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}

.contact-left {
  display: grid;
  gap: 18px;
}

.contact-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(233, 238, 252, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.contact-item .ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 93, 74, 0.1);
  border: 1px solid rgba(255, 93, 74, 0.18);
  color: var(--accent);
}

.contact-item strong {
  display: block;
  font-weight: 700;
}

.contact-item small {
  display: block;
  margin-top: 2px;
  color: rgba(233, 238, 252, 0.65);
}

.panel-accent {
  background: linear-gradient(
    180deg,
    rgba(255, 107, 87, 0.95),
    rgba(255, 93, 74, 0.92)
  );
  border-color: rgba(255, 93, 74, 0.3);
  color: #0b0f1a;
}

.panel-accent .panel-title {
  color: #0b0f1a;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18);
}

/* FORM */
.form {
  display: grid;
  gap: 14px;
}

.label {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(233, 238, 252, 0.18);
  color: rgba(233, 238, 252, 0.92);
  outline: none;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(233, 238, 252, 0.35);
}

input:focus,
textarea:focus {
  border-bottom-color: rgba(255, 93, 74, 0.55);
}

.form-note {
  margin: 4px 0 0;
  min-height: 20px;
}

/* FOOTER */
.footer {
  padding: 30px 0 46px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }
  .avatar-ring {
    margin: 24px auto 0;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: grid;
    gap: 12px;
    padding: 18px 24px 22px;
    background: rgba(7, 11, 20, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* =========================
   PROJECT PAGE (2 columns)
   ========================= */

.project-page {
  padding: 38px 0 70px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(233, 238, 252, 0.78);
}

.back-link:hover {
  color: rgba(233, 238, 252, 0.95);
}

.project-hero {
  padding: 18px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 26px;
}

.project-subtitle {
  margin: 8px 0 0;
  color: rgba(233, 238, 252, 0.72);
}

/* 2-column layout */
.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px; /* texto | video */
  gap: 26px;
  align-items: start;
}

/* Left column spacing */
.project-content section {
  margin-bottom: 22px;
}

.project-content h2 {
  margin: 0 0 10px;
}

.project-content p,
.project-content li {
  color: rgba(233, 238, 252, 0.78);
  line-height: 1.75;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.tech-list li {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(233, 238, 252, 0.86);
  font-size: 13px;
}

/* Right column sticky video */
.project-page .project-media {
  position: sticky;
  top: 96px; /* separado del nav sticky (78px) + aire */
  align-self: start;
}

/* Card look for the video */
.video-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.video-wrap {
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.25);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-meta {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.video-title {
  font-weight: 700;
}

.video-sub {
  margin-top: 4px;
  font-size: 13px;
}

/* Responsive: stack columns */
@media (max-width: 980px) {
  .project-layout {
    grid-template-columns: 1fr;
  }

  .project-page .project-media {
    position: static;
    top: auto;
  }
}
