/* =========================================================
   Elio Ucán — Portfolio
   Dark editorial / brutalist. Anton display + Inter body.
   ========================================================= */

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #121212;
  --bg-card:   #141414;
  --text:      #f0f0f0;
  --muted:     #8a8a8a;
  --muted-dim: #5c5c5c;
  --line:      #262626;
  --accent:    #3B82F6;
  --accent-soft: rgba(59, 130, 246, 0.20);
  --accent-ink: #ffffff;
  --ease:      200ms ease;
  --maxw:      1180px;
  --pad:       clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #0a0a0a; }

/* =========================================================
   Grain / noise overlay
   ========================================================= */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(2) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -3%); }
  75%  { transform: translate(-2%, -2%); }
  100% { transform: translate(3%, 3%); }
}

/* =========================================================
   Custom cursor
   ========================================================= */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  margin-left: -4px; margin-top: -4px;
  opacity: 0;
}
.has-cursor { cursor: none; }
.has-cursor a, .has-cursor button { cursor: none; }
.has-cursor .cursor-dot,
.has-cursor .cursor-ring { opacity: 1; }
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent);
}
.cursor-ring {
  width: 34px; height: 34px;
  margin-left: -17px; margin-top: -17px;
  border: 1px solid rgba(240,240,240,0.5);
  transition: width var(--ease), height var(--ease), margin var(--ease),
              border-color var(--ease), background var(--ease);
}
.cursor-ring--hover {
  width: 52px; height: 52px;
  margin-left: -26px; margin-top: -26px;
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), backdrop-filter var(--ease);
}
.nav--solid {
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
}
.nav__resume {
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color var(--ease);
}
.nav__resume:hover { color: var(--accent); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem var(--pad) 3rem;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.hero__display { margin: 0; }
.hero__title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  margin: 0;
  line-height: 0.82;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  font-size: clamp(4.5rem, 19vw, 13.5rem);
  position: relative;
  display: inline-block;
}
.hero__badge {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 2vw, 1.6rem);
  letter-spacing: 0.04em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.25em 0.7em;
  border-radius: 999px;
  vertical-align: super;
  position: absolute;
  top: 8%;
  right: -0.2em;
  transform: rotate(4deg);
}
.hero__name {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.9;
  margin: 0.12em 0 0;
  font-size: clamp(2.4rem, 9vw, 6rem);
  color: var(--text);
}
.hero__tagline {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  font-size: clamp(0.72rem, 1.4vw, 0.92rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 48ch;
}
.hero__ctas {
  margin-top: clamp(2rem, 5vw, 3.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* Outlined buttons → orange fill on hover */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border: 1px solid rgba(240,240,240,0.35);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

/* Floating shapes (top-right quadrant) */
.shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.shape {
  position: absolute;
  display: block;
  filter: blur(2px);
  opacity: 0.5;
  will-change: transform;
}
.shape--circle-lg {
  width: 30vw; max-width: 380px; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(59,130,246,0.55), rgba(59,130,246,0) 70%);
  top: -6%; right: -4%;
  filter: blur(30px);
  opacity: 0.8;
  animation: float1 14s ease-in-out infinite;
}
.shape--circle-sm {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(240,240,240,0.25);
  top: 22%; right: 18%;
  filter: blur(0.5px);
  animation: float2 11s ease-in-out infinite;
}
.shape--rect {
  width: 160px; height: 160px;
  border: 2px solid var(--accent-soft);
  background: rgba(59,130,246,0.04);
  top: 12%; right: 30%;
  transform: rotate(18deg);
  animation: float3 16s ease-in-out infinite;
}
.shape--ring {
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px dashed rgba(59,130,246,0.35);
  top: 4%; right: 8%;
  filter: blur(0);
  opacity: 0.35;
  animation: float2 20s ease-in-out infinite reverse;
}
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-3%, 4%); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(4%, -5%) rotate(8deg); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) rotate(18deg); } 50% { transform: translate(-5%, 6%) rotate(26deg); } }

@media (max-width: 720px) {
  .shape--rect, .shape--ring { display: none; }
  .shape--circle-lg { opacity: 0.55; }
}

