:root{--bg:#101214;--panel:#181b20;--ink:#f5eedf;--muted:#c4c1bc;--accent:#ffc276;--line:#3c3632}
body{background:radial-gradient(ellipse at 84% 12%,#30221e,transparent 44rem),var(--bg)}
header{background:#101214ed}
.opening{position:relative;isolation:isolate;display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:20px;min-height:86svh;padding:clamp(32px,7vw,110px);overflow:hidden;background:radial-gradient(ellipse at 80% 38%,#563524,#25222a 36%,#111319 68%)}
.opening::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.35;background:repeating-linear-gradient(115deg,transparent 0 11rem,#fdb56533 11rem 11.12rem)}
.opening-copy{position:relative;z-index:1;animation:appear .65s ease-out both}
.opening h1{font-size:clamp(4.2rem,12vw,11rem);text-transform:uppercase;text-shadow:0 5px 0 #42312c,0 18px 40px #000b;line-height:.84}
.opening h1 span{color:var(--accent)}
.opening-copy>p:last-of-type{font-size:clamp(1.05rem,2vw,1.4rem);color:var(--muted)}
.opening-art{width:min(100%,480px);aspect-ratio:1;position:relative;display:grid;place-items:center;perspective:1000px;justify-self:center}
.opening-art::before,.opening-art::after{content:"";position:absolute;inset:4%;border:1px solid #ffc27683;border-radius:50%;transform:rotate(-30deg) rotateX(56deg);box-shadow:0 0 36px #ffad6340;pointer-events:none}
.opening-art::after{transform:rotate(35deg) rotateX(64deg);border-color:#a6b7df99}
.opening-art img{width:78%;border-radius:50%;box-shadow:0 24px 85px #03040bb5;animation:poster-float 6s ease-in-out infinite}
@keyframes poster-float{0%,100%{transform:translateY(0) rotateY(-6deg)}50%{transform:translateY(-12px) rotateY(5deg)}}
.button.primary{color:#20160f;box-shadow:0 4px 0 #88623e}
.perspective-grid,.shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;perspective:900px}
.perspective-card,.shelf a{padding:20px;border:1px solid #5b4b42;border-radius:14px;background:linear-gradient(145deg,#583629,#241c1e 70%);box-shadow:0 5px 0 #07090b;transition:transform 220ms ease}
.perspective-card:nth-child(2),.shelf a:nth-child(2){background:linear-gradient(145deg,#294752,#20272e 70%)}
.perspective-card:nth-child(3),.shelf a:nth-child(3){background:linear-gradient(145deg,#48442b,#262921 70%)}
.perspective-card:hover,.perspective-card:focus-visible,.shelf a:hover,.shelf a:focus-visible{transform:translateY(-6px) rotateX(8deg)}
.perspective-card strong,.perspective-card>span{display:block}
.perspective-card strong{font-size:1.15rem}
.perspective-card>span:last-child{color:var(--muted)}
.perspective-icon{font-family:monospace;font-size:1.9rem;font-weight:800;color:var(--accent);margin-bottom:10px}
.shelf a{font-weight:800}
.hero h1{text-shadow:0 3px #6f5141,0 8px 24px #ff9a6540}
.depth-panel,.contact-panel{background:radial-gradient(ellipse at 85% 0,#493529,transparent 70%),#1e1a1b;border-color:#54453a}
.contact-panel{padding-block:clamp(32px,8vw,84px)}
.contact-panel h2{font-size:clamp(2.3rem,7vw,5.2rem)}
@media(max-width:650px){.opening{grid-template-columns:1fr;min-height:0;padding:46px 5%;gap:28px}.opening-art{width:min(88%,360px)}.perspective-grid,.shelf{grid-template-columns:1fr}.perspective-card,.shelf a{padding:14px}}
@media(prefers-reduced-motion:reduce){.perspective-card,.shelf a{transition:none}.perspective-card:is(:hover,:focus-visible),.shelf a:is(:hover,:focus-visible){transform:none}}

/* The intro recedes as the next section moves toward the viewer. */
.opening { perspective: 900px; transform-style: preserve-3d; }
.opening-copy { transform-style: preserve-3d; }
.opening-art { transform: translateZ(22px); }
.opening.is-departing { animation: portal-out 740ms cubic-bezier(.55,.05,.87,.52) both; }
.opening.is-departing .opening-art { animation: poster-through 740ms ease-in both; }
.opening.is-departing .opening-copy { animation: copy-through 600ms ease-in both; }
.perspectives.portal-arrival .wrap { animation: portal-in 820ms cubic-bezier(.16,1,.3,1) both; }
.depth-arrival .mock-depth { animation: scene-depth 850ms cubic-bezier(.16,1,.3,1) both; }
@keyframes portal-out {
  0% { opacity: 1; transform: perspective(900px) translateZ(0); }
  65% { opacity: .85; }
  100% { opacity: 0; transform: perspective(900px) translateZ(420px); }
}
@keyframes poster-through {
  to { opacity: .1; transform: translate3d(10%,0,110px) rotateY(22deg); }
}
@keyframes copy-through {
  to { opacity: 0; transform: translate3d(-12%,0,85px); }
}
@keyframes portal-in {
  from { opacity: .15; transform: perspective(900px) translate3d(0,30px,-480px) rotateX(-13deg); }
  to { opacity: 1; transform: perspective(900px) translate3d(0,0,0) rotateX(0); }
}
@keyframes scene-depth {
  from { opacity: .35; transform: translate3d(0,18px,-185px) rotateX(15deg) rotateY(-19deg); }
  to { opacity: 1; transform: rotateX(var(--tilt-x, 5deg)) rotateY(var(--tilt-y, -9deg)); }
}
body.portal-transition { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  .opening-art { transform: none; }
}

[hidden] { display: none !important; }
body.intro-locked { overflow: hidden; }
.intro-locked .opening {
  height: 100svh;
  min-height: 0;
  padding-block: 24px 100px;
}
.opening h1 .fall-word { color: var(--ink); }
.opening h1 .fall-word b { color: var(--accent); }
.opening-copy { animation: none; }
.fall-word {
  display: inline-block;
  transform-origin: center bottom;
  animation: word-drop 1250ms cubic-bezier(.22,.64,.33,1) both;
  animation-delay: calc(70ms + var(--order) * 390ms);
}
.intro-action {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(35px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: center;
  perspective: 650px;
  animation: action-drop 1100ms cubic-bezier(.22,.64,.33,1) 3550ms both;
}
.intro-action .button { padding: 12px 30px; }
@keyframes word-drop {
  0% { opacity: 0; transform: perspective(850px) translate3d(0,-38vh,-220px) rotateX(79deg) rotateZ(-9deg); }
  72% { opacity: 1; transform: perspective(850px) translate3d(0,8px,24px) rotateX(-10deg); }
  87% { transform: perspective(850px) translateY(-4px) rotateX(6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes action-drop {
  0% { visibility: hidden; opacity: 0; transform: translateY(-105px) rotateX(65deg); }
  70% { visibility: visible; opacity: 1; transform: translateY(8px) rotateX(-12deg); }
  100% { opacity: 1; transform: none; }
}
@media (max-width: 650px) {
  .intro-locked .opening { grid-template-rows: auto minmax(0,1fr); gap: 12px; padding-top: 22px; }
  .intro-locked .opening h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .intro-locked .opening-art { width: min(65vw,36svh,300px); }
}
@media(max-height: 460px) and (orientation: landscape) {
  .intro-locked .opening { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0,1fr); padding-block: 12px 68px; }
  .intro-locked .opening h1 { font-size: clamp(1.9rem, 13svh, 4rem); }
  .intro-locked .opening-art { width: min(31vw,62svh); }
  .intro-action { bottom: 14px; }
}

.intro-locked .opening {
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  text-align: center;
}
.intro-locked .opening h1 { margin: 0; }
.opening-line { display: block; }
.opening-welcome {
  font-size: clamp(2.7rem, 10.5vw, 9rem);
  white-space: nowrap;
}
.opening-subtitle {
  margin-top: 22px;
  font-size: clamp(1rem, 4.15vw, 3.65rem);
  line-height: 1.16;
  letter-spacing: -.025em;
}
.opening h1 .opening-subtitle .fall-word { color: var(--accent); }
@media (max-height: 460px) and (orientation: landscape) {
  .opening-welcome { font-size: clamp(2rem, 18svh, 5.2rem); }
  .opening-subtitle { margin-top: 12px; font-size: clamp(1rem, 8svh, 2.4rem); }
}

.door-stage {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 3;
  overflow: hidden;
  background: radial-gradient(ellipse, #4b3625, #100e13 70%);
  perspective: 720px;
}
.opening.is-departing { animation: none; }
.is-departing .door-stage { display: grid; }
.door-camera {
  width: min(40svh, 62vw, 300px);
  aspect-ratio: 3 / 5;
  transform-style: preserve-3d;
}
.is-departing .door-camera { animation: through-door 1800ms ease-in-out both; }
.door-frame {
  position: relative;
  height: 100%;
  border: 8px solid #b98354;
  background: radial-gradient(ellipse at 50% 58%, #fff1ce, #ffb76f 63%, #553122);
  box-shadow: 0 0 70px #f0a95b60, inset 0 0 24px #713e1f99;
  transform-style: preserve-3d;
}
.door-leaf {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  border: 5px solid #523626;
  background: repeating-linear-gradient(90deg,#432d27 0 30px,#50342a 32px 34px);
  box-shadow: inset 0 0 24px #170d09;
  backface-visibility: hidden;
}
.door-leaf::after {
  position: absolute;
  content: "";
  top: 53%;
  right: 13%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffca83;
  box-shadow: 0 0 10px #ffbf6a;
}
.is-departing .door-leaf { animation: swing-door 850ms cubic-bezier(.3,.1,.2,1) 150ms both; }
@keyframes swing-door { to { transform: rotateY(106deg); } }
@keyframes through-door {
  0% { opacity: 0; transform: translateZ(-120px); }
  22%, 50% { opacity: 1; transform: translateZ(0); }
  90% { opacity: 1; }
  100% { transform: translateZ(630px); opacity: 0; }
}
.about-layout { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(24px,6vw,80px); align-items: start; }
.about-photo { min-height: 0; aspect-ratio: 1; }
.about-heading h2 { margin-bottom: 18px; }
.about-lines { display: grid; gap: 8px; color: var(--muted); }
.about-arrival :is(.about-photo,.about-heading,.about-lines p) {
  animation: about-drop 780ms cubic-bezier(.22,.64,.33,1) both;
  animation-delay: calc(var(--about-order) * 235ms);
}
@keyframes about-drop {
  0% { opacity: 0; transform: perspective(900px) translate3d(0,-75px,-160px) rotateX(35deg); }
  78% { opacity: 1; transform: perspective(900px) translateY(5px) rotateX(-5deg); }
  100% { opacity: 1; transform: none; }
}
@media(max-width: 730px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { width: min(100%,320px); justify-self: center; }
}

.opening {
  background:
    radial-gradient(ellipse at 50% 89%, #a64c24 0%, #49211c 25%, transparent 58%),
    radial-gradient(ellipse at 52% 28%, #31203b, #100d19 59%, #08090e);
}
.opening::before {
  inset: auto -32% -54% -32%;
  height: 118%;
  background:
    repeating-linear-gradient(90deg, transparent 0 58px, #ffc78b70 59px 60px),
    repeating-linear-gradient(0deg, transparent 0 58px, #ffc78b70 59px 60px);
  transform: perspective(460px) rotateX(49deg);
  mask-image: radial-gradient(ellipse, #000 20%, transparent 69%);
  opacity: .55;
}
.opening::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -50% -12%;
  pointer-events: none;
  background: conic-gradient(from 152deg at 50% 39%, transparent 0deg, #ffb96926 15deg, #df794a45 26deg, transparent 43deg 360deg);
  animation: welcome-spotlight 12s ease-in-out infinite alternate;
}
@keyframes welcome-spotlight {
  to { transform: rotate(14deg) scale(1.12); }
}
.entry-about {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 16% 25%, #293a70 0%, transparent 52%),
    radial-gradient(ellipse at 90% 70%, #301d59 0%, transparent 56%),
    linear-gradient(138deg, #101c32, #121323 55%, #1b1532);
}
.entry-about::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  background:
    repeating-radial-gradient(ellipse at 17% 42%, transparent 0 26px, #83bbff45 27px 28px, transparent 29px 47px),
    radial-gradient(ellipse at 13% 60%, #8ab8ff48 0%, transparent 35%);
  mask-image: linear-gradient(105deg, #000 0%, transparent 73%);
}
.about-layout { align-items: start; }
.entry-about .about-photo {
  background: radial-gradient(ellipse at 54% 44%, #3a59a0, #231f48 60%, #131d34);
  border-color: #8eacff60;
  box-shadow: 0 24px 70px #040719a0, 0 0 48px #5c7fea36;
}
.entry-about .about-copy {
  padding: clamp(18px,3vw,34px);
  border: 1px solid #abafff36;
  border-radius: 22px;
  background: linear-gradient(145deg, #12192ce8, #16152be6);
  box-shadow: 0 18px 54px #080b1d75;
}
.entry-about .eyebrow { color: #b8c5ff; }
.entry-about .about-lines { color: #e0e2f1; }

.about-role {
  display: inline-block;
  color: #c5b5ff;
  background: linear-gradient(95deg, #a8dfff, #d4bcff 54%, #ffbcda);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(1.2rem, 2.7vw, 1.8rem);
  font-weight: 750;
}
.about-heading h2 { margin-bottom: 4px; }
.about-heading { margin-bottom: 18px; }
.about-next { display: flex; justify-content: center; padding-top: 32px; }
.about-arrival :is(.about-photo,.about-heading,.about-lines p,.about-next) {
  animation: about-drop 1350ms cubic-bezier(.22,.64,.33,1) both;
  animation-delay: calc(var(--about-order) * 460ms);
}
.about-arrival .about-next { animation-name: about-button-drop; }
@keyframes about-button-drop {
  0% { visibility: hidden; opacity: 0; transform: perspective(900px) translate3d(0,-60px,-120px) rotateX(35deg); }
  70% { visibility: visible; opacity: 1; transform: perspective(900px) translateY(5px) rotateX(-5deg); }
  100% { opacity: 1; transform: none; }
}
.is-departing .door-camera { animation-duration: 4600ms; }
@keyframes through-door {
  0% { opacity: 0; transform: translateZ(-220px); }
  12% { opacity: 1; transform: translateZ(-120px); }
  28% { transform: translateZ(-35px); }
  68% { transform: translateZ(280px); }
  90% { opacity: 1; }
  100% { transform: translateZ(680px); opacity: 0; }
}

/* Each stage animates a background layer behind its interactive content. */
.opening::before { animation: floor-drift 9s linear infinite; }
.door-stage::before {
  content: "";
  position: absolute;
  inset: -35%;
  pointer-events: none;
  background: repeating-radial-gradient(ellipse at center, transparent 0 40px, #ffc27632 43px, transparent 48px 105px);
  animation: passage-ripple 4s ease-out infinite;
}
.entry-about::before { animation: about-rings-drift 15s ease-in-out infinite alternate; }
.entry-about::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -26%;
  background:
    radial-gradient(ellipse at 25% 40%, #507dff58, transparent 34%),
    radial-gradient(ellipse at 67% 57%, #ad6ef14d, transparent 37%);
  animation: aurora-drift 13s ease-in-out infinite alternate;
}
#main-portfolio {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: #111419;
}
#main-portfolio::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 18%, #2b646747 0%, transparent 45%),
    radial-gradient(ellipse at 85% 64%, #5c397552 0%, transparent 50%),
    repeating-linear-gradient(125deg, transparent 0 115px, #bccbff13 116px 117px, transparent 118px 156px);
  background-size: 140% 140%, 135% 145%, 240px 240px;
  animation: project-background-drift 16s ease-in-out infinite alternate;
}
#main-footer {
  background: linear-gradient(105deg, #17151d, #253044, #17151d);
  background-size: 220% 100%;
  animation: project-background-drift 16s ease-in-out infinite alternate;
}
@keyframes floor-drift {
  to { background-position: 60px 0, 0 60px; }
}
@keyframes passage-ripple {
  from { transform: scale(.65); opacity: .2; }
  58% { opacity: .7; }
  to { transform: scale(1.22); opacity: .15; }
}
@keyframes about-rings-drift {
  to { transform: translate3d(5%,-3%,0) scale(1.12); }
}
@keyframes aurora-drift {
  to { transform: translate3d(12%,-8%,0) rotate(12deg) scale(1.08); }
}
@keyframes project-background-drift {
  from { background-position: 0% 0%, 100% 100%, 0 0; }
  to { background-position: 70% 35%, 15% 25%, 160px 120px; }
}

@property --glow-hue {
  syntax: "<number>";
  inherits: false;
  initial-value: 40;
}
.door-stage {
  background: radial-gradient(ellipse, hsl(var(--glow-hue) 55% 28%), #100e13 70%);
}
.is-departing .door-stage { animation: passage-color 4600ms linear both; }
.door-stage::before {
  background: repeating-radial-gradient(ellipse at center, transparent 0 40px, hsl(var(--glow-hue) 92% 71% / .24) 43px, transparent 48px 105px);
  --glow-hue: inherit;
}
.door-frame {
  --glow-hue: inherit;
  background: radial-gradient(ellipse at 50% 58%, #fff3df, hsl(var(--glow-hue) 95% 68%) 63%, #413023);
  box-shadow: 0 0 70px hsl(var(--glow-hue) 90% 67% / .4), inset 0 0 24px #39272099;
}
.door-camera { --glow-hue: inherit; }
@keyframes passage-color {
  0%, 18% { --glow-hue: 40; }
  100% { --glow-hue: 218; }
}
.entry-about::after {
  background:
    radial-gradient(ellipse at 25% 40%, hsl(var(--glow-hue) 86% 62% / .36), transparent 42%),
    radial-gradient(ellipse at 67% 57%, hsl(calc(var(--glow-hue) + 38) 80% 65% / .29), transparent 43%);
  animation: aurora-drift 13s ease-in-out infinite alternate, aurora-color 26s linear infinite;
}
@keyframes aurora-color {
  from { --glow-hue: 218; }
  to { --glow-hue: 578; }
}

.about-arrival .about-heading { animation: none; }
.about-arrival .about-photo {
  animation: about-portrait-reveal 3100ms cubic-bezier(.22,.61,.36,1) both;
}
.about-arrival .about-heading > * {
  animation: about-drop 1200ms cubic-bezier(.22,.64,.33,1) both;
}
.about-arrival .about-heading .eyebrow { animation-delay: 3150ms; }
.about-arrival .about-heading h2 { animation-delay: 3300ms; }
.about-arrival .about-heading .about-role { animation-delay: 4150ms; }
.about-arrival .about-lines p {
  animation-delay: calc(4100ms + var(--about-order) * 450ms);
}
#about.about-arrival .about-next { animation-delay: 8650ms; }
@keyframes about-portrait-reveal {
  from { opacity: 0; transform: perspective(1000px) translate3d(0,-60px,-190px) rotateX(14deg); }
  to { opacity: 1; transform: none; }
}

/* Keep the About backdrop continuous through its full viewport and CTA. */
.entry-about {
  min-height: 100vh;
  min-height: 100svh;
}
body:has(#portfolio-content:not([hidden])):has(#main-portfolio[hidden]) {
  background: #1b1532;
}
#main-portfolio {
  min-height: 100svh;
}

.work-showcase #selected-work { text-align: center; }
#selected-work > span { display: inline-block; }
#selected-work b {
  display: inline-block;
  color: #ffd381;
  background: linear-gradient(105deg, #ffcc7c, #ffa9c8 48%, #a9c7ff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: work-heading-float 4s ease-in-out infinite;
}
#selected-work > span:nth-child(2) b { animation-delay: -.7s; }
#selected-work.entering > span { animation: word-drop 900ms cubic-bezier(.22,.64,.33,1) both; }
#selected-work.entering > span:nth-child(2) { animation-delay: 250ms; }
@keyframes work-heading-float { 50% { transform: translateY(-5px) rotate(-1deg); } }
.work-showcase .work-slide {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  max-width: 850px;
  margin-inline: auto;
}
.work-title {
  justify-self: center;
  margin: 22px 14px 18px;
  padding: 9px 22px;
  border: 1px solid #c58b60;
  border-radius: 10px;
  background: #3d261e;
  color: #ffe1c5;
}
.work-slide .project-copy { padding-block: 20px; }
.work-slide .project-link {
  display: inline-block;
  margin-top: 20px;
  border-color: #ffca83;
  background: #ffca83;
  color: #25170e;
}
.work-controls {
  display: flex;
  justify-content: center;
  padding: 8px 16px 26px;
}

.skills-stage {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 15% 70%, #164f47, transparent 66%), #0b2425;
}
.skills-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -25%;
  background: radial-gradient(ellipse at 70% 42%, #4be2a940 0%, transparent 42%),
    repeating-linear-gradient(125deg, transparent 0 56px, #8dffd01c 57px 58px);
  animation: aurora-drift 12s ease-in-out infinite alternate;
}
.skills-group + .skills-group { margin-top: 34px; }
.skills-group h3 { font-size: clamp(1.25rem,3vw,1.65rem); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(135px,100%),1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.skill-card {
  --tile-accent: #89dec1;
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 126px;
  padding: 14px 8px;
  border-radius: 16px;
  text-align: center;
  background: #102a2b;
  box-shadow: 0 10px 22px #05141462;
}
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid var(--tile-accent);
  animation: skill-border-float 4.2s ease-in-out infinite;
  animation-delay: calc(var(--phase) * -370ms);
}
@keyframes skill-border-float {
  0%,100% { transform: translateY(0); opacity: .55; box-shadow: 0 0 5px transparent; }
  50% { transform: translateY(-4px); opacity: 1; box-shadow: 0 0 15px color-mix(in srgb,var(--tile-accent) 45%,transparent); }
}
.skill-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--tile-accent);
  color: #0b191c;
  font: 800 1rem system-ui,sans-serif;
}
.html { --tile-accent: #ff856a; }
.css { --tile-accent: #72b8ff; }
.javascript { --tile-accent: #f7dd60; }
.c-language { --tile-accent: #a2b4ff; }
.sql { --tile-accent: #fbbe7b; }
.vscode { --tile-accent: #70c3ff; }
.github { --tile-accent: #ded7ff; }
.pages { --tile-accent: #94e2ee; }
.android { --tile-accent: #86eaa9; }
.html .skill-mark,.css .skill-mark {
  clip-path: polygon(3% 0,97% 0,87% 80%,50% 100%,13% 80%);
  border-radius: 0;
  padding-bottom: 5px;
  font-size: 1.35rem;
}
.c-language .skill-mark {
  clip-path: polygon(50% 0,95% 25%,95% 75%,50% 100%,5% 75%,5% 25%);
}
.vscode .skill-mark {
  font-size: 0;
  clip-path: polygon(3% 30%,12% 22%,39% 43%,78% 4%,99% 16%,99% 84%,78% 96%,39% 57%,12% 78%,3% 70%,24% 50%,3% 30%,48% 50%,77% 74%,77% 26%,48% 50%);
}
.sql .skill-mark { border-radius: 50% / 22%; }

.cloudflare { --tile-accent: #ffab59; }
.render { --tile-accent: #c7b1ff; }
.cloudflare .skill-mark { font-size: 1.65rem; }
.skills-stage.skills-arriving .skill-card {
  animation: skill-drop 850ms cubic-bezier(.22,.64,.33,1) both;
  animation-delay: calc(var(--phase) * 220ms);
}
@keyframes skill-drop {
  0% { opacity: 0; transform: perspective(800px) translate3d(0,-70px,-135px) rotateX(30deg); }
  78% { opacity: 1; transform: perspective(800px) translateY(5px) rotateX(-5deg); }
  100% { opacity: 1; transform: none; }
}

.skills-next { display: flex; justify-content: center; margin-top: 36px; }
.contact-stage {
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 85% 12%, #753d542b, transparent 50%),
    linear-gradient(135deg, #211526, #191a30, #302037);
  background-size: 150% 145%;
  animation: project-background-drift 16s ease-in-out infinite alternate;
}
.contact-stage .wrap { max-width: 720px; }
#contact-title {
  width: fit-content;
  margin-inline: auto;
  color: #ffcc90;
  background: linear-gradient(100deg, #ffc880, #ffabd3, #aebaff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: word-drop 1100ms cubic-bezier(.22,.64,.33,1) both;
}
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-list li {
  animation: about-drop 850ms cubic-bezier(.22,.64,.33,1) both;
  animation-delay: calc(680ms + var(--row) * 280ms);
}
.contact-row {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #ce99cb91;
  border-radius: 14px;
  background: #242035;
  box-shadow: 0 8px 22px #100c196b;
}
.contact-row:hover { border-color: #ffc9e7; }
.contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #e6b0df;
  color: #261a30;
  font-weight: 800;
}
.contact-row strong,.contact-row span span { display: block; overflow-wrap: anywhere; }
.contact-row span span { color: var(--muted); }

.contact-stage { position: relative; isolation: isolate; overflow: hidden; }
.contact-stage::before,
.contact-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.contact-stage::before {
  inset: -32%;
  background:
    radial-gradient(ellipse at 24% 35%, #f781cf58, transparent 31%),
    radial-gradient(ellipse at 68% 63%, #8274ff62, transparent 37%);
  animation: contact-glow-drift 10s ease-in-out infinite alternate;
}
.contact-stage::after {
  inset: -15%;
  background: repeating-radial-gradient(ellipse at 80% 45%, transparent 0 45px, #f3c0f043 47px, transparent 49px 77px);
  mask-image: linear-gradient(112deg, transparent 20%, #000 77%);
  animation: contact-ring-drift 8s ease-in-out infinite alternate;
}
@keyframes contact-glow-drift {
  from { transform: translate3d(-9%,-5%,0) rotate(-8deg); }
  to { transform: translate3d(10%,7%,0) rotate(10deg); }
}
@keyframes contact-ring-drift {
  from { transform: scale(.88); opacity: .36; }
  to { transform: scale(1.12); opacity: .8; }
}
.contact-row {
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.contact-row:is(:hover,:focus-visible) {
  background-color: #322846;
  border-color: #ffc9e7;
  box-shadow: 0 9px 24px #100c198c;
}
.contact-icon svg { width: 38px; height: 38px; display: block; }
.contact-icon-linkedin svg { width: 34px; height: 34px; }
.contact-icon-facebook svg { width: 42px; height: 42px; }
.contact-icon-linkedin { background: #fff; }
.contact-icon-github { background: #121218; color: #fff; }

.contact-list { width: min(100%, 510px); margin-inline: auto; }
.contact-row { min-height: 84px; padding-block: 17px; }
.contact-icon-instagram {
  background: linear-gradient(140deg,#5b36db,#c72578 52%,#ed8a32);
  color: #fff;
}
.contact-icon-facebook { background: #fff; color: #0866ff; }

.contact-row { position: relative; border-color: transparent; }
.contact-row::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #f0b1e7;
  border-radius: inherit;
  pointer-events: none;
  animation: contact-border-float 3.6s ease-in-out infinite;
  animation-delay: calc(var(--row) * -310ms);
}
@keyframes contact-border-float {
  0%,100% { transform: translateY(2px); opacity: .5; box-shadow: 0 0 2px #e79dd74d; }
  50% { transform: translateY(-4px); opacity: 1; box-shadow: 0 0 15px #e79dd77a; }
}
.contact-row:is(:hover,:focus-visible) { border-color: transparent; }

.contact-next { display: flex; justify-content: center; margin-top: 34px; }
.closing {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  height: 100svh;
  overflow: hidden;
  text-align: center;
  background: #080910;
}
.closing-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #543658, #1a1527 64%, #0d1019);
  animation: closing-screen-in 1400ms ease-in-out both;
}
.closing-copy h2 {
  margin: 0;
  font-size: clamp(3.5rem, 13vw, 9rem);
  color: #ffd5a3;
  text-shadow: 0 5px #624158, 0 15px 35px #f99b9555;

}
.closing.is-closing .closing-copy { display: none; }
.closing.is-closing .door-stage { display: grid; animation: passage-color 10s linear reverse both, closing-screen-out 1400ms ease-in-out 14200ms both; }
.closing.is-closing .door-camera { width: min(48svh, 70vw, 390px); animation: back-through-door 15650ms ease-in-out both; }
.closing.is-closing .door-leaf { animation: shut-door 6500ms ease-in-out 7200ms both; }
@keyframes back-through-door {
  0% { opacity: .4; transform: translateZ(670px); }
  20% { opacity: 1; }
  43%,100% { opacity: 1; transform: translateZ(0); }
}
@keyframes shut-door { from { transform: rotateY(106deg); } to { transform: rotateY(0); } }

.closing-copy h2 span {
  display: inline-block;
  animation: word-drop 1700ms cubic-bezier(.22,.64,.33,1) 1200ms both;
}
.closing-copy h2 span:nth-child(2) { animation-delay: 2050ms; }
@keyframes closing-screen-out { to { opacity: 0; } }
@keyframes closing-screen-in { from { opacity: 0; } to { opacity: 1; } }

.closing-copy { isolation: isolate; padding: 18px; }
.closing-copy::before,.closing-copy::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}
.closing-copy::before {
  inset: -32%;
  background: radial-gradient(ellipse at 27% 72%, #f17a5578, transparent 37%),
    radial-gradient(ellipse at 70% 28%, #9869ff8c, transparent 39%),
    radial-gradient(ellipse at 78% 85%, #2aacc46b, transparent 31%);
  animation: contact-glow-drift 10s ease-in-out infinite alternate;
}
.closing-copy::after {
  inset: -18%;
  background: repeating-radial-gradient(ellipse at center,transparent 0 42px,#ebbaff49 44px,transparent 47px 88px);
  mask-image: radial-gradient(ellipse,transparent 15%,#000 48%,transparent 75%);
  animation: contact-ring-drift 7s ease-in-out infinite alternate;
}
.closing-message { width: min(100%, 950px); }
.closing-copy h2 { font-size: clamp(3rem,11vw,8rem); }
.closing-subtitle {
  margin-top: 10px;
  font-weight: 750;
  font-size: clamp(1.3rem,4vw,3.35rem);
  line-height: 1.35;
}
.closing-subtitle span {
  display: inline-block;
  color: #e5baff;
  background: linear-gradient(120deg,#ffdf8d,#fface4 55%,#a4dfff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: word-drop 1550ms cubic-bezier(.22,.64,.33,1) both;
  animation-delay: calc(3200ms + var(--phrase-step) * 520ms);
}
.closing-home { margin-top: 26px; animation: action-drop 900ms ease-out 6350ms both; }

.closing-copy { padding-bottom: 92px; }
.closing-home {
  position: absolute;
  bottom: calc(56px + env(safe-area-inset-bottom));
  inset-inline: 0;
  width: max-content;
  margin: 0 auto;
}

@media (max-width: 650px) and (orientation: portrait) {
  .intro-action { bottom: calc(62px + env(safe-area-inset-bottom)); }
}

@media (max-width: 650px) and (orientation: portrait) {
  .entry-about {
    background: linear-gradient(155deg,#0c2430,#15182a 58%,#292043);
  }
  .entry-about::before {
    inset: -10%;
    background: repeating-radial-gradient(ellipse at 20% 22%, transparent 0 24px,#82ffc443 25px 26px,transparent 27px 40px);
    mask-image: linear-gradient(140deg,#000,transparent 65%);
    animation: mobile-swell 10s ease-in-out infinite alternate;
  }
  .entry-about::after {
    background: radial-gradient(ellipse at 35% 25%, hsl(var(--glow-hue) 85% 57% / .48), transparent 40%),
      radial-gradient(ellipse at 60% 68%, #744de165, transparent 35%);
    animation: mobile-drift 12s ease-in-out infinite alternate, aurora-color 26s linear infinite;
  }
  #main-portfolio::before {
    background: radial-gradient(ellipse at 85% 17%, #8454df65, transparent 40%),
      radial-gradient(ellipse at 12% 52%,#ee7d454b,transparent 38%),
      repeating-linear-gradient(125deg,transparent 0 58px,#e3b1ff23 59px,transparent 60px 68px);
    background-size: 140% 130%, 150% 140%, 200px 200px;
  }
  .skills-stage { background: linear-gradient(150deg,#071d25,#0c332e 58%,#123443); }
  .skills-stage::before {
    background: repeating-radial-gradient(ellipse at 80% 22%,transparent 0 25px,#43ffd73f 26px,transparent 28px 47px),
      radial-gradient(ellipse at 68% 39%, #15857970, transparent 53%);
    animation: mobile-swell 11s ease-in-out infinite alternate;
  }
  .contact-stage { background: linear-gradient(145deg,#25132e,#331b33 55%,#171b37); }
  .contact-stage::before {
    background: radial-gradient(ellipse at 82% 32%,#ff5b9668,transparent 39%),
      radial-gradient(ellipse at 25% 72%,#7355ff70,transparent 42%);
    animation: mobile-drift 11s ease-in-out infinite alternate;
  }
  .closing-copy { background: radial-gradient(ellipse at 50% 58%,#39245c,#120d22 78%); }
  .closing-copy::before {
    background: conic-gradient(from 40deg, #0c1324, #8861e16b, #31c7d868, #d3579b70, #0c1324);
    mask-image: radial-gradient(ellipse, transparent 15%, #000 37%, transparent 68%);
    animation: mobile-orbit 18s linear infinite;
  }
}
@keyframes mobile-orbit { to { transform: rotate(360deg); } }
@keyframes mobile-scan { to { transform: translateY(58px); } }
@keyframes mobile-swell { to { transform: translate3d(4%,-5%,0) scale(1.15); } }
@keyframes mobile-drift { to { transform: translate3d(-13%,7%,0) scale(1.08); } }

.entry-about {
  background: radial-gradient(ellipse at 50% 36%,#282650,transparent 72%), #091420;
}
.entry-about::before {
  inset: -20%;
  background:
    repeating-radial-gradient(ellipse at 46% 30%, transparent 0 31px, #77ffe494 32px 33px, transparent 34px 63px),
    conic-gradient(from 25deg at 46% 30%, transparent, #a76bff8c 20%, transparent 37%, #39e7c28f 55%, transparent 68%, #ff67b879 82%, transparent);
  mask-image: radial-gradient(ellipse at 46% 34%, transparent 8%, #000 28%, #000 47%, transparent 70%);
  animation: mobile-about-trails 8s ease-in-out infinite alternate;
}
.entry-about::after {
  inset: -28%;
  background:
    radial-gradient(ellipse at 25% 25%, hsl(var(--glow-hue) 91% 61% / .64), transparent 38%),
    radial-gradient(ellipse at 72% 42%, hsl(calc(var(--glow-hue) + 62) 92% 61% / .57), transparent 34%),
    radial-gradient(ellipse at 47% 76%, #875bf16b, transparent 35%);
  animation: mobile-about-glow 9s ease-in-out infinite alternate, aurora-color 17s linear infinite;
}
.entry-about .about-copy {
  background: linear-gradient(150deg,#10182cee,#201732ed);
}
@keyframes mobile-about-trails {
  from { transform: translate3d(-8%,1%,0) rotate(-11deg) scale(.96); }
  to { transform: translate3d(6%,-6%,0) rotate(14deg) scale(1.12); }
}
@keyframes mobile-about-glow {
  from { transform: translate3d(-8%,-3%,0) rotate(-9deg); }
  to { transform: translate3d(9%,4%,0) rotate(12deg) scale(1.1); }
}

.work-showcase,.contact-stage { min-height: 100svh; }

#skills-title > span {
  display: inline-block;
  color: #b8fff1;
  background: linear-gradient(110deg,#8bffd8,#b9b1ff 43%,#ffb2df 69%,#ffe3a0);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: work-heading-float 4s ease-in-out infinite;
}

.whatsapp-float {
  position: fixed;
  z-index: 10;
  right: max(19px, env(safe-area-inset-right));
  bottom: calc(19px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #70ef9c;
  border-radius: 50%;
  background: #087d45;
  color: #fff;
  box-shadow: 0 7px 24px #03180c9c;
  transition: transform 180ms ease, background-color 180ms ease;
}
.whatsapp-float svg { width: 29px; height: 29px; }
.whatsapp-float:hover { transform: translateY(-3px); background: #09693d; }
@media (max-width: 420px) {
  .whatsapp-float { right: max(10px, env(safe-area-inset-right)); width: 46px; height: 46px; }
  .whatsapp-float svg { width: 25px; height: 25px; }
  body:has(.closing:not([hidden])) .whatsapp-float { bottom: calc(94px + env(safe-area-inset-bottom)); }
}

.whatsapp-float { animation: whatsapp-pulse 2.7s ease-in-out infinite; }
@keyframes whatsapp-pulse {
  0%,100% { scale: 1; }
  50% { scale: 1.14; box-shadow: 0 7px 26px #2fde7780; }
}
