@font-face {
  font-family: "Montserrat Variable";
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --background: #101010;
  --component-bg: #141414;
  --sec: #a476ff;
  --white: #dfdfdf;
  --white-icon: #f3f3f398;
  --white-icon-tr: #f3f3f310;
}
* { font-family: "Montserrat Variable", -apple-system, system-ui, sans-serif; box-sizing: border-box; padding: 0; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--background); color: var(--white); padding: 0 2.25rem; overflow-x: hidden; }
::selection { background: var(--sec); color: var(--background); }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
svg { display: block; }
.wrap { max-width: 64rem; margin: 0 auto; }

/* ---------- nav ---------- */
.nav-wrap { display: flex; justify-content: center; width: 100%; }
#main-nav {
  position: fixed; left: 50%; top: 1.5rem; z-index: 100;
  width: 80%; transform: translateX(-50%);
  background: var(--background); border: 1px solid transparent;
  transition: background-color .5s ease, border-radius .5s ease, border-color .5s ease, width .7s cubic-bezier(.22,1,.36,1);
}
#main-nav.scrolling { background: var(--component-bg); border-color: #ffffff10; border-radius: 9999px; width: min(528px, 80%); }
#main-nav ul { display: flex; justify-content: center; gap: 3rem; padding: .75rem; }
#main-nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem;
  color: var(--white-icon); font-size: 1rem; transition: color .2s;
}
#main-nav a:hover, #main-nav a.active { color: #fff; }
#main-nav a svg { display: none; width: 24px; height: 24px; }
#main-nav .dot {
  position: absolute; left: -1.5rem; top: 50%; width: .5rem; height: .5rem; border-radius: 50%;
  background: #a9ff5b; transform: translateY(-50%) scale(0); opacity: 0; transition: all .3s;
}
#main-nav a.active .dot { transform: translateY(-50%) scale(1); opacity: 1; }