/* =========================================================
   Stats bar
   ========================================================= */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.stats__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) var(--pad);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num {
  display: block;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  color: var(--accent);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.stat__label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 720px) {
  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 0; }
  .stat { padding: 0 1.25rem; }
  .stat:first-child { padding-left: 0; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* =========================================================
   Sections (shared)
   ========================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--pad) 0;
}
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__label {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Shared tag pill */
.tag {
  display: inline-block;
  padding: 0.32em 0.85em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg-soft);
  transition: border-color var(--ease), color var(--ease);
}

/* =========================================================
   Projects
   ========================================================= */
.projects { border-top: 1px solid var(--line); }
.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(2rem, 4vw, 3rem) clamp(0px, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  transition: background var(--ease);
}
.project::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--ease);
}
.project:hover {
  background: linear-gradient(90deg, rgba(59,130,246,0.06), transparent 60%);
}
.project:hover::before { transform: scaleY(1); }

.project__num {
  font-family: 'Anton', sans-serif;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.8;
  color: var(--text);
  opacity: 0.15;
  transition: opacity var(--ease), color var(--ease);
}
.project:hover .project__num { opacity: 0.3; color: var(--accent); }

.project__body { min-width: 0; }
.project__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.project__tags .tag { border-color: var(--accent-soft); color: var(--accent); }
.project__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 62ch;
}
.pill {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  vertical-align: middle;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  margin-left: 0.5rem;
}

.project__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  text-align: right;
  white-space: nowrap;
}
.project__view {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color var(--ease);
}
.project:hover .project__view { color: var(--accent); }
.project__year {
  font-size: 0.74rem;
  color: var(--muted-dim);
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .project {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-left: 0;
  }
  .project__num { font-size: 3rem; }
  .project__meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* =========================================================
   Skills
   ========================================================= */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4rem);
}
.skill__head {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.skill__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill__tags .tag { color: var(--text); }
.tag:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 900px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .skills { grid-template-columns: 1fr; } }

/* =========================================================
   Certifications & Awards
   ========================================================= */
.certs {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.cert-list { list-style: none; margin: 0; padding: 0; }
.cert {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left var(--ease);
}
.cert:hover { padding-left: 0.4rem; }
.cert:hover .cert__title { color: var(--accent); }
.cert__title { transition: color var(--ease); }
.cert__badge {
  width: 46px;
  height: 46px;
  object-fit: contain;
  justify-self: center;
}
.cert__title { margin: 0; font-weight: 600; font-size: 0.98rem; }
.cert__issuer { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }
.cert__year {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.awards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.award {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.award__trophy { font-size: 2.4rem; display: block; line-height: 1; }
.award__eyebrow {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.award__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}
.award__issuer { margin: 0.6rem 0 1.4rem; color: var(--muted); font-size: 0.9rem; }
.award__badge {
  display: inline-block;
  padding: 0.5em 1em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

@media (max-width: 760px) {
  .certs { grid-template-columns: 1fr; }
}

/* =========================================================
   Education
   ========================================================= */
.edu-list { border-top: 1px solid var(--line); }
.edu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--line);
}
.edu__logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.edu__body { flex: 1 1 220px; min-width: 0; }
.edu__inst { margin: 0; font-size: 1.2rem; font-weight: 700; }
.edu__prog { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9rem; }
.edu__year {
  flex-shrink: 0;
  padding: 0.4em 0.9em;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
@media (max-width: 540px) {
  .edu__logo { width: 48px; height: 48px; }
  .edu__year { margin-left: calc(48px + 1.25rem); }
}

/* =========================================================
   Footer / CTA
   ========================================================= */
.cta {
  margin-top: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.cta__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--pad);
  text-align: center;
}
.cta__title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.01em;
  margin: 0;
  font-size: clamp(3rem, 12vw, 9rem);
}
.cta__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.cta__links a {
  position: relative;
  color: var(--text);
  padding-bottom: 0.2rem;
  transition: color var(--ease);
}
.cta__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}
.cta__links a:hover { color: var(--accent); }
.cta__links a:hover::after { transform: scaleX(1); }
.cta__copy {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted-dim);
}
