/* sdanielgf — marca personal */
:root {
  --black: #111111;
  --navy: #0F1E3D;
  --blue: #1F4E9C;
  --sky: #7FA7C9;
  --light: #F3F3F3;
  --white: #ffffff;
  --muted: #a8b3c4;
  --card: #181818;
  --card-border: rgba(127, 167, 201, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --max: 1120px;
  --header-h: 72px;
  --font: "Montserrat", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--light);
  background: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section--alt { background: linear-gradient(180deg, #0c0c0c 0%, var(--navy) 100%); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sky); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--blue); border-radius: 2px;
}
h1, h2, h3, h4 { font-weight: 800; line-height: 1.1; margin: 0 0 .75rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1rem; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #c9d4e3; max-width: 42rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.35rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: #275bb3; }
.btn-ghost {
  background: transparent; color: var(--light);
  border: 1.5px solid rgba(243,243,243,.28);
}
.btn-ghost:hover { border-color: var(--sky); color: var(--white); }
.btn-light { background: var(--light); color: var(--black); }
.btn-light:hover { background: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  background: rgba(17,17,17,.82);
  border-bottom: 1px solid rgba(127,167,201,.12);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -0.03em;
}
.brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 0; }
.nav-desktop { display: none; gap: 1.35rem; align-items: center; }
.nav-desktop a {
  font-size: .88rem; font-weight: 600; color: var(--muted);
  transition: color .2s;
}
.nav-desktop a:hover, .nav-desktop a.is-active { color: var(--light); }
.nav-cta { margin-left: .5rem; padding: .55rem 1rem; font-size: .82rem; }
.nav-toggle {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid rgba(243,243,243,.18);
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--light);
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--light);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.nav-mobile {
  display: none; position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(17,17,17,.97); padding: 1.5rem;
  flex-direction: column; gap: 1rem; z-index: 40;
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  font-size: 1.35rem; font-weight: 700; padding: .6rem 0;
  border-bottom: 1px solid rgba(127,167,201,.12);
}
@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(31,78,156,.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(15,30,61,.8), transparent 55%),
    var(--black);
}
.hero-grid {
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 3rem; }
}
.hero-copy .tagline {
  font-size: clamp(1rem, 2.2vw, 1.2rem); font-weight: 600;
  color: var(--sky); margin: 0 0 1.25rem;
}
.hero-stat {
  display: inline-flex; align-items: baseline; gap: .4rem;
  margin: 1.5rem 0 1.75rem; padding: .65rem 1rem;
  background: rgba(31,78,156,.18); border: 1px solid rgba(127,167,201,.25);
  border-radius: 999px; font-weight: 700;
}
.hero-stat strong { font-size: 1.35rem; color: var(--light); }
.hero-stat span { color: var(--sky); font-size: .9rem; font-weight: 600; }
.hero-socials { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.75rem; }
.social-link {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(243,243,243,.18); color: var(--light);
  transition: background .2s, border-color .2s, color .2s;
}
.social-link:hover { background: var(--blue); border-color: var(--blue); }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }

