
:root {
  --bg: #430170;
  --text: #ffffff;

  /* Light cards (same vibe as index) */
  --card-light: linear-gradient(316deg, #9c89f7 0%, #c8bfe7 74%);
  --card-text: #430170;
  --card-muted: rgba(67, 1, 112, 0.75);

  /* Borders & shadows */
  --border-soft: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 30px rgba(156, 137, 247, 0.35);

  /* Buttons */
  --accent-soft: #debde6;
  --accent-deep: #725ac1;
  
}

body {
  margin: 0;
}

.wrapper {
  width: min(1200px, 84vw);
  margin: 0 auto;
  padding-bottom: 60px;
}

.wrapper .cover {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;

  padding: 22px;
  margin-top: 18px;

  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.wrapper .cover h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.wrapper .cover p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.55;
}

.wrapper .cover .buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

#container3D {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 260px;

  border-radius: 14px;
  overflow: hidden;

  border: 2px solid var(--border-tv);
  background: transparent;

  position: relative;
}

#container3D canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.sceneControls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}
.sceneControls .btn {
  pointer-events: auto;
}

.btn {
  text-align: center;
  background-color: var(--accent-soft);
  color: var(--bg);
  padding: 8px 12px;
  font-weight: 800;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  border: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--accent-deep);
  color: var(--text);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--ghost {
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(222, 189, 230, 0.25);
}

.btn--small {
  padding: 8px 10px;
  font-size: 13px;
}

.section {
  margin-top: 26px;
}

.section h2 {
  margin: 0 0 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  color: var(--card-text);
  padding: 16px;
  border-radius: 22px;

  background: var(--card-light);
  border: 1px solid rgba(67, 1, 112, 0.08);
  box-shadow: var(--shadow);

  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card--wide {
  margin-top: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p,
.card li {
  color: var(--card-muted);
  line-height: 1.5;
}

.card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.project-thumb,
.project-video {
  width: 100%;
  display: block;
  border-radius: 14px;
  overflow: hidden;

  border: 1px solid rgba(67, 1, 112, 0.12);
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.35);
}

.project-thumb {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tags span {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;

  border: 1px solid rgba(67, 1, 112, 0.12);
  background: rgba(255, 255, 255, 0.35);
  color: rgba(67, 1, 112, 0.85);
  font-weight: 700;
}

.links {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 12px;
  border-radius: 10px;

  border: 1px solid rgba(67, 1, 112, 0.12);
  background: rgba(255, 255, 255, 0.35);

  color: rgba(67, 1, 112, 0.9);
  text-decoration: none;
  font-weight: 800;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.links a:hover {
  background: rgba(222, 189, 230, 0.6);
  transform: translateY(-1px);
  text-decoration: none;
}

.muted {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.conway__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.conway__speed {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.conway__speed input[type="range"] {
  width: 130px;
}

.conway__wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;

  background: rgba(101, 71, 130, 0.35);

  border: 1px solid rgba(255, 255, 255, 0.25);

  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.35);
}


#golCanvas {
  display: block;
  width: 100%;
  height: auto;
}

.conway__hint {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;

  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.golOverlay{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:16px;
  z-index:3;

  /* LIGHT glass tint + shine */
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(255,255,255,0.5), transparent 55%),
    radial-gradient(120% 80% at 80% 90%, rgba(222,189,230,0.3), transparent 60%),
    rgba(255,255,255,0.06);

  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);

  opacity:0;
  pointer-events:none;
  transition: opacity 180ms ease;
}

.golOverlay.is-visible{
  opacity:1;
  pointer-events:auto;
}

/* Optional: subtle "frost" edge vignette */
.golOverlay::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.18),
    inset 0 0 40px rgba(255,255,255,0.08);
}

.golOverlay__card{
  position:relative;
  text-align:center;
  padding:14px 16px;
  border-radius:16px;

  /* brighter glass card */
  background:
    linear-gradient(135deg, rgba(255,255,255,0.26), rgba(255,255,255,0.10));
  border: 1px solid rgba(255,255,255,0.28);

  box-shadow:
    0 18px 45px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* small glossy highlight streak */
.golOverlay__card::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:16px;
  pointer-events:none;
  background:
    linear-gradient(120deg,
      transparent 0%,
      rgba(255,255,255,0.18) 20%,
      transparent 40%);
  opacity:0.8;
  mix-blend-mode: screen;
}

.golOverlay__title{
  color: rgba(255,255,255,0.98);
  font-weight: 900;
  letter-spacing: 0.2px;
  text-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.golOverlay__sub{
  margin-top:6px;
  font-size:12px;
  color: rgba(255,255,255,0.82);
}


kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

#contacto {
  display: flex;
  justify-content: center;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  position: relative;
  transition: 180ms ease;
}

.switch__track::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  background: white;
  transition: 180ms ease;
}

.switch input:checked + .switch__track {
  background: rgba(140, 54, 232, 0.55);
  border-color: rgba(140, 54, 232, 0.8);
}

.switch input:checked + .switch__track::after {
  left: 22px;
}

.switch__label {
  font-size: 0.9rem;
  opacity: 0.9;
}


@media (max-width: 900px) {
  .wrapper .cover {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 16px;
    margin-top: 10px;
  }

  .wrapper .cover .buttons {
    justify-content: center;
  }

  .grid,
  .grid--2 {
    grid-template-columns: 1fr;
  }
}
