/* =====================================================================
   Juan Pablo Triana Martinez — portfolio
   Palette taken from the personal banner: deep navy, electric blue, cyan,
   with a violet "nebula" accent for Nebula Data Strategy.
   ===================================================================== */
:root {
  --bg: #040914;
  --bg-2: #07112a;
  --surface: rgba(18, 36, 72, 0.38);
  --surface-2: rgba(22, 44, 88, 0.55);
  --border: rgba(110, 170, 255, 0.14);
  --border-hi: rgba(56, 214, 255, 0.45);
  --text: #e8f1ff;
  --text-2: #a9bbd6;
  --muted: #7489a8;
  --blue: #1e7bff;
  --cyan: #38d6ff;
  --violet: #8b6cff;
  --grad: linear-gradient(100deg, #38d6ff 0%, #1e7bff 55%, #8b6cff 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(56, 214, 255, 0.35), 0 10px 40px -10px rgba(30, 123, 255, 0.55);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
::selection { background: rgba(56, 214, 255, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.ic { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(139, 108, 255, 0.12), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(30, 123, 255, 0.12), transparent 60%),
    linear-gradient(rgba(110, 170, 255, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(110, 170, 255, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
  mask-image: linear-gradient(#000, rgba(0, 0, 0, 0.6));
}
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%;
  transform: scaleX(0); background: var(--grad); box-shadow: 0 0 12px rgba(56, 214, 255, 0.8);
}

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em; padding: 0.8em 1.3em; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; white-space: nowrap; position: relative; isolation: isolate;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn-sm { padding: 0.55em 1em; font-size: 0.86rem; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px -8px rgba(30, 123, 255, 0.8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -8px rgba(56, 214, 255, 0.9); }
.btn-ghost { border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--border-hi); background: rgba(56, 214, 255, 0.08); transform: translateY(-2px); }
.btn .ic { transition: transform 0.25s var(--ease); }
.btn:hover .ic { transform: translateX(2px); }
.btn-mark { width: 22px; height: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.84rem;
  color: var(--text-2); background: rgba(56, 214, 255, 0.06); border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-hi); }
.chip.sm { font-size: 0.76rem; padding: 3px 10px; }
.chip-icon { color: var(--text); font-weight: 500; }
.chip-icon .ic { color: var(--cyan); }

.ic-box {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none; color: var(--cyan);
  background: linear-gradient(145deg, rgba(56, 214, 255, 0.16), rgba(30, 123, 255, 0.06)); border: 1px solid rgba(56, 214, 255, 0.25);
}
.ic-box .ic { width: 22px; height: 22px; }
.ic-box.sm { width: 38px; height: 38px; border-radius: 11px; }
.ic-box.sm .ic { width: 18px; height: 18px; }
.grad-box { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 24px -8px rgba(30, 123, 255, 0.8); }

/* ---------- cards with cursor spotlight ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.card h4 { font-size: 1.12rem; margin: 16px 0 8px; }
.card p { color: var(--text-2); font-size: 0.95rem; }
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 214, 255, 0.12), transparent 45%);
}
.spot > * { position: relative; z-index: 1; }
.spot:hover::before { opacity: 1; }
.spot:hover { border-color: rgba(56, 214, 255, 0.35); transform: translateY(-4px); box-shadow: var(--shadow); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(4, 9, 20, 0.72); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-color: var(--border); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.brand-mono {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 0.95rem; letter-spacing: 0.02em;
  background: var(--grad); color: #fff; box-shadow: 0 6px 20px -6px rgba(56, 214, 255, 0.8);
}
.brand-name { font-size: 1rem; color: var(--text-2); }
.brand-name b { color: var(--text); font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 999px; font-size: 0.9rem; color: var(--text-2); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: rgba(56, 214, 255, 0.1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 88px; height: 36px; padding: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
}
.lang-opt { position: relative; z-index: 1; display: grid; place-items: center; color: var(--muted); transition: color 0.3s; }
.lang-opt.on { color: #fff; }
.lang-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--grad); transition: transform 0.4s var(--ease); box-shadow: 0 4px 14px -4px rgba(56, 214, 255, 0.9); }
.lang-toggle[data-active="es"] .lang-thumb { transform: translateX(100%); }
.lang-toggle:hover { border-color: var(--border-hi); }

.menu-btn { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-btn span:nth-child(1) { top: 13px; } .menu-btn span:nth-child(2) { top: 19px; } .menu-btn span:nth-child(3) { top: 25px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 120px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(600px 400px at 75% 45%, rgba(30, 123, 255, 0.22), transparent 70%),
  radial-gradient(500px 360px at 20% 20%, rgba(139, 108, 255, 0.12), transparent 70%); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; font-size: 0.85rem;
  color: var(--text-2); background: rgba(56, 214, 255, 0.07); border: 1px solid rgba(56, 214, 255, 0.25);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #34f5a4; box-shadow: 0 0 0 0 rgba(52, 245, 164, 0.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(52, 245, 164, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 245, 164, 0); } }
.hero-hi { margin-top: 26px; font-family: var(--mono); color: var(--cyan); font-size: 0.95rem; letter-spacing: 0.04em; }
.hero-name { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 700; margin-top: 6px; letter-spacing: -0.03em; line-height: 1.02; }
.hero-name .grad { display: inline-block; }
.hero-role { margin-top: 18px; font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.7rem); color: var(--text-2); min-height: 1.5em; }
.typed { color: var(--text); font-weight: 600; }
.caret { display: inline-block; width: 3px; height: 1.05em; margin-left: 4px; vertical-align: -0.15em; background: var(--cyan); animation: blink 1s steps(1) infinite; box-shadow: 0 0 10px var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }
.hero-tagline { margin-top: 22px; max-width: 600px; color: var(--text-2); font-size: 1.08rem; }
.hero-tagline em { font-style: normal; color: var(--cyan); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-social { display: flex; gap: 10px; margin-top: 28px; }
.hero-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); color: var(--text-2); transition: all 0.25s var(--ease); }
.hero-social a:hover { color: #fff; border-color: var(--border-hi); background: rgba(56, 214, 255, 0.1); transform: translateY(-3px); }
.hero-social .ic { width: 19px; height: 19px; }

.hero-visual { position: relative; justify-self: center; width: min(420px, 100%); aspect-ratio: 4 / 5; transform: translate(var(--px, 0), var(--py, 0)); transition: transform 0.6s var(--ease), opacity 0.8s var(--ease); }
.portrait { position: absolute; inset: 0; border-radius: 32px; }
.portrait img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 30px; z-index: 1; filter: saturate(1.05) contrast(1.03); }
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: 30px; z-index: 2; background: linear-gradient(180deg, transparent 55%, rgba(4, 9, 20, 0.6)); }
.portrait-ring { position: absolute; inset: -3px; border-radius: 33px; z-index: 0; background: conic-gradient(from var(--a, 0deg), #38d6ff, #1e7bff, #8b6cff, transparent 60%, #38d6ff); animation: spin-a 6s linear infinite; filter: blur(0.5px); }
.portrait-ring::after { content: ""; position: absolute; inset: -30px; border-radius: 60px; background: inherit; filter: blur(40px); opacity: 0.45; z-index: -1; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-a { to { --a: 360deg; } }
.orbit { position: absolute; border: 1px dashed rgba(56, 214, 255, 0.18); border-radius: 50%; pointer-events: none; animation: spin 26s linear infinite; }
.orbit-1 { inset: -9% -16%; }
.orbit-2 { inset: 4% -26%; animation-duration: 38s; animation-direction: reverse; }
.orbit-3 { inset: -18% -6%; animation-duration: 48s; }
.chip-float {
  position: absolute; top: 50%; left: -2%; padding: 6px 12px; border-radius: 999px; font-family: var(--mono); font-size: 0.75rem; white-space: nowrap;
  background: rgba(7, 17, 42, 0.85); border: 1px solid rgba(56, 214, 255, 0.4); color: var(--cyan); box-shadow: 0 0 20px -4px rgba(56, 214, 255, 0.6);
  animation: spin 26s linear infinite reverse;
}
.orbit-2 .chip-float { left: auto; right: -2%; top: 30%; animation-duration: 38s; animation-direction: normal; color: #ffb454; border-color: rgba(255, 180, 84, 0.4); box-shadow: 0 0 20px -4px rgba(255, 180, 84, 0.5); }
.orbit-3 .chip-float { top: -1%; left: 45%; animation-duration: 48s; color: #b9a7ff; border-color: rgba(139, 108, 255, 0.5); box-shadow: 0 0 20px -4px rgba(139, 108, 255, 0.6); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-card {
  position: absolute; z-index: 3; left: -34px; bottom: 34px; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px;
  border-radius: 16px; background: rgba(7, 17, 42, 0.82); border: 1px solid rgba(56, 214, 255, 0.3); backdrop-filter: blur(12px);
  box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.hero-card img { width: 44px; height: 44px; }
.hero-card b { display: block; font-family: var(--display); font-size: 0.95rem; }
.hero-card span { font-size: 0.8rem; color: var(--cyan); }
@keyframes float { 50% { transform: translateY(-10px); } }

.ecg { position: absolute; left: 0; right: 0; bottom: 64px; width: 100%; height: 90px; opacity: 0.55; pointer-events: none; }
.ecg-path { fill: none; stroke: url(#ecgGrad); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(56, 214, 255, 0.8));
  stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: ecg 5.5s linear infinite; }
@keyframes ecg { 0% { stroke-dashoffset: 2600; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -2600; } }
.scroll-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.scroll-hint i { width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid var(--muted); position: relative; }
.scroll-hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- stats ---------- */
.stats { position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: rgba(7, 17, 42, 0.7); backdrop-filter: blur(14px); overflow: hidden; }
.stat { padding: 28px 24px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
.stat b { display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat span { font-size: 0.88rem; color: var(--text-2); }

/* ---------- sections ---------- */
.section { position: relative; padding: 104px 0; }
.section h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; max-width: 860px; }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 16px; }
.kicker span:first-child { padding: 3px 8px; border-radius: 6px; background: rgba(56, 214, 255, 0.12); border: 1px solid rgba(56, 214, 255, 0.3); letter-spacing: 0.05em; }
.section-sub { margin-top: 14px; color: var(--text-2); max-width: 680px; }
.sub-title { font-size: 1.3rem; margin: 56px 0 22px; display: flex; align-items: center; gap: 12px; }
.sub-title::before { content: ""; width: 5px; height: 22px; border-radius: 4px; background: var(--grad); }
.lead { font-size: 1.1rem; color: var(--text-2); }
.lead strong { color: var(--text); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 72px; align-items: center; }
.about-media { position: relative; padding-bottom: 60px; }
.frame { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(4, 9, 20, 0.7)); }
.frame img { width: 100%; aspect-ratio: 939 / 619; object-fit: cover; transition: transform 1.2s var(--ease); }
.about-media:hover .frame img { transform: scale(1.04); }
.about-headshot { position: absolute; right: -20px; bottom: 0; width: 42%; border-radius: 22px; border: 3px solid var(--bg); box-shadow: 0 0 0 1px rgba(56, 214, 255, 0.45), var(--shadow); animation: float 7s ease-in-out infinite; }
.about-text h2 { margin-bottom: 26px; }
.about-text > p:not(.kicker) { color: var(--text-2); margin-bottom: 16px; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-facts { display: grid; gap: 18px; margin: 30px 0 28px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.about-facts small { display: block; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.about-facts p { color: var(--text); }
.about-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- nebula ---------- */
.nebula-clouds { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(700px 420px at 80% 20%, rgba(139, 108, 255, 0.18), transparent 70%),
  radial-gradient(600px 400px at 10% 80%, rgba(30, 123, 255, 0.16), transparent 70%); }
.nebula-panel {
  position: relative; padding: 56px; border-radius: 30px; background: linear-gradient(160deg, rgba(12, 26, 60, 0.75), rgba(6, 12, 30, 0.75));
  border: 1px solid transparent; background-clip: padding-box; isolation: isolate; overflow: hidden;
}
.nebula-panel::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; z-index: -1;
  background: linear-gradient(135deg, rgba(56, 214, 255, 0.6), rgba(30, 123, 255, 0.1) 40%, rgba(139, 108, 255, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.nebula-panel::after { content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0.6; pointer-events: none;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, #cfe9ff, transparent), radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 10% 70%, #fff, transparent), radial-gradient(1.2px 1.2px at 55% 45%, #b9a7ff, transparent),
    radial-gradient(1px 1px at 92% 90%, #fff, transparent), radial-gradient(1px 1px at 30% 10%, #fff, transparent); }
.nebula-head { display: grid; grid-template-columns: 200px 1fr; gap: 44px; align-items: center; }
.nebula-logo { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 214, 255, 0.18), transparent 70%); }
.nebula-mark { width: 100%; }
.spin-slow { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05) rotate(-3deg); filter: drop-shadow(0 0 30px rgba(56, 214, 255, 0.5)); } }
.nebula h2 { margin: 4px 0 8px; }
.nebula-role { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-weight: 600; margin-bottom: 16px; }
.nebula .grid-4 .card h4 { font-size: 1.04rem; }
.nebula .grid-4 .card p { font-size: 0.9rem; }
.industry-head { display: flex; align-items: center; gap: 14px; }
.industry-head h4 { margin: 0; font-size: 1.2rem; }
.industry p { margin-top: 14px; }
.nebula-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--border); }
.nebula-bilingual { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-2); }
.nebula-bilingual .ic { color: var(--cyan); }

/* ---------- expertise & skills ---------- */
.expertise { margin-top: 48px; }
.skills-wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
.hard-skills { display: grid; gap: 22px; }
.skill-group h5 { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; }
.soft-skills { display: grid; gap: 14px; }
.soft { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); transition: border-color 0.3s, transform 0.3s var(--ease); }
.soft:hover { border-color: rgba(56, 214, 255, 0.35); transform: translateX(4px); }
.soft h5 { font-size: 1rem; margin-bottom: 3px; }
.soft p { font-size: 0.88rem; color: var(--text-2); }
.marquee-wrap { margin-top: 90px; }
.marquee-title { text-align: center; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--cyan); margin-bottom: 22px; }
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: rgba(7, 17, 42, 0.5); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 14px; padding: 22px 34px; font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.mq-item i { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--grad); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 56px 0 0; padding: 0 0 0 40px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cyan), var(--blue) 50%, rgba(139, 108, 255, 0.2)); }
.tl-item { position: relative; margin-bottom: 22px; }
.tl-dot { position: absolute; left: -36px; top: 30px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue); }
.is-current .tl-dot { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 6px rgba(56, 214, 255, 0.15), 0 0 18px var(--cyan); }
.tl-card header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.tl-card h4 { margin: 0 0 4px; font-size: 1.18rem; }
.tl-org { font-weight: 600; color: var(--cyan) !important; font-size: 0.95rem !important; }
.tl-org span { color: var(--muted); font-weight: 400; }
.tl-date { flex: none; font-family: var(--mono); font-size: 0.8rem; color: var(--text-2); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); }
.tl-date b { color: #34f5a4; font-weight: 500; }
.tl-card ul { margin: 16px 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.tl-card li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 0.95rem; }
.tl-card li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--blue); }

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 32px; }
.filter { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.88rem; color: var(--text-2); background: rgba(255, 255, 255, 0.02); transition: all 0.25s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--border-hi); }
.filter.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 20px -6px rgba(30, 123, 255, 0.8); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project { padding: 0; display: flex; flex-direction: column; }
.project.hide { display: none; }
.project.pop { animation: pop 0.5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.project-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #f4f7fb; border-bottom: 1px solid var(--border); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.8s var(--ease); }
.project:hover .project-cover img { transform: scale(1.06); }
.cover-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(139, 108, 255, 0.45), transparent 55%), radial-gradient(circle at 80% 90%, rgba(56, 214, 255, 0.4), transparent 55%), linear-gradient(135deg, #0b1a3d, #050b1a); }
.cover-grid { position: absolute; inset: 0; background: linear-gradient(rgba(56, 214, 255, 0.12) 1px, transparent 1px) 0 0 / 26px 26px, linear-gradient(90deg, rgba(56, 214, 255, 0.12) 1px, transparent 1px) 0 0 / 26px 26px;
  mask-image: radial-gradient(circle, #000 20%, transparent 75%); animation: grid-move 12s linear infinite; }
@keyframes grid-move { to { background-position: 26px 26px, 26px 26px; } }
.cover-ic { position: relative; z-index: 1; width: 72px; height: 72px; color: #bfefff; filter: drop-shadow(0 0 18px rgba(56, 214, 255, 0.9)); stroke-width: 1.4; transition: transform 0.6s var(--ease); }
.project:hover .cover-ic { transform: scale(1.12) rotate(-4deg); }
.cover-ic-badge { position: absolute; z-index: 2; top: 12px; left: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(4, 9, 20, 0.8); border: 1px solid rgba(56, 214, 255, 0.4); color: var(--cyan); backdrop-filter: blur(6px); }
.cover-ic-badge .ic { width: 17px; height: 17px; }
.project-body { padding: 22px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.project-org { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan) !important; }
.project h4 { margin: 8px 0 10px; font-size: 1.1rem; }
.project-sum { font-size: 0.9rem !important; flex: 1; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.metrics div { padding: 10px 8px; border-radius: 10px; background: rgba(56, 214, 255, 0.05); border: 1px solid var(--border); text-align: center; }
.metrics b { display: block; font-family: var(--display); font-size: 1.1rem; color: var(--text); }
.metrics span { font-size: 0.72rem; color: var(--muted); line-height: 1.2; display: block; }
.project-foot { display: flex; justify-content: space-between; align-items: center; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--cyan); }
.link-btn .ic { transition: transform 0.25s var(--ease); }
.link-btn:hover .ic { transform: translateX(4px); }
.icon-link { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); color: var(--text-2); transition: all 0.2s; }
.icon-link:hover { color: #fff; border-color: var(--border-hi); }

/* ---------- education ---------- */
.edu-list { display: grid; gap: 20px; margin-top: 48px; }
.edu { display: grid; grid-template-columns: 96px 1fr 260px; gap: 28px; align-items: center; }
.edu-logo { width: 96px; height: 96px; border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: #fff; }
.edu-logo img { width: 100%; height: 100%; object-fit: contain; }
.edu-logo .mono { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: #c8102e; }
.edu-years { font-family: var(--mono); font-size: 0.78rem; color: var(--muted) !important; }
.edu h4 { margin: 6px 0 4px; font-size: 1.25rem; }
.edu-school { color: var(--cyan) !important; font-weight: 600; }
.edu-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.9rem !important; }
.edu-note .ic { color: #ffc861; }
.edu-course { margin-top: 8px; font-size: 0.86rem !important; }
.edu-course b { color: var(--text); font-weight: 600; }
.edu-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.edu-thumb { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; transition: transform 0.4s var(--ease), box-shadow 0.4s; transform: rotate(2deg); }
.edu-thumb:hover { transform: rotate(0) scale(1.03); box-shadow: var(--glow); }
.edu-thumb img { width: 100%; aspect-ratio: 11 / 8.5; object-fit: cover; }
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.cert-logo { width: 54px; height: 54px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; flex: none; }
.cert-logo img { width: 100%; height: 100%; object-fit: contain; }
.cert-logo b { font-family: var(--display); color: #fff; font-size: 0.9rem; }
.cert-logo:has(b) { background: linear-gradient(135deg, #232f3e, #ff9900); }
.cert-text { display: grid; flex: 1; line-height: 1.35; }
.cert-text b { font-size: 0.95rem; }
.cert-text small { color: var(--muted); font-size: 0.8rem; }
.cert-ext { color: var(--muted); transition: color 0.2s, transform 0.2s; }
.cert:hover .cert-ext { color: var(--cyan); transform: translate(2px, -2px); }

/* ---------- contact ---------- */
.contact-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 56px; border-radius: 30px; border: 1px solid var(--border);
  background: radial-gradient(600px 300px at 0% 0%, rgba(30, 123, 255, 0.2), transparent 70%), radial-gradient(500px 300px at 100% 100%, rgba(139, 108, 255, 0.18), transparent 70%), rgba(7, 17, 42, 0.7); }
.contact-text h2 { margin-bottom: 18px; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: center; }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); transition: all 0.3s var(--ease); min-width: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.contact-card:first-child { grid-column: 1 / -1; }
.contact-card:hover { border-color: var(--border-hi); transform: translateY(-3px); background: rgba(56, 214, 255, 0.06); }
.contact-card small { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-docs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-top: 26px; border-top: 1px solid var(--border); }
.contact-docs small { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-docs a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.92rem; }
.contact-docs a:hover { color: var(--cyan); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: rgba(4, 9, 20, 0.8); }
.footer-inner { display: flex; align-items: center; gap: 28px; }
.footer p { flex: 1; font-size: 0.86rem; color: var(--text-2); }
.to-top { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); transition: all 0.25s; }
.to-top:hover { border-color: var(--border-hi); background: rgba(56, 214, 255, 0.1); transform: translateY(-3px); }

/* ---------- modal ---------- */
.modal { width: min(900px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid rgba(56, 214, 255, 0.3); border-radius: 24px;
  background: #07112a; color: var(--text); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9); overflow: hidden; }
.modal[open] { animation: modal-in 0.45s var(--ease); }
.modal::backdrop { background: rgba(2, 5, 12, 0.75); backdrop-filter: blur(6px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(4, 9, 20, 0.85); border: 1px solid var(--border); }
.modal-close:hover { border-color: var(--border-hi); }
.modal-body { max-height: calc(100vh - 50px); overflow: auto; padding: 40px; }
.modal-project h3, .modal-diploma h3 { font-size: 1.7rem; margin: 8px 0 14px; padding-right: 40px; }
.modal-project h5 { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.metrics.big b { font-size: 1.5rem; }
.metrics.big span { font-size: 0.8rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.gallery a { border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--border); transition: transform 0.3s var(--ease); }
.gallery a:hover { transform: scale(1.02); }
.gallery img { width: 100%; height: 170px; object-fit: contain; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; color: var(--text-2); }
.checks .ic { color: var(--cyan); margin-top: 4px; }
.modal-links { display: flex; flex-wrap: wrap; gap: 10px; }
.modal-diploma { display: grid; gap: 18px; justify-items: start; }
.modal-diploma img { border-radius: 12px; width: 100%; background: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-links a { padding: 8px 9px; font-size: 0.85rem; }
  .brand-name { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .edu { grid-template-columns: 80px 1fr 200px; }
}
@media (max-width: 960px) {
  :root { --nav-h: 64px; }
  .menu-btn { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 2px; padding: 16px 20px 24px; margin: 0;
    background: rgba(4, 9, 20, 0.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all 0.3s var(--ease);
  }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .menu-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-actions { margin-left: auto; }
  .brand-name { display: inline; }
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { width: min(340px, 78%); }
  .about-grid, .skills-wrap, .contact-panel { grid-template-columns: 1fr; gap: 48px; }
  .grid-3, .certs { grid-template-columns: repeat(2, 1fr); }
  .nebula-panel, .contact-panel { padding: 36px; }
  .nebula-head { grid-template-columns: 130px 1fr; gap: 28px; }
  .edu { grid-template-columns: 72px 1fr; }
  .edu-thumb { display: none; }
  .edu-logo { width: 72px; height: 72px; border-radius: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 84px 0; }
  .brand-name { display: none; }
  .hero { padding-bottom: 130px; }
  .hero-card { left: -8px; bottom: 16px; }
  .hero-role { min-height: 2.6em; }
  .orbit-2 { display: none; }
  .grid-3, .grid-4, .projects, .certs, .contact-cards { grid-template-columns: 1fr; }
  .nebula-panel, .contact-panel { padding: 26px 20px; border-radius: 22px; }
  .nebula-head { grid-template-columns: 1fr; }
  .nebula-logo { width: 120px; }
  .nebula-bilingual { margin-left: 0; }
  .tl-card header { flex-direction: column; gap: 10px; }
  .timeline { padding-left: 28px; }
  .timeline::before { left: 5px; }
  .tl-dot { left: -30px; }
  .card { padding: 20px; }
  .edu { grid-template-columns: 1fr; gap: 16px; }
  .about-headshot { right: 0; }
  .modal-body { padding: 28px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .mq-item { font-size: 1.1rem; padding: 18px 24px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .ecg-path { stroke-dashoffset: 0; }
}
