/* ============================================================================
   PORTFOLIO — style.css
   Estética brutalista oscura (inspirada en NewInspo): fondo negro, acento
   lima neón, tipografía gigante sobre foto en B/N, líneas finas y riel
   lateral con redes.
   ========================================================================== */

:root {
  --bg: #000000;
  --panel: #0b0b0b;
  --ink: #f4f4f0;
  --body: #b9b9b2;
  --muted: #8a8a83;
  --line: rgba(255, 255, 255, 0.16);
  --accent: #ff7f1d;
  --maxw: 1280px;
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

::selection {
  background: var(--accent);
  color: #000;
}

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

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

/* ============================= SIDE RAIL ============================= */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 60;
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  pointer-events: none;
}
.rail-brand {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail-social {
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}
.rail-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color 0.2s, transform 0.2s;
}
.rail-social a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
@media (max-width: 1100px) {
  .rail {
    display: none;
  }
}

/* ============================= NAVBAR ============================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 48px 16px 84px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 30px;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 999px;
}
.lang-btn.active {
  background: var(--accent);
  color: #000;
}

.pill-btn {
  border: none;
  background: var(--accent);
  color: #000;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.pill-btn:hover {
  opacity: 0.88;
}
.pill-btn:active {
  transform: scale(0.97);
}

.cv-dropdown {
  position: relative;
}
.cv-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  background: #0d0d0d;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.cv-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.cv-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}
.cv-menu[hidden] {
  display: none;
}

/* ============================= HERO ============================= */
.hero {
  position: relative;
}
.hero-media {
  position: relative;
  height: calc(100vh - 66px);
  min-height: 540px;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  filter: grayscale(1) contrast(1.06) brightness(0.92);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.22) 48%, rgba(0, 0, 0, 0.1) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, transparent 46%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 52px) clamp(24px, 5vw, 76px);
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-meta span:nth-child(2) {
  color: var(--accent);
}
.hero-meta span:last-child {
  color: var(--muted);
}
.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.hero-kicker {
  color: var(--accent);
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero-name {
  color: var(--accent);
  font-size: clamp(4rem, 13vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.84;
  text-transform: uppercase;
}
.hero-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding-bottom: clamp(8px, 2vw, 22px);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-portfolio .arrow {
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 0.6;
  transition: transform 0.25s ease;
}
.hero-portfolio:hover .arrow {
  transform: translate(5px, -5px);
}

/* ============================= ABOUT ============================= */
.bio {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(32px, 6vw, 90px);
}
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 8px;
}
.bio p {
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
}

/* ============================= SECTIONS ============================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.section-index {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
}
.section-side h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
}
.section-sub {
  color: var(--muted);
  margin-top: 18px;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Sección a todo lo ancho (Proyectos) */
.section--full {
  display: block;
}
.section--full .section-head {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 56px;
}
.section--full .section-index {
  margin-bottom: 0;
  padding-top: 12px;
}
.section--full h2 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.section--full .section-sub {
  max-width: 560px;
}

/* ============================= EXPERIENCE ============================= */
.exp-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.exp-item:first-child {
  border-top: none;
  padding-top: 6px;
}
.exp-period {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  padding-top: 6px;
}
.exp-company {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.exp-loc {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
  margin-left: 6px;
}
.exp-role {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.98rem;
  margin: 4px 0 14px;
}
.exp-bullets {
  list-style: none;
  display: grid;
  gap: 10px;
}
.exp-bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--body);
  line-height: 1.55;
  font-size: 0.96rem;
}
.exp-bullets li strong {
  color: var(--ink);
}
.exp-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================= PROJECTS ============================= */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.project-media {
  overflow: hidden;
}
.project-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: transform 0.5s ease, filter 0.5s ease;
}
.project-card:hover .project-media img {
  transform: scale(1.03);
  filter: grayscale(0);
}
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-top: 20px;
}
.project-title {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.project-card:hover .project-title {
  color: var(--accent);
}
.project-tags {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.tag-sep {
  opacity: 0.5;
  margin: 0 2px;
}
.project-type {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
}
.project-desc {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}
.project-desc p {
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ============================= SKILLS ============================= */
.skills-list {
  counter-reset: skill;
}
.skill-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.skill-card:first-child {
  border-top: none;
  padding-top: 6px;
}
.skill-card h3 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
}
.skill-card h3::before {
  counter-increment: skill;
  content: counter(skill, decimal-leading-zero) ". ";
  color: var(--accent);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================= EDUCATION ============================= */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}
.col-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.col-title:not(:first-child) {
  margin-top: 36px;
}
.edu-item {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.edu-school {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}
.edu-degree {
  color: var(--muted);
  font-weight: 500;
  margin: 4px 0 10px;
}
.edu-period {
  color: var(--muted);
}
.edu-details {
  list-style: none;
  display: grid;
  gap: 6px;
}
.edu-details li {
  position: relative;
  padding-left: 16px;
  color: var(--body);
  font-size: 0.93rem;
  line-height: 1.5;
}
.edu-details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.courses-list {
  list-style: none;
}
.courses-list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
  color: #c9c9c2;
  line-height: 1.45;
}
.course-year {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 6px;
}

/* ============================= FOOTER / CONTACT ============================= */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 40px 48px;
  border-top: 1px solid var(--line);
}
.footer-cta {
  color: var(--accent);
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.footer-sub {
  color: var(--muted);
  margin: 22px 0 48px;
  max-width: 480px;
  font-size: 1.02rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  margin-bottom: 56px;
}
.contact-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  letter-spacing: -0.01em;
  transition: color 0.2s, padding-left 0.25s;
}
.contact-pill:first-child {
  border-top: 1px solid var(--line);
}
.contact-pill::after {
  content: "↗";
  color: var(--muted);
  transition: color 0.2s, transform 0.25s;
}
.contact-pill:hover {
  color: var(--accent);
  padding-left: 10px;
}
.contact-pill:hover::after {
  color: var(--accent);
  transform: translate(4px, -4px);
}
.footer-note {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ============================= RESPONSIVE ============================= */
@media (max-width: 960px) {
  .nav {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
  }
  .hero-media {
    height: 84vh;
    min-height: 520px;
  }
  .hero-meta {
    flex-direction: column;
    gap: 6px;
  }
  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-portfolio {
    padding-bottom: 0;
  }
  .bio,
  .section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 64px 20px;
  }
  .section--full .section-head {
    flex-direction: column;
    gap: 6px;
  }
  .section--full .section-index {
    padding-top: 0;
  }
  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .project-tags {
    text-align: left;
    white-space: normal;
  }
  .skill-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .edu-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .footer {
    padding: 80px 20px 40px;
  }
}
