/* santiagohaspert.com — personal brand hub */
:root {
  --bg: #0b0a10;
  --bg-2: #13111b;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .1);
  --text: #f5f2ec;
  --muted: #a7a2ad;
  --accent: #ff9a76;
  --accent-2: #9d8cff;
  --accent-3: #ffd65a;
  --radius: 28px;
  --max: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.i18n-pending body { opacity: 0; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 17px; line-height: 1.6; overflow-x: hidden; transition: opacity .4s ease;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 10px; }
.skip:focus { top: 16px; }

/* ---------- ambient background ---------- */
/* Sized to the large viewport (+ bleed) so iOS Safari never shows a bare strip when its toolbars collapse. */
.aurora { position: fixed; top: -60px; left: 0; right: 0; height: calc(100vh + 120px); height: calc(100lvh + 120px); z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .28; animation: drift 26s var(--ease) infinite alternate; }
.aurora span:nth-child(1) { background: var(--accent); top: -25vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: var(--accent-2); top: 10vmax; right: -25vmax; animation-delay: -8s; opacity: .22; }
.aurora span:nth-child(3) { background: var(--accent-2); bottom: -22vmax; left: -10vmax; animation-delay: -16s; opacity: .2; }
.aurora::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 60% at 50% 100%, rgba(255, 154, 118, .12), transparent 70%); }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, 4vmax) scale(1.1); } 100% { transform: translate(-4vmax, 8vmax) scale(.95); } }
.grain { position: fixed; top: -60px; left: 0; right: 0; height: calc(100vh + 120px); height: calc(100lvh + 120px); z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: max(14px, env(safe-area-inset-top)); z-index: 50; max-width: var(--max); margin: 14px auto 0; width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(14, 12, 20, .6); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(14, 12, 20, .85); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: .78rem; letter-spacing: .02em; color: #120f18;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-3), var(--accent-2), var(--accent)); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.lang button { font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: none; border: 0; padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: all .25s var(--ease); }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s; will-change: transform; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: 0 8px 30px rgba(255, 255, 255, .08); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(255, 154, 118, .3); }
.btn-primary:hover svg { animation: nudge .6s var(--ease); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); background: var(--surface-2); transform: translateY(-2px); }
@keyframes nudge { 50% { transform: translate(2px, -2px); } }