/* ---------- hero ---------- */
.hero { padding: 0 0 3.5rem; margin-top: 3rem; display: flex; flex-direction: column; gap: 2rem; }
.lead { font-size: 1rem; color: var(--white-icon); }
.hero-row { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
h1 { font-size: clamp(2.25rem, 12vw, 3rem); line-height: 1; font-weight: 500; text-wrap: pretty; color: var(--white); }
.sub { font-size: 1rem; color: var(--white-icon); }
.icons { display: flex; gap: .5rem; padding-top: .75rem; }
.icon-btn {
  color: var(--white-icon); border: 1px solid var(--white-icon-tr); padding: .75rem; border-radius: .75rem;
  background: #1414149c; transition: all .3s ease-in-out;
}
.icon-btn:hover { color: #fff; background: var(--white-icon-tr); }
.icon-btn svg { width: 2rem; height: 2rem; }

.shiny-sec {
  background: linear-gradient(135deg, #a476ff 25%, #eee5ff 50%, #a476ff 75%); background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 3s linear infinite;
}
.shiny-white { color: var(--white-icon); }
@keyframes shine { 0% { background-position: 100% 50%; } 30%, 70% { background-position: 0% 50%; } }

/* logo wall */
.wall { position: relative; overflow: hidden; padding: 2rem 0; }
.wall::before, .wall::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8rem; z-index: 2; pointer-events: none; }
.wall::before { left: 0;  background: linear-gradient(90deg, var(--background), transparent); }
.wall::after  { right: 0; background: linear-gradient(270deg, var(--background), transparent); }
.wall-track { display: flex; width: max-content; animation: scroll 60s linear infinite; will-change: transform; }
.wall-item { display: flex; align-items: center; gap: .5rem; padding-right: 3rem; }
.wall-item img { height: 1.75rem; width: auto; opacity: .6; transition: transform .3s; }
.wall-item:hover img { transform: scale(1.1); }
.wall-item span { font-size: 1.125rem; font-weight: 500; color: var(--white-icon); white-space: nowrap; }
@keyframes scroll { to { transform: translate3d(-50%, 0, 0); } }

/* skills */
.hero-bottom { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.skills { padding-top: .75rem; text-align: left; width: 100%; }
.skills h3 { font-size: 1.875rem; font-weight: 600; color: var(--white); }
.skills ul { margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; font-size: 1.125rem; }
.skill { width: 100%; background: #1414149c; border: 1px solid var(--white-icon-tr); border-radius: 1rem; overflow: hidden; cursor: pointer; transition: background .2s; }
.skill:hover { background: #1c1c1c; }
.skill .head { display: flex; align-items: center; gap: .75rem; padding: 1rem; }
.skill .head > svg { width: 24px; height: 24px; color: var(--sec); flex: none; }
.skill .name { flex: 1; color: var(--white); font-size: 1.125rem; }
.skill .chev { width: 24px; height: 24px; color: var(--white); transition: transform .3s; flex: none; }
.skill.open .chev { transform: rotate(180deg); }
.skill .body { max-height: 0; opacity: 0; padding: 0 1rem; transition: all .3s; font-size: .875rem; color: var(--white-icon); }
.skill.open .body { max-height: 500px; opacity: 1; padding-bottom: 1rem; }
.skill .body li { display: flex; gap: .75rem; padding: .25rem 0 .25rem .25rem; }
/* glitch-letter background behind "What I do?" */
.hero-bottom { position: relative; isolation: isolate; padding: 3rem 0 3.5rem; }
#glitch {
  position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; height: 100%;
  transform: translateX(-50%); pointer-events: none;
  opacity: 0; transition: opacity 1.8s cubic-bezier(.22, 1, .36, 1);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 35%, transparent 100%);
}
#glitch.on { opacity: .5; }
.skill { backdrop-filter: none; background: #141414d9; }

/* scroll reveals */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s cubic-bezier(.22,1,.36,1) var(--d, 0s), transform 1s cubic-bezier(.22,1,.36,1) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

.resume {
  display: inline-flex; align-items: center; gap: .5rem; margin-left: .5rem; padding: 0 1.25rem; border-radius: .75rem;
  border: 1px solid var(--white-icon-tr); background: #1414149c; color: var(--white); font-weight: 500; transition: all .3s;
}
.resume:hover { background: var(--white-icon-tr); }
.resume svg { width: 1.25rem; height: 1.25rem; }
.resume.wide { justify-content: center; margin: 0; padding: .5rem 1rem; border-radius: .5rem; }

/* ---------- sections ---------- */
.block { padding: 3rem 0; border-top: 1px solid #ffffff10; }
.eyebrow { font-size: 1.125rem; font-weight: 400; margin-bottom: .5rem; display: inline-block; }
.title { font-size: 2.25rem; font-weight: 500; color: var(--white); margin-bottom: 2rem; }

/* experience */
.timeline { display: flex; flex-direction: column; gap: 2.5rem; position: relative; padding-left: 1.5rem; --p: 0; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: calc(-1.5rem - 5px); top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: #3a3a3a; transition: background .6s, box-shadow .6s, transform .6s; }
.timeline li.lit::before { background: var(--sec); box-shadow: 0 0 0 5px #a476ff22, 0 0 18px #a476ff88; transform: scale(1.15); }
.when { font-size: .875rem; color: var(--sec); }
.timeline h4 { font-size: 1.5rem; font-weight: 600; margin-top: .25rem; }
.where { color: var(--white); margin: .15rem 0 .5rem; }
.timeline p:last-child { color: var(--white-icon); line-height: 1.6; max-width: 46rem; }

/* projects */
.grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.card { display: block; }
.shot {
  position: relative; border-radius: 1rem; overflow: hidden; margin-bottom: 1rem; height: 12rem;
  display: flex; align-items: flex-end; padding: 1.25rem; border: 1px solid var(--white-icon-tr);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.5); transition: box-shadow .3s;
}
.shot::before { content: ''; position: absolute; inset: 0; transition: transform .3s; background: var(--bg); }
.card:hover .shot::before { transform: scale(1.05); }
.shot .tag { position: relative; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #ffffffb0; }
.shot .big { position: relative; font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.shot .stack { position: relative; margin-left: auto; align-self: flex-start; font-size: .75rem; color: #ffffff99; text-align: right; max-width: 55%; }
.shot > div { position: relative; }
.meta { display: flex; align-items: center; padding: 0 .75rem; }
.meta .grow { flex: 1; }
.meta h4 { font-size: 1.5rem; font-weight: 600; }
.meta .status { font-size: .875rem; color: var(--white-icon); }
.btns { display: flex; gap: .5rem; margin-left: auto; }
.btns a {
  width: 3.5rem; height: 3.5rem; display: flex; align-items: center; justify-content: center;
  color: var(--white-icon); border: 1px solid var(--white-icon-tr); padding: .75rem; border-radius: .75rem;
  background: #1414149c; transition: all .3s ease-in-out;
}
.btns a:hover { color: #fff; background: var(--white-icon-tr); }
.btns svg { width: 1.75rem; height: 1.75rem; }
.more {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 2.25rem;
  color: var(--white-icon); border: 1px solid var(--white-icon-tr); padding: .75rem; border-radius: 9999px;
  background: #1414149c; transition: all .3s ease-in-out;
}
.more:hover { color: #fff; background: var(--white-icon-tr); transform: scale(1.05); }
.more svg { width: 1.5rem; height: 1.5rem; }

/* contact */
.two { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.muted { color: var(--white-icon); line-height: 1.6; }
.muted p { margin-bottom: 1rem; }
.loc { display: flex; gap: .5rem; flex-wrap: wrap; }
.loc b { color: var(--white); font-weight: 400; }
.loc a { color: var(--white); border-bottom: 1px solid var(--white-icon-tr); }
form { display: flex; flex-direction: column; gap: 1rem; }
input, textarea {
  padding: .5rem 1rem; background: #1414149c; color: var(--white); font-size: 1rem;
  border: 1px solid var(--white-icon-tr); border-radius: .5rem; resize: none;
}
input:focus, textarea:focus { outline: 2px solid var(--sec); }
button[type=submit] {
  padding: .5rem 1rem; background: var(--white-icon-tr); color: var(--white); border-radius: .5rem; cursor: pointer;
  opacity: .6; border: 1px solid var(--white-icon-tr); transition: opacity .2s; font-size: 1rem;
}
button[type=submit]:hover { opacity: 1; }

/* footer */
footer { border-top: 1px solid #ffffff10; padding: 3rem 0; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.foot .icons { gap: 2rem; padding: 0; }
.plain { color: var(--white-icon); transition: color .3s; }
.plain:hover { color: var(--white); }
.plain svg { width: 2rem; height: 2rem; }
.copy { color: var(--white-icon); font-size: .875rem; }

:focus-visible { outline: 2px solid var(--sec); outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (min-width: 640px) { body { padding: 0 7rem; } }
@media (min-width: 768px) {
  .hero { padding: 9rem 0 3.5rem; margin-top: 0; }
  h1 { font-size: 3.75rem; }
  .sub { font-size: 1.5rem; }
  .lead { font-size: 1.125rem; }
  .skills h3 { font-size: 2.25rem; margin-bottom: 1.5rem; }
  .skill { width: 400px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .shot { height: 18rem; }
  .title { font-size: 3rem; }
  .two { grid-template-columns: 1fr 1fr; }
  .wall-track { animation-duration: 50s; }
  .wall-item { padding-right: 5rem; }
}
@media (min-width: 1024px) {
  body { padding: 0 5rem; }
  .hero-row { flex-direction: row; align-items: center; gap: 2rem; }
  .hero-bottom { flex-direction: row; }
}
@media (max-width: 767px) {
  body { padding-bottom: 70px; }
  #main-nav { top: auto; bottom: 0; width: 100% !important; border-radius: 1rem 1rem 0 0; border-color: #ffffff10; background: var(--component-bg); }
  #main-nav.scrolling { border-radius: 1rem 1rem 0 0; }
  #main-nav ul { gap: 1.5rem; justify-content: space-between; }
  #main-nav li { flex: 1; }
  #main-nav a { font-size: .75rem; }
  #main-nav a svg { display: block; }
  #main-nav .dot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 430px) {
  body { padding-left: 1.25rem; padding-right: 1.25rem; }
  #main-nav ul { gap: .25rem; padding: .6rem .5rem; }
  #main-nav a { font-size: .66rem; }
  .meta { padding: 0 .25rem; gap: .5rem; }
  .meta h4 { font-size: 1.15rem; }
  .btns a { width: 2.75rem; height: 2.75rem; padding: .5rem; }
  .btns svg { width: 1.4rem; height: 1.4rem; }
  .shot { padding: 1rem; } .shot .big { font-size: 1.4rem; }
  .icons { flex-wrap: wrap; }
  .icon-btn svg { width: 1.6rem; height: 1.6rem; }
  .resume { margin-left: 0; padding: .6rem 1rem; }
  .title { font-size: 2rem; }
  .timeline h4 { font-size: 1.2rem; }
  .skill .head { padding: .85rem; } .skill .name { font-size: 1rem; }
}
.loc a { overflow-wrap: anywhere; }

/* ---------- laptop polish ---------- */
.hero { position: relative; }
.hero::before {
  content: ''; position: absolute; z-index: -1; top: -4rem; left: 50%; width: 80vw; max-width: 60rem; height: 28rem;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at center, #a476ff22, transparent 65%);
}
.card .shot { transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .3s; }
.card:hover .shot { transform: translateY(-4px); }
@media (min-width: 768px) {
  .block { padding: 5rem 0; }
  .timeline li { display: grid; grid-template-columns: 11rem 1fr; column-gap: 2rem; }
  .timeline li::before { top: .5rem; }
  .timeline .when { grid-row: 1 / span 3; padding-top: .35rem; }
  .timeline li > *:not(.when) { grid-column: 2; }
  .hero-bottom { padding: 4rem 0 5rem; }
}
@media (min-width: 1024px) {
  h1 { font-size: 4.5rem; }
  .hero { padding-top: 11rem; }
  .sub { max-width: 34rem; }
  .skill { width: 440px; }
  .grid { gap: 2.5rem; }
  .title { margin-bottom: 2.5rem; }
}
@media (min-width: 1440px) {
  .wrap { max-width: 70rem; }
  h1 { font-size: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  #glitch { transition: none; }
}

/* ---------- extra motion ---------- */
@keyframes up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.lead, .hero h1, .sub, .hero-text .icons { animation: up 1s cubic-bezier(.22,1,.36,1) both; }
.lead { animation-delay: .1s; } .hero h1 { animation-delay: .25s; } .sub { animation-delay: .4s; }
.hero-text .icons { animation-delay: .55s; }

.rot { display: inline-block; transition: opacity .35s ease, transform .35s ease; }
.rot.out { opacity: 0; transform: translateY(-10px); }

#progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 200; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, #a476ff, #eee5ff); }

.timeline::before, .timeline::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; }
.timeline::before { background: var(--white-icon-tr); }
.timeline::after { background: linear-gradient(#a476ff, #eee5ff); transform-origin: 0 0; transform: scaleY(var(--p)); box-shadow: 0 0 12px #a476ff88; }

.spot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), #a476ff2e, transparent 70%); }
.spot:hover::after { opacity: 1; }
.icon-btn:hover, .btns a:hover { transform: translateY(-3px); box-shadow: 0 10px 26px #a476ff33; }
.resume { position: relative; overflow: hidden; }
.resume::after { content: ''; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(110deg, transparent, #ffffff26, transparent); transition: transform .9s; }
.resume:hover::after { transform: translateX(120%); }
.card .shot { will-change: transform; }
.card:hover .shot { transform: none; }
@media (prefers-reduced-motion: reduce) { #progress { display: none; } .timeline::after { transform: scaleY(1); } }

/* ---------- animated intro ---------- */
.intro { font-size: clamp(1.25rem, 4.4vw, 2.75rem); line-height: 1.3; font-weight: 500; max-width: 56rem; letter-spacing: -.01em; }
.intro em { font-style: normal; }
.intro .w {
  display: inline-block; margin-right: .26em; color: #f3f3f326; opacity: .55; filter: blur(4px); transform: translateY(.3em);
  transition: color .7s ease, opacity .7s ease, filter .7s ease, transform .8s cubic-bezier(.22,1,.36,1);
}
.intro .w.on { color: var(--white); opacity: 1; filter: none; transform: none; }
.intro em .w.on { color: #b996ff; text-shadow: 0 0 24px #a476ff55; }
@media (prefers-reduced-motion: reduce) { .intro .w { color: var(--white); opacity: 1; filter: none; transform: none; } .intro em .w { color: #b996ff; } }
.intro .w.p { margin-left: -.26em; }

.rest { display: flex; flex-direction: column; gap: 2rem; padding: 2.5rem 0 3.5rem; }
.rest > .icons { padding-top: 0; }
@media (min-width: 768px) { .rest { padding: 3.5rem 0 4rem; } }

/* ---------- mobile fixes: tap targets and legibility ---------- */
@media (max-width: 767px) {
  #main-nav a { font-size: .7rem; padding: .15rem 0; }
  .loc a { display: inline-flex; align-items: center; min-height: 44px; }
  .loc { align-items: center; }
  button[type=submit], .resume.wide { min-height: 46px; display: flex; align-items: center; justify-content: center; }
  button[type=submit] { opacity: .85; }
  .foot .icons { gap: .5rem; }
  .plain { padding: .6rem; }
  .copy a { display: inline-block; padding: .65rem .25rem; }
  .foot { gap: .5rem; }
  .skill .head { min-height: 52px; }
}
@media (max-width: 340px) {
  #main-nav a { font-size: .62rem; }
  #main-nav ul { padding: .5rem .25rem; }
}
.copy { text-align: center; }

/* ---------- nav hover: sliding glass highlight ---------- */
#main-nav ul { position: relative; }
#main-nav li { position: relative; z-index: 1; }
.hl {
  position: absolute; top: 50%; left: 0; width: 0; height: calc(100% - 1rem); z-index: 0;
  border-radius: 9999px; pointer-events: none; opacity: 0; transform: translateY(-50%);
  background: linear-gradient(135deg, #a476ff3d, #a476ff14);
  border: 1px solid #a476ff4d; box-shadow: 0 0 24px #a476ff33, inset 0 1px 0 #ffffff14;
  transition: left .5s cubic-bezier(.22,1,.36,1), width .5s cubic-bezier(.22,1,.36,1), opacity .35s ease;
}
#main-nav a { transition: color .25s, transform .35s cubic-bezier(.22,1,.36,1), text-shadow .35s; }
#main-nav a:hover { transform: translateY(-2px); text-shadow: 0 0 18px #a476ffaa; }
#main-nav a:hover .dot { transform: translateY(-50%) scale(1); opacity: 1; background: #a476ff; }
#main-nav a.active .dot { background: #a9ff5b; }
@keyframes navpop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-4px) scale(1.25); } 70% { transform: translateY(0) scale(.94); } 100% { transform: none; } }
#main-nav a:hover svg, #main-nav a.active svg { animation: navpop .55s cubic-bezier(.22,1,.36,1); }
@media (max-width: 767px) {
  .hl { height: calc(100% - .6rem); }
  #main-nav a:hover { transform: none; text-shadow: none; }
}

/* =====================================================
   LIQUID GLASS
   ===================================================== */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); }

/* drifting colour orbs for the glass to pick up */
.liquid { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.liquid i { position: absolute; border-radius: 50%; will-change: transform; }
.liquid i:nth-child(1) { width: 60vmax; height: 60vmax; left: -20vmax; top: -12vmax; background: radial-gradient(circle, #a476ff45, transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.liquid i:nth-child(2) { width: 55vmax; height: 55vmax; right: -24vmax; top: 28vh; background: radial-gradient(circle, #4f8cff33, transparent 65%); animation: drift2 32s ease-in-out infinite alternate; }
.liquid i:nth-child(3) { width: 50vmax; height: 50vmax; left: 8vw; bottom: -26vmax; background: radial-gradient(circle, #ff6ac12e, transparent 65%); animation: drift3 29s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-20vmax, -12vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(14vmax, -18vmax) scale(1.15); } }

/* glass material */
#main-nav, .icon-btn, .btns a, .more, .skill {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.04);
  border-color: transparent;
}
#main-nav { position: fixed; overflow: visible; }
#main-nav, .icon-btn, .skill, .more { -webkit-backdrop-filter: blur(16px) saturate(1.7); backdrop-filter: blur(16px) saturate(1.7); }
#main-nav.scrolling { background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.05)); border-color: transparent; }

/* specular rim light */
#main-nav::before, .icon-btn::before, .btns a::before, .more::before, .skill::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.05) 38%, rgba(255,255,255,.04) 62%, rgba(255,255,255,.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* light that follows the pointer */
#main-nav::after, .icon-btn::after, .btns a::after, .more::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(150px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.24), transparent 65%);
}
#main-nav:hover::after, .icon-btn:hover::after, .btns a:hover::after, .more:hover::after { opacity: 1; }
.spot::after { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.12), #a476ff1f 45%, transparent 75%); }
.skill .head, .skill .body { position: relative; z-index: 1; }

/* jelly press */
.icon-btn, .btns a, .more, button[type=submit] { transition: transform .6s var(--spring), box-shadow .3s, background-color .3s; }
.icon-btn:hover, .btns a:hover { transform: translateY(-3px) scale(1.07); box-shadow: 0 16px 36px rgba(0,0,0,.4), 0 0 28px #a476ff33, inset 0 1px 0 rgba(255,255,255,.32); }
.icon-btn:active, .btns a:active, .more:active, button[type=submit]:active { transform: scale(.9); transition-duration: .12s; }
.more:hover { transform: scale(1.03); }
.skill { transition: transform .6s var(--spring), background .3s; }
.skill:active { transform: scale(.985); transition-duration: .12s; }

/* tap ripple */
.ripple { position: absolute; z-index: 3; border-radius: 50%; pointer-events: none; transform: scale(0);
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 70%); animation: ripple .75s ease-out forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* the nav's sliding highlight, now glass with a springy overshoot */
.hl {
  background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 6px 22px rgba(164,118,255,.28);
  transition: left .65s cubic-bezier(.34,1.4,.64,1), width .65s cubic-bezier(.34,1.4,.64,1), opacity .35s;
}

/* materialise: blur to sharp */
.reveal { filter: blur(10px); transition: opacity 1s cubic-bezier(.22,1,.36,1) var(--d, 0s), transform 1s cubic-bezier(.22,1,.36,1) var(--d, 0s), filter 1s cubic-bezier(.22,1,.36,1) var(--d, 0s); }
.reveal.in { filter: none; }

/* glass form fields with a glow bloom */
input, textarea { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); transition: box-shadow .4s, background .4s, border-color .4s, transform .5s var(--spring); }
input:focus, textarea:focus { outline: none; background: rgba(255,255,255,.08); border-color: rgba(164,118,255,.7); box-shadow: 0 0 0 4px #a476ff2e, 0 0 32px #a476ff40; transform: translateY(-1px); }
button[type=submit] { background: linear-gradient(145deg, rgba(164,118,255,.55), rgba(164,118,255,.22)); border: 1px solid rgba(255,255,255,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); opacity: 1; }
button[type=submit]:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 28px #a476ff40; transform: translateY(-2px); }

/* floating glass tab bar on phones (iOS style) */
@media (max-width: 767px) {
  body { padding-bottom: 96px; }
  #main-nav, #main-nav.scrolling {
    left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px) !important;
    border-radius: 28px; transform: translateX(-50%);
  }
  #main-nav ul { padding: .55rem .4rem; }
  .hl { height: calc(100% - .5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .liquid i { animation: none; }
  .reveal { filter: none; }
}

/* logo strip edges: fade with a mask so the glass orbs show through */
.wall::before, .wall::after { display: none; }
.wall { -webkit-mask-image: linear-gradient(90deg, transparent, #000 7rem, #000 calc(100% - 7rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 7rem, #000 calc(100% - 7rem), transparent); }

/* nav: inner bubble follows the outer shape (concentric corners) */
@media (max-width: 767px) {
  #main-nav, #main-nav.scrolling { border-radius: 26px; }
  .hl { border-radius: 18px; }
}

/* curvy nav: pill on desktop (also before scrolling), soft rounded bar on phones */
#main-nav { border-radius: 9999px; border: 1px solid #ffffff1a; }
@media (max-width: 767px) {
  #main-nav, #main-nav.scrolling { border-radius: 30px; }
  .hl { border-radius: 22px; }
}

#main-nav .dot { display: none !important; }

/* smooth: constant nav width (no layout animation while scrolling), GPU-friendly */
#main-nav, #main-nav.scrolling { width: min(528px, 80%); transition: background-color .4s ease, border-color .4s ease; will-change: transform; }
@media (max-width: 767px) { #main-nav, #main-nav.scrolling { width: calc(100% - 24px) !important; } }
