/* David Beneitez portfolio - updated with experience accordions */

:root {
  --dark: #06111f;
  --dark-2: #0b1b31;
  --blue: #2f80ff;
  --blue-2: #60a5fa;
  --cyan: #38bdf8;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --light: #f8fafc;
  --line: rgba(148, 163, 184, .25);
  --shadow: 0 30px 80px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

a { color: inherit; }

.container {
  width: min(1160px, 90%);
  margin: 0 auto;
}

/* HEADER */

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  width: min(1160px, 90%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(6, 17, 31, .74);
  backdrop-filter: blur(18px);
  color: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.brand strong {
  font-size: 14px;
  letter-spacing: .4px;
}

nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  font-weight: 800;
}

nav a {
  text-decoration: none;
  color: rgba(255,255,255,.76);
  transition: color .2s ease;
}

nav a:hover { color: white; }

/* HERO */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 70% 25%, rgba(56,189,248,.22), transparent 32%),
    radial-gradient(circle at 15% 85%, rgba(47,128,255,.28), transparent 34%),
    linear-gradient(135deg, #020617, #0f172a 55%, #172554);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.hero-noise {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent, rgba(0,0,0,.28));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 64px;
  align-items: center;
  padding-top: 90px;
}

.kicker,
.section-label {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(44px, 6.5vw, 84px);
  line-height: .97;
  letter-spacing: -3px;
}

.hero-content p {
  max-width: 650px;
  margin: 28px 0 0;
  color: #cbd5e1;
  font-size: 21px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 18px 45px rgba(47,128,255,.35);
}

.btn.secondary {
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.06);
  color: white;
}

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

.btn:hover { transform: translateY(-2px); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
}

/* PHOTO */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.24), transparent 62%);
  filter: blur(18px);
  z-index: -1;
}

.photo-wrap {
  position: relative;
  width: 320px;
  height: 420px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 38% 62% 58% 42% / 42% 38% 62% 58%;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow: 0 25px 70px rgba(0,0,0,.35), 0 0 80px rgba(56,189,248,.16);
  backdrop-filter: blur(12px);
  transform: rotate(-3deg);
}

.photo-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(96,165,250,.6), rgba(56,189,248,.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: contrast(1.03) saturate(1.02);
}

/* GENERAL */

.section { padding: 96px 0; }

h2 {
  margin: 0 0 28px;
  color: var(--dark);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -1.8px;
}

h3 {
  margin: 0 0 12px;
  color: var(--dark);
  font-size: 24px;
  line-height: 1.2;
}

.text-block p,
.section p { font-size: 18px; }

.intro-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

/* VALUE */

.value-section { background: var(--light); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.value-grid article {
  min-height: 280px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 45px rgba(15,23,42,.06);
}

.value-grid .icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 900;
}

/* EXPERIENCE WITH ACCORDIONS */

.dark {
  background: var(--dark);
  color: #cbd5e1;
}

.dark h2,
.dark h3 { color: white; }

.experience-list {
  display: grid;
  gap: 22px;
  margin-top: 38px;
}

.experience-card {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 26px;
  align-items: start;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.035));
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
}

.experience-main .date {
  display: block;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.experience-main strong {
  display: block;
  margin-bottom: 14px;
  color: #93c5fd;
}

.experience-main p {
  margin-bottom: 18px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
}

.experience-details {
  border-radius: 24px;
  background: rgba(2,6,23,.24);
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
}

.experience-details summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  color: white;
  font-weight: 900;
  position: relative;
}

.experience-details summary::-webkit-details-marker {
  display: none;
}

.experience-details summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(56,189,248,.18);
  color: var(--cyan);
  font-size: 20px;
  line-height: 1;
}

.experience-details[open] summary::after {
  content: "–";
}

.details-content {
  padding: 0 20px 20px;
  color: #dbeafe;
}

.details-content p {
  margin-top: 0;
  font-size: 16px;
}

.details-content ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.details-content li {
  margin-bottom: 10px;
  color: #cbd5e1;
}

/* PROJECTS */

.projects { background: white; }

.project-grid {
  display: grid;
  grid-template-columns: 1.25fr .85fr .85fr;
  gap: 24px;
  margin-top: 34px;
}

.project-card {
  min-height: 320px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--light);
  box-shadow: 0 20px 55px rgba(15,23,42,.07);
  transition: transform .25s ease, box-shadow .25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(15,23,42,.14);
}

.project-card.large {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: white;
}

.project-card.large h3 { color: white; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.project-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.project-card.large .project-tags span {
  background: rgba(255,255,255,.14);
  color: #bfdbfe;
}

/* TOOLS */

.tools { background: #f1f5f9; }

.tools-grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 60px;
  align-items: start;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.skills span {
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--dark);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}

/* CONTACT */

.contact {
  background: linear-gradient(135deg, #172554, #020617);
  color: white;
}

.contact-box {
  max-width: 820px;
  text-align: center;
}

.contact h2 { color: white; }

.contact p {
  max-width: 720px;
  margin: 0 auto 30px;
  color: #cbd5e1;
  font-size: 20px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* FOOTER */

footer {
  padding: 28px 0;
  background: #020617;
  color: #94a3b8;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 14px;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
  .site-header {
    align-items: center;
    gap: 12px;
    overflow: hidden;
  }

  nav {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 4px 2px;
    scrollbar-width: none;
    white-space: nowrap;
  }

  nav::-webkit-scrollbar { display: none; }

  nav a { font-size: 12px; }

  .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .hero-grid,
  .intro-grid,
  .tools-grid,
  .project-grid,
  .value-grid,
  .experience-card {
    grid-template-columns: 1fr;
  }

  .hero-visual { margin-top: 24px; }

  .photo-wrap {
    width: 260px;
    height: 340px;
  }

  .hero-visual::before {
    width: 300px;
    height: 300px;
  }

  h1 { letter-spacing: -1.8px; }
}

@media (max-width: 600px) {
  .site-header {
    top: 12px;
    width: 92%;
    padding: 10px 12px;
  }

  .brand strong { display: none; }

  .brand span {
    width: 38px;
    height: 38px;
  }

  nav { flex: 1; }

  .hero-content p,
  .section p { font-size: 17px; }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn { width: 100%; }

  .photo-wrap {
    width: 220px;
    height: 300px;
  }

  .hero-visual::before {
    width: 250px;
    height: 250px;
  }

  .section { padding: 72px 0; }

  .experience-card,
  .project-card,
  .value-grid article {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
