/* ---------- Daniel Rojas — Landing ---------- */

:root {
  --bg: #0a1629;
  --bg-2: #0d1d38;
  --fg: #ffffff;
  --fg-dim: rgba(255, 255, 255, 0.62);
  --fg-faint: rgba(255, 255, 255, 0.34);
  --rule: rgba(255, 255, 255, 0.12);
  --accent: #ffb86b;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;

  --maxw: 1400px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

@media (min-width: 900px) {
  body { overflow: hidden; }
}

a { color: inherit; text-decoration: none; }

/* ---------- Blobs (creative background layer) ---------- */

.blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  will-change: transform;
}

.blob--a {
  width: 54vmax;
  height: 54vmax;
  top: -22vmax;
  right: -14vmax;
  background: radial-gradient(circle at 40% 40%, #ff8a3d 0%, rgba(255, 138, 61, 0) 70%);
  opacity: 0.72;
  animation: floatA 22s ease-in-out infinite;
}

.blob--b {
  width: 48vmax;
  height: 48vmax;
  bottom: -20vmax;
  left: -14vmax;
  background: radial-gradient(circle at 50% 50%, #6e4bff 0%, rgba(110, 75, 255, 0) 70%);
  opacity: 0.62;
  animation: floatB 26s ease-in-out infinite;
}

.blob--c {
  width: 40vmax;
  height: 40vmax;
  top: 35%;
  left: 38%;
  background: radial-gradient(circle at 50% 50%, #ff4d8a 0%, rgba(255, 77, 138, 0) 70%);
  opacity: 0.42;
  animation: floatC 30s ease-in-out infinite;
}

.blob--d {
  width: 36vmax;
  height: 36vmax;
  top: 58%;
  right: 28%;
  background: radial-gradient(circle at 50% 50%, #3ec9c9 0%, rgba(62, 201, 201, 0) 70%);
  opacity: 0.38;
  animation: floatD 34s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-6vmax, 4vmax) scale(1.08); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(5vmax, -3vmax) scale(0.95); }
}
@keyframes floatC {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-4vmax, -5vmax) scale(1.1); }
}
@keyframes floatD {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(3vmax, 4vmax) scale(0.92); }
}

/* ---------- Grain ---------- */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.75 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grainShift 8s steps(6) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -2%); }
  60%  { transform: translate(-2%, -3%); }
  80%  { transform: translate(2%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Top bar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(20px, 2.6vw, 32px) var(--gutter);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.topbar .loc { color: var(--fg-dim); }

/* ---------- Stage ---------- */

.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 40px) var(--gutter);
  display: grid;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

@media (min-width: 900px) {
  .stage {
    grid-template-columns: 1.2fr 1fr;
    align-content: center;
  }
}

@media (max-width: 899px) {
  .stage {
    justify-items: center;
    text-align: center;
  }
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
}

.name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--fg);
  font-variation-settings: "opsz" 64;
}

.name__word {
  display: inline-block;
  transform-origin: left bottom;
}
.name__word + .name__word { margin-left: 0.25em; }

.role-sub {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.8vw, 36px);
  max-width: 420px;
  width: 100%;
  justify-self: end;
}

@media (max-width: 899px) {
  .contact {
    justify-self: center;
    align-items: center;
  }
  .card { align-items: center; }
  .card__email { align-self: center; }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card__org {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.card__person {
  margin: 0 0 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--fg);
}

.card__role {
  font-weight: 400;
  color: var(--fg-dim);
}

.card__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--fg);
  align-self: flex-start;
  transition: color 0.3s var(--ease);
}

.card__email-label {
  position: relative;
  background-image: linear-gradient(var(--fg-faint), var(--fg-faint));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 3px;
  transition: background-size 0.5s var(--ease),
              color 0.3s var(--ease),
              background-image 0.3s var(--ease);
}

.card__arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease), color 0.3s var(--ease);
  color: var(--fg-dim);
}

.card__email:hover .card__email-label,
.card__email:focus-visible .card__email-label {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
}

.card__email:hover .card__arrow,
.card__email:focus-visible .card__arrow {
  transform: translateX(6px);
  color: var(--accent);
}

/* ---------- Footer ---------- */

.footbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 2.4vw, 28px) var(--gutter) clamp(22px, 2.4vw, 32px);
  border-top: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.social__icon { width: 16px; height: 16px; display: block; }

.social__label {
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 400;
}

.social__sep {
  width: 1px;
  height: 14px;
  background: var(--rule);
}

.social__link:hover,
.social__link:focus-visible { color: var(--accent); }

.colophon { margin: 0; color: var(--fg-faint); }

@media (max-width: 520px) {
  .topbar { justify-content: center; }
  .footbar {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
  }
}

/* ---------- Reveal animations ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 1.1s var(--ease) forwards;
}

[data-reveal="1"] { animation-delay: 0.15s; }
[data-reveal="2"] { animation-delay: 0.30s; }
[data-reveal="3"] { animation-delay: 0.50s; }
[data-reveal="4"] { animation-delay: 0.68s; }
[data-reveal="5"] { animation-delay: 0.82s; }
[data-reveal="6"] { animation-delay: 1.00s; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .grain, .blob { animation: none; }
}
