/* ============ Tokens ============ */
:root {
  --bg: #0f1a2b;
  --bg-alt: #16273e;
  --cream: #f2f6fa;
  --cream-dim: #c7d4e2;
  --coral: #2e8cff;
  --coral-2: #5fb4ff;
  --teal: #4fd6e8;
  --red: #1e5fc4;
  --mauve: #7fa6cf;
  --line: rgba(242, 246, 250, 0.16);

  --font-display: "Fraunces", serif;
  --font-body: "Work Sans", sans-serif;

  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
}

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6%;
  background: rgba(28, 21, 38, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--coral);
}

.nav-logo {
  box-shadow: 0 0 0 2px var(--teal);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  color: var(--cream-dim);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--coral); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  height: 1.5px;
  background: var(--cream);
  width: 100%;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(160deg, #16273e 0%, #0f1a2b 60%);
}

.hero-frame {
  position: absolute;
  inset: 0;
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,26,43,0.95) 0%, rgba(15,26,43,0.15) 55%);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 6% 6% 8%;
  max-width: 720px;
}

.hero-text h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}

.hero-cta {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(100deg, var(--coral), var(--coral-2));
  color: #1c1526;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 6px 22px rgba(255, 90, 60, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 90, 60, 0.45);
}

/* ============ Sections ============ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 6%;
}

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 32px; }

/* ============ Gallery ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background: linear-gradient(135deg, #16273e, #0f1a2b);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: circle(38% at 50% 50%);
  transition: clip-path 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.gallery-item:hover img {
  clip-path: circle(75% at 50% 50%);
}

.gallery-item .cat {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bg);
  background: var(--teal);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .cat { opacity: 1; transform: translateY(0); }

/* ============ Sobre mi ============ */
.section-split {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 60px;
  align-items: center;
}

.split-text h2 { font-size: 32px; margin-bottom: 20px; }

.prose p {
  color: var(--cream-dim);
  margin: 0 0 14px;
  max-width: 46ch;
}

.sobre-mi-logo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--coral), 0 12px 40px rgba(255,90,60,0.25);
}

/* ============ Blog ============ */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.blog-entry {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
}

.blog-entry time {
  color: var(--teal);
  font-weight: 600;
  font-size: 13px;
}

.blog-entry h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.blog-entry p {
  color: var(--cream-dim);
  margin: 0;
}

/* ============ Contacto ============ */
.section-contacto { text-align: center; }
.section-contacto h2 { font-size: 32px; margin-bottom: 32px; }

.contacto-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.contacto-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--cream);
  padding: 10px 22px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contacto-links a:hover {
  background: var(--coral);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ============ Footer ============ */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 6% 60px;
  border-top: 1px solid var(--line);
  color: var(--cream-dim);
  font-size: 13px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.8;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.94);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5%;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 5%;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 20px 6%;
    gap: 18px;
    border-bottom: 1px solid var(--line);
  }
  .section-split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .blog-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-item img { transition: none; }
}