.hero-media { position: relative; justify-self: center; width: min(100%, 440px); }
.hero-photo {
  position: relative;
  border-radius: 28px; overflow: hidden;
  border: 1px solid rgba(127,167,201,.22);
  box-shadow: var(--shadow), 0 0 60px rgba(31,78,156,.28);
  aspect-ratio: 1 / 1;
  background: var(--navy);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-badge {
  position: absolute; right: -8px; bottom: 18px;
  width: 108px; height: 108px;
}
.hero-badge a {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 50%; background: var(--blue); color: var(--white);
  font-weight: 800; font-size: .7rem; letter-spacing: .06em; text-align: center;
  line-height: 1.2; padding: .85rem;
  box-shadow: 0 12px 30px rgba(31,78,156,.45);
  transition: transform .25s ease, background .2s;
}
.hero-badge a:hover { transform: scale(1.05); background: #275bb3; }

/* Cards / grids */
.grid-2 { display: grid; gap: 2rem; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; } }
.grid-3 { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.about-photo {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--card-border); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; max-width: 460px; margin-inline: auto;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }
.chip {
  padding: .4rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: rgba(31,78,156,.2); color: var(--sky); border: 1px solid rgba(127,167,201,.25);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(31,78,156,.55); transform: translateY(-3px); }
.card-logo {
  display: flex; align-items: center; justify-content: center;
  height: 104px; margin: 0 0 1.15rem;
  padding: .85rem 1rem;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid rgba(127,167,201,.18);
}
.card-logo img {
  max-height: 76px; max-width: 100%; width: auto; height: auto; mix-blend-mode: multiply;
  object-fit: contain;
}
.card-logo a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.card h3 { margin-bottom: .35rem; }
.card .card-label { color: var(--sky); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .75rem; }
.card p { font-size: .95rem; margin-bottom: 1.1rem; }
.card-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 700; color: var(--light); font-size: .92rem;
}
.card-link:hover { color: var(--sky); }
.card--soft { }
.card--soft .card-label::after { content: " · en desarrollo"; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; }

/* Portfolio */
.portfolio-grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
.project-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--card-border); background: var(--card);
  display: flex; flex-direction: column;
}
.project-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; padding: 1.25rem; }
.project-card .meta { padding: 1rem 1.15rem 1.25rem; }
.project-card h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.project-card p { font-size: .85rem; margin: 0; }
.section-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* Medios */
.media-list { display: grid; gap: 1rem; }
.media-item {
  display: grid; gap: 1rem; align-items: start;
  padding: 1.35rem 1.4rem; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
}
@media (min-width: 700px) {
  .media-item { grid-template-columns: 120px 1fr auto; align-items: center; }
}
.media-when {
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--black); background: var(--sky); padding: .45rem .7rem; border-radius: 8px;
  display: inline-block; width: fit-content;
}
.media-item h3 { margin-bottom: .3rem; }
.media-item p { margin: 0; font-size: .92rem; }

/* CV timeline */
.timeline { position: relative; margin-top: 2rem; display: grid; gap: 1.25rem; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: .4rem; bottom: .4rem; width: 2px;
  background: linear-gradient(var(--blue), rgba(127,167,201,.2));
}
@media (min-width: 720px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }
}
.tl-item {
  position: relative; padding-left: 2.5rem;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 1.25rem 1.25rem 1.25rem 2.75rem;
}
.tl-item::before {
  content: ""; position: absolute; left: 1.05rem; top: 1.45rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 4px rgba(31,78,156,.25);
  transform: translateX(-50%);
}
@media (min-width: 720px) {
  .tl-item { width: calc(50% - 1.25rem); padding: 1.35rem 1.5rem; }
  .tl-item::before { left: auto; }
  .tl-item:nth-child(odd) { margin-right: auto; }
  .tl-item:nth-child(odd)::before { right: -1.55rem; }
  .tl-item:nth-child(even) { margin-left: auto; }
  .tl-item:nth-child(even)::before { left: -1.3rem; }
}
.tl-role { color: var(--sky); font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .35rem; }
.tl-item h3 { font-size: 1.05rem; }
.tl-item p { margin: 0; font-size: .92rem; }
.cv-gallery { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 700px) { .cv-gallery { grid-template-columns: repeat(3, 1fr); } }
.cv-gallery a {
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--card-border);
  display: block; aspect-ratio: 4/3;
}
.cv-gallery img { width: 100%; height: 100%; object-fit: cover; }

/* Contact */
.contact-box {
  display: grid; gap: 2rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(31,78,156,.35), rgba(15,30,61,.9)),
    var(--navy);
  border: 1px solid rgba(127,167,201,.28);
}
@media (min-width: 800px) { .contact-box { grid-template-columns: 1.2fr .8fr; align-items: center; } }
.contact-box h2, .contact-box p { color: var(--light); }
.contact-box p { color: #d5deea; }
.contact-links { display: flex; flex-direction: column; gap: .75rem; }
.contact-links a.big-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.15rem; border-radius: 12px;
  background: rgba(17,17,17,.45); border: 1px solid rgba(243,243,243,.12);
  font-weight: 700;
}
.contact-links a.big-link:hover { border-color: var(--sky); }

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(127,167,201,.12);
  color: var(--muted); font-size: .88rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}
