/* =========================================================
   Portfolio de Marouan Sanhaji
   Estilo: oscuro luminoso + cristal (glass). Azul y gris.
   Tokens en DESIGN.md.
   ========================================================= */

:root,
[data-theme="dark"] {
  --bg: #060A16;
  --ink: #EAF0FA;
  --muted: #9AA8C2;
  --line: rgba(255, 255, 255, .10);
  --blue: #8FB4FF;              /* texto y enlaces */
  --btn-a: #4F7DFF;             /* botón: arriba */
  --btn-b: #2A55E0;             /* botón: abajo */
  --glow: 91, 140, 255;         /* rgb del brillo */
  --on-blue: #FFFFFF;

  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .02);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-hl: rgba(255, 255, 255, .22);
  --glass-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);

  --surface: #0E1528;           /* interior de apps del móvil */
  --phone-bg: #091022;
  --blue-soft: rgba(91, 140, 255, .16);
  --device: rgba(255, 255, 255, .08);

  --blob-1: #2A55E0;
  --blob-2: #1C8BFF;
  --blob-3: #4B5B7E;
  --blob-op: .55;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 12px;
  --r-md: 22px;
  --r-phone: 48px;
  --wrap: 1160px;
  --section: 128px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #EDF1F8;
  --ink: #0F1B33;
  --muted: #4E5B74;
  --line: rgba(15, 27, 51, .10);
  --blue: #2A55E0;
  --glow: 64, 110, 255;

  --glass: rgba(255, 255, 255, .55);
  --glass-2: rgba(255, 255, 255, .30);
  --glass-border: rgba(255, 255, 255, .85);
  --glass-hl: rgba(255, 255, 255, 1);
  --glass-shadow: 0 24px 60px -28px rgba(30, 50, 100, .35);

  --surface: #FFFFFF;
  --phone-bg: #E9EFFA;
  --blue-soft: #E1E9FC;
  --device: rgba(255, 255, 255, .5);

  --blob-1: #7EA2FF;
  --blob-2: #9CCBFF;
  --blob-3: #B9C3D6;
  --blob-op: .7;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.logo, svg.wallpaper-logo { stroke: none; fill: currentColor; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--btn-b); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
}
.skip:focus { top: 16px; }

/* ---------- Fondo luminoso ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora::after {
  /* rejilla muy sutil que se desvanece */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 10%, transparent 75%);
  opacity: .5;
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-op); will-change: transform; }
.b1 { width: 620px; height: 620px; background: var(--blob-1); top: -220px; right: -120px; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 480px; height: 480px; background: var(--blob-2); top: 38%; left: -200px; opacity: calc(var(--blob-op) * .6); animation: drift2 32s ease-in-out infinite alternate; }
.b3 { width: 560px; height: 560px; background: var(--blob-3); bottom: -260px; right: 10%; opacity: calc(var(--blob-op) * .7); animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(-120px, 90px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(140px, -70px) scale(.9); } }

/* ---------- Cristal ---------- */
.glass {
  position: relative;
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hl), var(--glass-shadow);
  isolation: isolate;
}
/* luz que sigue al cursor */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(var(--glow), .16), transparent 60%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.glass:hover::before { opacity: 1; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 700; font-size: 16px; cursor: pointer;
  transition: box-shadow .2s, transform .2s, background-color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px -8px rgba(var(--glow), .75);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 40px -8px rgba(var(--glow), .95); }
.btn--ghost {
  color: var(--ink);
  background: var(--glass); border-color: var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--glass-hl);
}
.btn--ghost:hover { border-color: rgba(var(--glow), .6); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 15px; }

.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--blue); font-weight: 700; font-size: 15px;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid var(--glass-border); background: var(--glass);
  cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: rgba(var(--glow), .6); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* ---------- Navegación flotante ---------- */