/* ---------- hero ---------- */
.hero { overflow-x: clip; max-width: var(--max); margin: 0 auto; padding: clamp(48px, 9vw, 110px) 24px 60px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; min-height: min(92vh, 900px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; color: var(--muted); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee39b; box-shadow: 0 0 0 0 rgba(94, 227, 155, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(94, 227, 155, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 227, 155, 0); } }
.hero-title { font-size: clamp(2.8rem, 7.2vw, 6rem); font-weight: 700; letter-spacing: -.045em; line-height: .98; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.08em; }
.hero-title .line > * { display: inline-block; transform: translateY(110%); animation: rise 1s var(--ease) forwards; }
.hero-title .line:nth-child(2) > * { animation-delay: .12s; }
.hero-title .line:nth-child(3) > * { animation-delay: .24s; }
.hero-title em { background: linear-gradient(100deg, var(--accent) 0%, var(--accent-3) 45%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; font-size: 1.06em; }
@keyframes rise { to { transform: none; } }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 560px; margin: 26px 0 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-visual { position: relative; aspect-ratio: 1; width: min(100%, 470px); justify-self: center; }
.portrait { position: absolute; inset: 12%; border-radius: 50%; }
.portrait img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; z-index: 1; filter: saturate(1.03); }
.portrait-ring { position: absolute; inset: -10px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-3), var(--accent-2), var(--accent)); animation: spin 8s linear infinite; filter: blur(.5px); }
.portrait-ring::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg); }
.portrait::before { content: ''; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 154, 118, .25), transparent 60%); z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit { position: absolute; inset: 0; z-index: 2; animation: spin 40s linear infinite; }
.orb { position: absolute; width: 22%; aspect-ratio: 1; border-radius: 24%; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .15); animation: spin 40s linear infinite reverse; z-index: 2; }
.orb img { width: 100%; height: 100%; object-fit: cover; }
/* Icons sit on a circle (radius 39%) so the spinning orbit never sticks out of the page. */
.orb-1 { top: 0; left: 39%; }
.orb-2 { top: 58.5%; left: 5.2%; }
.orb-3 { top: 58.5%; left: 61.8%; }
.badge-float { position: absolute; z-index: 3; left: 50%; bottom: -4%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; white-space: nowrap; padding: 10px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: rgba(20, 18, 28, .8); border: 1px solid var(--line); backdrop-filter: blur(10px); animation: bob 4s ease-in-out infinite; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 12px var(--accent-3); }
@keyframes bob { 50% { transform: translate(-50%, -8px); } }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 20px 0; background: rgba(255, 255, 255, .02); -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 28px; align-items: center; animation: scroll 38s linear infinite; font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.marquee-track i { font-style: normal; color: var(--accent); font-size: .8em; }
.marquee-track span:nth-of-type(3n+2) { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 140px) 24px 0; }
.section-head { max-width: 820px; margin-bottom: 56px; }
.kicker { margin: 0 0 16px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.section h2 { font-size: clamp(2.1rem, 4.8vw, 3.8rem); }
.section h2 em { color: var(--muted); }

/* ---------- projects ---------- */
.project {
  --p1: #fff; --p2: #fff; --pt: var(--text);
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(28px, 4.5vw, 56px); margin-bottom: 28px; border-radius: 36px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); background: var(--bg-2);
}
.project::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 100% 0%, var(--p1), transparent 55%), radial-gradient(90% 80% at 0% 100%, var(--p2), transparent 60%); opacity: .28; transition: opacity .6s; }
.project:hover::before { opacity: .42; }
.project::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .07), transparent 40%); opacity: 0; transition: opacity .3s; }
.project:hover::after { opacity: 1; }
.p-cadmora { --p1: #ff9f86; --p2: #4b5fd1; }
.p-talkbuddies { --p1: #ffd84d; --p2: #ff9f1a; }
.p-sla { --p1: #2f8cff; --p2: #ffb627; grid-template-columns: .9fr 1.1fr; }
.project-id { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.app-icon { width: 76px; height: 76px; border-radius: 22%; box-shadow: 0 12px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .12); flex: none; }
.project h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.tag { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--p1); line-height: 1.2; }
.desc { color: #cfcad3; margin: 0 0 22px; max-width: 520px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 28px; }
.chips li { padding: 6px 13px; border-radius: 999px; font-size: .84rem; font-weight: 500; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); }
.project-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.platforms { margin: 16px 0 0; color: var(--muted); font-size: .85rem; letter-spacing: .02em; }

.fan { position: relative; height: clamp(380px, 44vw, 540px); display: flex; justify-content: center; align-items: center; perspective: 1200px; }
.fan img { position: absolute; height: 92%; width: auto; max-width: 46%; object-fit: contain; border-radius: 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1); transition: transform .8s var(--ease); }
.fan img:nth-child(1) { transform: translateX(-52%) rotate(-9deg) scale(.88); }
.fan img:nth-child(2) { z-index: 2; transform: translateY(-2%); }
.fan img:nth-child(3) { transform: translateX(52%) rotate(9deg) scale(.88); }
.project:hover .fan img:nth-child(1) { transform: translateX(-72%) rotate(-13deg) scale(.9); }
.project:hover .fan img:nth-child(2) { transform: translateY(-5%) scale(1.03); }
.project:hover .fan img:nth-child(3) { transform: translateX(72%) rotate(13deg) scale(.9); }

.landscape { position: relative; display: grid; gap: 0; padding: 10px 0 30px; align-items: start; }
.landscape img { height: auto; align-self: start; }
.landscape img { border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .8s var(--ease); image-rendering: auto; }
.landscape img:nth-child(1) { width: 92%; transform: rotate(-2deg); }
.landscape img:nth-child(2) { width: 58%; justify-self: end; margin-top: -12%; margin-right: -4%; transform: rotate(3deg); position: relative; z-index: 1; }
.project:hover .landscape img:nth-child(1) { transform: rotate(-1deg) translateY(-6px); }
.project:hover .landscape img:nth-child(2) { transform: rotate(1deg) translate(8px, 6px); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.about-copy p:not(.kicker) { color: #cfcad3; font-size: 1.08rem; margin: 22px 0 0; max-width: 600px; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pillar { position: relative; padding: 26px 26px 24px 84px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); transition: transform .4s var(--ease), border-color .3s, background .3s; }
.pillar:hover { transform: translateX(-6px); border-color: rgba(255, 255, 255, .22); background: var(--surface-2); }
.pillar-n { position: absolute; left: 26px; top: 24px; font-family: var(--serif); font-style: italic; font-size: 1.8rem; line-height: 1; color: var(--accent); }
.pillar h3 { font-size: 1.2rem; letter-spacing: -.02em; }
.pillar p { margin: 6px 0 0; color: var(--muted); font-size: .97rem; }

/* ---------- contact ---------- */
.contact { padding-bottom: 40px; }
.contact-card { position: relative; overflow: hidden; text-align: center; padding: clamp(40px, 7vw, 90px) clamp(20px, 5vw, 60px); border-radius: 40px; border: 1px solid var(--line);
  background: radial-gradient(80% 100% at 50% 0%, rgba(157, 140, 255, .22), transparent 60%), radial-gradient(60% 80% at 50% 120%, rgba(255, 154, 118, .25), transparent 60%), var(--bg-2); }
.contact-card .lead { margin: 22px auto 0; }
.socials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.social { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); transition: transform .3s var(--ease), background .3s, border-color .3s; }
.social:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .25); }
.social svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.social small { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; }

/* ---------- footer ---------- */
.footer { max-width: var(--max); margin: 0 auto; padding: 40px 24px calc(56px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .9rem; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: left; min-height: 0; gap: 64px; }
  .hero-visual { width: min(86%, 420px); }
  .project, .p-sla { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .socials { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { padding: 8px 8px 8px 10px; }
  .nav-links, .brand-name { display: none; }
  .hero { padding: 48px 16px 48px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .project { border-radius: 28px; padding: 24px 20px; }
  .fan { height: 340px; }
  .fan img { height: auto; width: 40%; max-width: none; }
  .socials { grid-template-columns: 1fr; }
  .badge-float { font-size: .78rem; }
  .btn { padding: 0 18px; }
  .footer { padding: 32px 16px calc(44px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