.footer-inner a { color: var(--sky); }
.footer-inner a:hover { color: var(--light); }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head.wide { max-width: 48rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-badge a, .hero-badge a span { animation: none; }
  .btn:hover, .card:hover { transform: none; }
  }


/* Legal / terms page */
.legal-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(31,78,156,.28), transparent 55%),
    var(--black);
  border-bottom: 1px solid rgba(127,167,201,.12);
}
.legal-hero .breadcrumb {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  font-size: .88rem; color: var(--muted); margin-bottom: 1.25rem;
}
.legal-hero .breadcrumb a { color: var(--sky); font-weight: 600; }
.legal-hero .breadcrumb a:hover { color: var(--light); }
.legal-hero h1 { margin-bottom: .75rem; }
.legal-hero .lead { margin-bottom: 0; }
.legal-layout {
  display: grid; gap: 2rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 7vw, 5.5rem);
}
@media (min-width: 1000px) {
  .legal-layout {
    grid-template-columns: 220px minmax(0, 760px);
    align-items: start;
    justify-content: center;
  }
}
.legal-toc {
  display: none;
}
@media (min-width: 1000px) {
  .legal-toc {
    display: block;
    position: sticky; top: calc(var(--header-h) + 1.25rem);
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--card-border);
  }
  .legal-toc strong {
    display: block; font-size: .72rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--sky); margin-bottom: .75rem;
  }
  .legal-toc ol {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: .35rem;
  }
  .legal-toc a {
    display: block; font-size: .8rem; font-weight: 600; line-height: 1.35;
    color: var(--muted); padding: .2rem 0;
  }
  .legal-toc a:hover, .legal-toc a.is-active { color: var(--light); }
}
.legal-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
}
.legal-meta {
  font-size: .9rem; color: var(--muted);
  padding-bottom: 1.1rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(127,167,201,.16);
}
.legal-meta strong { color: var(--sky); font-weight: 700; }
.legal-section {
  padding-bottom: 1.5rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(127,167,201,.12);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.legal-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.legal-section h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  margin-bottom: .85rem;
}
.legal-section p,
.legal-section li {
  color: #c5cedb;
  font-size: 1rem;
  line-height: 1.75;
}
.legal-section p { margin: 0 0 .9rem; }
.legal-section ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  list-style: disc;
}
.legal-section li { margin-bottom: .45rem; }
.legal-section strong { color: var(--light); font-weight: 700; }
.legal-highlight {
  margin-top: 1.75rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: rgba(31,78,156,.18);
  border: 1px solid rgba(127,167,201,.28);
}
.legal-highlight p { margin: 0; color: var(--light); }
.legal-actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 2rem;
}


/* CV page */
.nav-desktop a.is-active { color: var(--light); }
.cv-hero-grid {
  display: grid; gap: 2rem; align-items: center;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}
@media (min-width: 900px) {
  .cv-hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3rem; }
}
.cv-hero-photo {
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow), 0 0 50px rgba(31,78,156,.25);
  aspect-ratio: 4/5; max-width: 420px; margin-inline: auto;
  background: var(--navy);
}
.cv-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.cv-video {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  box-shadow: var(--shadow);
}
.cv-video video { width: 100%; display: block; max-height: 520px; background: #000; }
.cv-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 1.5rem; }
.cv-project-grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .cv-project-grid { grid-template-columns: repeat(3, 1fr); } }

.cv-project-grid .project-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--navy);
  padding: 0;
}
.cv-project-grid .project-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, border-color .2s ease;
}
.cv-project-grid .project-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
}
.cv-gallery a {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  display: block;
}
.site-header .brand img { display: block; }