.nav { position: sticky; top: 14px; z-index: 50; padding-top: 14px; }
.nav__inner {
  display: flex; align-items: center; gap: 32px;
  height: 64px; padding: 0 12px 0 16px; border-radius: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(160deg, var(--btn-a), var(--btn-b));
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 24px -4px rgba(var(--glow), .7);
}
.brand__mark .logo { width: 30px; height: 24px; filter: drop-shadow(0 0 6px rgba(160, 195, 255, .8)); }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav__links a:hover, .nav__links a.is-current { color: var(--ink); text-decoration: none; background: var(--glass); }
.nav__actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Portada ---------- */
.hero { padding: 72px 0 104px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; margin-bottom: 28px;
}
.status__dot {
  width: 8px; height: 8px; border-radius: 50%; background: #7FD0FF;
  box-shadow: 0 0 10px 2px rgba(127, 208, 255, .9);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 2px 0 rgba(127, 208, 255, .4); } }
.hero__title {
  font-size: clamp(44px, 6.6vw, 86px);
  font-weight: 800; letter-spacing: -0.045em; line-height: 0.98;
  max-width: 12.5ch; text-wrap: balance;
  text-shadow: 0 0 48px rgba(var(--glow), .35);
}
[data-theme="light"] .hero__title { text-shadow: none; }
.hero__lead { margin-top: 28px; font-size: 19px; color: var(--muted); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__hint { display: flex; align-items: center; gap: 8px; margin-top: 40px; color: var(--muted); font-size: 15px; }
.hero__hint svg { color: var(--blue); }

/* ---------- Móvil de cristal ---------- */
.hero__device { display: flex; justify-content: center; position: relative; }
.hero__device::before {
  /* halo detrás del móvil */
  content: ""; position: absolute; width: 380px; height: 380px; top: 50%; left: 50%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow), .55), transparent 65%);
  filter: blur(30px); z-index: -1;
}
.phone {
  width: 320px; height: 652px; padding: 10px; border-radius: var(--r-phone);
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.04) 40%, rgba(255,255,255,.12));
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 70px -20px rgba(var(--glow), .6);
  position: relative;
  transform: rotate(2deg);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
[data-theme="light"] .phone { background: linear-gradient(160deg, #fff, rgba(255,255,255,.5)); box-shadow: inset 0 1px 0 #fff, 0 40px 80px -30px rgba(30,50,100,.45), 0 0 60px -20px rgba(var(--glow), .5); }
.phone:hover, .phone:focus-within { transform: rotate(0deg); }
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--phone-bg); color: var(--ink); }
.phone__bar {
  position: absolute; inset: 0 0 auto 0; z-index: 5; height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 0 28px; font-size: 14px; font-weight: 700;
}
.phone__notch { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #02040A; }
.phone__icons { display: flex; gap: 4px; }
.phone__icons svg { width: 16px; height: 16px; stroke-width: 1.5; }
.phone__home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 112px; height: 5px; border-radius: 4px; background: var(--ink); opacity: .55; z-index: 6; }

.screen { position: absolute; inset: 0; padding: 56px 18px 28px; transition: transform .42s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.screen--home {
  display: flex; flex-direction: column; overflow: hidden;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(var(--glow), .45), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(28, 139, 255, .35), transparent 60%),
    var(--phone-bg);
}
.wallpaper-logo {
  position: absolute; width: 260px; height: 205px; right: -40px; bottom: 120px;
  color: rgba(var(--glow), .28); z-index: 0;
  filter: drop-shadow(0 0 18px rgba(var(--glow), .5));
}
.screen--home > *:not(.wallpaper-logo) { position: relative; z-index: 1; }
.screen--app { background: var(--surface); transform: translateY(102%); overflow-y: auto; scrollbar-width: none; visibility: hidden; }
.screen--app::-webkit-scrollbar { display: none; }
.phone.is-open .screen--app { transform: translateY(0); visibility: visible; }
.phone.is-open .screen--home { transform: scale(.92); opacity: .4; }

.home__date { font-size: 13px; color: var(--muted); font-weight: 500; padding: 0 6px; }
.home__title { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; padding: 0 6px; margin-top: 2px; }

