:root {
  --bg: #0b0c10;
  --surface: #14161e;
  --surface-2: #1c1f2a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f6f8;
  --text-dim: #9aa1b2;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  position: relative;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}

.glow--one {
  width: 560px;
  height: 560px;
  top: -220px;
  left: -160px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.35), transparent 70%);
}

.glow--two {
  width: 480px;
  height: 480px;
  bottom: -200px;
  right: -160px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.22), transparent 70%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-brand:hover img {
  transform: rotate(-6deg) scale(1.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--text);
}

.nav-extra {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.socials {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.social-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  opacity: 0.4;
  cursor: default;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.social-icon--link {
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 0.15s, color 0.15s;
}

.social-icon--link:hover,
.social-icon--link:focus-visible {
  opacity: 1;
  color: var(--accent);
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.page--doc {
  gap: 2rem;
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 3rem;
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 12px 40px var(--accent-soft);
}

.hero h1 {
  margin: 0;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
}

.intro {
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 440px;
}

.hero-cta {
  margin-top: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.hero-cta:hover {
  text-decoration: underline;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.value {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.value-index {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.value h3 {
  margin: 0;
  font-size: 1.05rem;
}

.value p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.55;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 1.25rem;
}

.projects {
  display: flex;
  flex-direction: column;
}

.project-tile-grid {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.project-tile {
  position: relative;
  flex: 0 1 calc(50% - 0.625rem);
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-tile:hover,
.project-tile:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 16px 36px -12px var(--accent-soft);
}

.project-tile-face {
  position: absolute;
  inset: 0;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
}

.project-tile-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.project-tile-face p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.5;
}

.project-link {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}

.project-tile-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-tile:hover .project-tile-reveal,
.project-tile:focus-visible .project-tile-reveal {
  transform: translateY(0);
}

.project-tile-reveal img {
  width: 42%;
  height: 42%;
  object-fit: contain;
  border-radius: 22%;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

/* Sin hover real (tactil): el logo se queda fijo como insignia, sin deslizarse */
@media (hover: none) {
  .project-tile-reveal {
    inset: 0.9rem 0.9rem auto auto;
    width: 3rem;
    height: 3rem;
    background: none;
    transform: none;
    transition: none;
  }

  .project-tile-reveal img {
    width: 100%;
    height: 100%;
    border-radius: 20%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 560px) {
  .project-tile {
    flex-basis: 100%;
  }
}

.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 680px) {
  .nav {
    justify-content: center;
    text-align: center;
  }
  .nav-links {
    justify-content: center;
  }
}

/* Back link, used on blog/article/project detail pages */
.back-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.back-link:hover {
  color: var(--accent);
}

/* Project detail pages */
.project-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.project-hero h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.project-subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.project-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-section h2 {
  margin: 0;
  font-size: 1.1rem;
}

.project-section p,
.project-section li {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-section ul {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-cta--button {
  align-self: center;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.hero-cta--button:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* Blog listing + article pages */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px var(--accent-soft);
}

.article-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.article-meta {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 0 0 0.6rem;
}

.article-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

.article-empty {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.article-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.article-body {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 0.98rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-body p {
  margin: 0;
}