.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 8px; margin-top: 28px; }
.app-icon {
  width: 100%; background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--ink);
}
.app-icon__tile {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -8px rgba(var(--glow), .8);
  transition: transform .18s, box-shadow .18s;
}
.app-icon__tile svg { width: 28px; height: 28px; stroke-width: 1.8; }
.app-icon:hover .app-icon__tile { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 12px 26px -6px rgba(var(--glow), 1); }
.app-icon:active .app-icon__tile { transform: scale(.94); }
.app-icon:focus-visible { outline: none; }
.app-icon:focus-visible .app-icon__tile { outline: 2px solid var(--blue); outline-offset: 3px; }
.tile--a { background: linear-gradient(160deg, #5B8CFF, #2A55E0); color: #fff; }
.tile--b { background: linear-gradient(160deg, #3FB4FF, #0E6FC4); color: #fff; }
.tile--c { background: linear-gradient(160deg, #4A5A7A, #283550); color: #fff; }
.tile--d { background: linear-gradient(160deg, rgba(255,255,255,.35), rgba(255,255,255,.08)); color: #fff; backdrop-filter: blur(10px); }
.tile--e { background: linear-gradient(160deg, #7887A3, #4B5A75); color: #fff; }
.tile--f { background: linear-gradient(160deg, #3A62D8, #1E3A9A); color: #fff; }
[data-theme="light"] .tile--d { background: linear-gradient(160deg, #fff, #E6ECF8); color: var(--btn-b); }

.widget {
  margin-top: 24px; padding: 14px 16px; border-radius: 22px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
[data-theme="light"] .widget { background: rgba(255, 255, 255, .6); border-color: #fff; }
.widget__label { font-size: 12px; color: var(--muted); font-weight: 500; }
.widget__main { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.widget__bar { display: flex; gap: 4px; margin-top: 10px; }
.widget__bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.widget__bar span.on { background: linear-gradient(90deg, #5B8CFF, #7FD0FF); box-shadow: 0 0 8px rgba(var(--glow), .8); }
.widget__sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

.dock {
  margin-top: auto; margin-bottom: 4px; display: flex; justify-content: space-around;
  padding: 12px; border-radius: 28px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
[data-theme="light"] .dock { background: rgba(255, 255, 255, .5); border-color: #fff; }
.dock__app { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--ink); }
.dock__app:hover { text-decoration: none; color: var(--blue); }
.dock__app svg { width: 24px; height: 24px; }

.app__back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; cursor: pointer; padding: 4px 0; color: var(--blue); font-weight: 700; font-size: 15px; }
.app__back svg { width: 18px; height: 18px; stroke-width: 2.2; }
.app__body { margin-top: 10px; }
.app__title { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.app__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.app__desc { font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 16px; }
.app__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.app__chips li { font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 8px; background: var(--blue-soft); }
.app__link { display: flex; margin-top: 16px; width: 100%; height: 44px; font-size: 15px; }

/* Mini interfaces */
.mini { margin-top: 18px; border-radius: 16px; background: var(--phone-bg); padding: 14px; font-size: 13px; }
.mini__label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.task { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--surface); border: 0; border-radius: 12px; padding: 10px 12px; margin-top: 6px; cursor: pointer; text-align: left; font-size: 13px; }
.task__box { width: 20px; height: 20px; border-radius: 6px; flex: none; border: 1.75px solid var(--muted); display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.task__box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; }
.task[aria-pressed="true"] .task__box { background: var(--btn-a); border-color: var(--btn-a); box-shadow: 0 0 10px rgba(var(--glow), .8); }
.task[aria-pressed="true"] .task__box svg { opacity: 1; }
.task[aria-pressed="true"] .task__text { text-decoration: line-through; color: var(--muted); }
.task__subject { display: block; font-size: 11px; color: var(--muted); }
.progress { height: 6px; border-radius: 4px; background: var(--line); margin-top: 12px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #5B8CFF, #7FD0FF); border-radius: 4px; transition: width .3s; }

.pool { border-radius: 14px; padding: 18px 14px; color: #fff; background: radial-gradient(120% 60% at 20% 110%, rgba(255,255,255,.28), transparent 60%), linear-gradient(160deg, #0E7BC4, #0B3A8C); }
.pool strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.pool span { font-size: 12px; opacity: .85; }
.pool button { margin-top: 12px; border: 0; border-radius: 10px; padding: 8px 12px; background: #fff; color: #0B3A8C; font-weight: 700; font-size: 13px; cursor: pointer; }
.svc { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }

.account { background: linear-gradient(160deg, var(--btn-a), var(--btn-b)); color: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 10px 24px -10px rgba(var(--glow), .9); }
.account span { font-size: 12px; opacity: .85; }
.account strong { display: block; font-size: 26px; letter-spacing: -0.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.account__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.account__actions button { border: 0; border-radius: 10px; padding: 10px; cursor: pointer; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13px; }
.account__actions button:hover { color: var(--blue); }
.mov { display: flex; justify-content: space-between; padding: 7px 2px; font-variant-numeric: tabular-nums; }
.mov--in b { color: var(--blue); }

.film { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.film:last-child { border-bottom: 0; }
.film__poster { width: 34px; height: 46px; border-radius: 6px; flex: none; }
.film b { display: block; font-size: 13px; }
.film small { color: var(--muted); font-size: 11px; }
.filters { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--btn-a); border-color: var(--btn-a); color: #fff; }

.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.55; background: #050914; color: #D7E2F5; border-radius: 12px; padding: 12px; white-space: pre; overflow-x: auto; border: 1px solid rgba(255,255,255,.08); }
.code .k { color: #8FB3FF; }
.code .s { color: #B9C6DC; }
.code .n { color: #7FD0FF; }
.sqlt { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; background: var(--surface); border-radius: 10px; overflow: hidden; }
.sqlt th, .sqlt td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.sqlt th { color: var(--muted); font-weight: 500; }
.sqlt tr:last-child td { border-bottom: 0; }
.run { margin-top: 10px; width: 100%; border: 0; border-radius: 10px; padding: 9px; background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: end; margin-bottom: 56px; }
.section__head h2, .about__text h2, .contact h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 800; letter-spacing: -0.035em; }
.section__head p { color: var(--muted); max-width: 52ch; }

/* Proyectos destacados */
.featured { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.feature { display: flex; flex-direction: column; gap: 18px; padding: 32px; border-radius: var(--r-md); }
.feature.feature--main {
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(var(--glow), .40), transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(28, 139, 255, .22), transparent 60%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  border-color: rgba(var(--glow), .45);
  box-shadow: inset 0 1px 0 var(--glass-hl), 0 0 60px -20px rgba(var(--glow), .7), var(--glass-shadow);
}
.feature__top { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.feature h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.035em; }
.feature p { color: var(--muted); max-width: 58ch; }
.feature__links { display: flex; align-items: center; gap: 20px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.tag { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--ink); border: 1px solid rgba(var(--glow), .25); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { font-size: 14px; font-weight: 500; padding: 4px 11px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass-2); }
.stack--quiet li { font-size: 13px; padding: 2px 9px; color: var(--muted); }

.subhead { font-size: 22px; font-weight: 700; margin: 72px 0 16px; }
.rows { border-radius: var(--r-md); padding: 0 28px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row h4 { font-size: 19px; font-weight: 700; }
.row p { color: var(--muted); font-size: 16px; margin-top: 4px; max-width: 60ch; }
.row .link-btn { justify-self: end; }

/* Sobre mí */
.about { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px 64px; }
.about__photo { aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__mono {
  display: none; position: absolute; inset: 0; place-items: center;
  color: var(--ink);
  background: radial-gradient(circle at 50% 45%, rgba(var(--glow), .45), transparent 65%);
}
.about__mono .logo { width: 72%; height: auto; filter: drop-shadow(0 0 16px rgba(var(--glow), .9)); }
[data-theme="light"] .about__mono .logo { color: var(--btn-b); filter: drop-shadow(0 0 14px rgba(var(--glow), .5)); }
.about__photo.no-photo .about__mono { display: grid; }
.about__text { display: flex; flex-direction: column; gap: 18px; max-width: 64ch; }
.about__text h2 { margin-bottom: 6px; }
.about__text p { color: var(--muted); font-size: 18px; }
.langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 0; }
.langs div { padding: 14px 16px; border-radius: var(--r-sm); background: var(--glass); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hl); }
.langs dt { font-size: 14px; color: var(--muted); }
.langs dd { margin: 0; font-size: 20px; font-weight: 700; }

.skills { grid-column: 1 / -1; margin-top: 32px; padding: 32px; border-radius: var(--r-md); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 24px; }
.skills h3 { grid-column: 1 / -1; font-size: 22px; font-weight: 700; }
.skills__group h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.skills__group ul { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.learning { font-size: 13px; font-weight: 500; color: var(--blue); letter-spacing: 0; }

/* Trayectoria */
.tl { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
.tl__date { font-weight: 700; color: var(--muted); padding-top: 22px; font-variant-numeric: tabular-nums; }
.tl__body { position: relative; padding: 0 0 20px 40px; border-left: 2px solid var(--line); }
.tl:last-child .tl__body { padding-bottom: 0; }
.tl__body::before {
  content: ""; position: absolute; left: -8px; top: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--blue);
}
.tl:first-child .tl__body::before { background: #7FD0FF; border-color: #7FD0FF; box-shadow: 0 0 14px 3px rgba(127, 208, 255, .8); }
.tl__card { padding: 20px 24px; border-radius: var(--r-md); }
.tl h3 { font-size: 21px; font-weight: 700; }
.tl__where { color: var(--ink); font-weight: 500; margin-top: 4px; }
.tl__card p:not(.tl__where) { color: var(--muted); margin-top: 8px; max-width: 64ch; }

/* Contacto */
.contact__inner {
  padding: 64px; border-radius: 32px; overflow: hidden;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(var(--glow), .45), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(28, 139, 255, .25), transparent 60%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  border-color: rgba(var(--glow), .4);
}
.contact h2 { max-width: 16ch; }
.contact__lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 54ch; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 44px; }
.mail__address {
  font-size: clamp(22px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); overflow-wrap: anywhere;
  border-bottom: 2px solid rgba(var(--glow), .5);
  text-shadow: 0 0 30px rgba(var(--glow), .5);
}
[data-theme="light"] .mail__address { text-shadow: none; }
.mail__address:hover { text-decoration: none; border-bottom-color: var(--blue); }
.copy-msg { min-height: 1.6em; margin-top: 12px; font-weight: 500; color: var(--muted); }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.socials a {
  display: inline-flex; gap: 10px; padding: 12px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--glass-border); background: var(--glass); color: var(--ink); font-weight: 700;
  box-shadow: inset 0 1px 0 var(--glass-hl);
}
.socials a:hover { text-decoration: none; border-color: rgba(var(--glow), .6); }

.footer { padding: 28px 0 40px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 14px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand .logo { width: 32px; height: 25px; color: var(--ink); opacity: .85; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 64px; }
  .featured { grid-template-columns: 1fr; }
  .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --section: 80px; }
  .wrap { padding: 0 16px; }
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .brand__name { display: none; }
  .hero { padding-top: 40px; }
  .phone { width: 300px; height: 612px; transform: none; }
  .section__head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 36px; }
  .feature { padding: 24px; }
  .rows { padding: 0 20px; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .row .link-btn { justify-self: start; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 260px; }
  .langs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px; }
  .tl { grid-template-columns: 1fr; gap: 6px; }
  .tl__date { padding: 0 0 0 42px; }
  .contact__inner { padding: 36px 24px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .blob { filter: blur(70px); }
}

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