/* =========================================================
   Amirul Ariff Portfolio
   Design system adapted from the "Product Designer Portfolio" Figma template
   (Lufga -> Urbanist, orange #FD853A, slate #344054)
   ========================================================= */

:root {
  --orange: #fd853a;
  --orange-600: #e8691b;
  --orange-soft: #feb273;
  --orange-tint: #ffeadb;
  --slate: #344054;
  --slate-900: #1d2939;
  --muted: #98a2b3;
  --muted-2: #667085;
  --gray-50: #f9fafb;
  --gray-100: #f2f4f7;
  --gray-200: #e4e7ec;
  --ink: #171717;
  --ink-2: #272727;
  --white: #ffffff;

  --bg: var(--white);
  --bg-soft: var(--gray-100);
  --text: var(--slate);
  --text-soft: var(--muted-2);
  --card: var(--white);
  --border: var(--gray-200);

  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 40px;
  --radius-pill: 999px;
  --shadow: 0 20px 50px -20px rgba(16, 24, 40, .18);
  --shadow-lg: 0 40px 80px -30px rgba(16, 24, 40, .35);
  --container: 1298px;
  --gutter: clamp(16px, 5vw, 71px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Urbanist", "Lufga", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --bg: #101011;
  --bg-soft: #1b1b1d;
  --text: #f2f4f7;
  --text-soft: #a5adbb;
  --card: #1b1b1d;
  --border: #2c2c30;
  --slate: #f2f4f7;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background .3s var(--ease), color .3s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -.02em; font-weight: 600; color: var(--slate); }
p { margin: 0; }
.accent { color: var(--orange); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--orange); color: #fff; padding: 10px 18px; border-radius: var(--radius-pill);
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-title { font-size: clamp(36px, 5vw, 64px); font-weight: 500; text-align: center; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head .section-title { text-align: left; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-soft); font-weight: 500; max-width: 62ch; }

/* ---------- Scroll progress ---------- */
.progress-bar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 32px; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  font-weight: 600; font-size: 18px; line-height: 1; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s, border-color .25s;
}
.btn svg { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-600); box-shadow: 0 14px 30px -12px rgba(253, 133, 58, .8); }
.btn-outline { border-color: var(--slate); color: var(--slate); background: transparent; }
.btn-outline:hover { background: var(--slate); color: var(--bg); }
.btn-sm { padding: 13px 24px; font-size: 16px; }
.btn-ghost-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }

.icon-btn {
  width: 58px; height: 58px; flex: none; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: var(--slate-900); color: #fff;
  transition: transform .3s var(--ease), background .3s;
}
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn:hover { background: var(--orange); transform: rotate(45deg); }
.icon-btn.orange { background: var(--orange); }

/* ---------- Header / nav (black pill) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; padding: 16px 0; transition: padding .3s var(--ease); }
.site-header.is-scrolled { padding: 8px 0; }
.nav-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--ink); border-radius: var(--radius-lg); padding: 10px;
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.6);
}
.nav-group { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-group.right { justify-content: flex-end; }
.nav-link {
  position: relative; color: #fff; font-size: 18px; font-weight: 400;
  padding: 18px 26px; border-radius: var(--radius-pill); transition: background .25s, color .25s;
}
.nav-link:hover { background: rgba(255,255,255,.08); }
.nav-link[aria-current="page"] { background: var(--orange); font-weight: 600; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: .06em; padding: 0 18px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none;
  box-shadow: 0 0 0 2px var(--orange); transition: transform .5s var(--ease);
}
.brand:hover .brand-mark { transform: scale(1.08); }
.nav-toggle { display: none; }

@media (max-width: 1240px) {
  .nav-link { padding: 16px 16px; font-size: 16px; }
}
@media (max-width: 1020px) {
  .nav-group { display: none; }
  .nav-pill { padding: 8px 8px 8px 10px; }
  .brand { padding: 0 6px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--orange); color: #fff;
    border-radius: var(--radius-pill); padding: 12px 18px; font-weight: 600;
  }
  .nav-toggle .bars { width: 20px; height: 14px; position: relative; }
  .nav-toggle .bars span { position: absolute; left: 0; width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .3s, top .3s; }
  .nav-toggle .bars span:nth-child(1) { top: 0; }
  .nav-toggle .bars span:nth-child(2) { top: 6px; }
  .nav-toggle .bars span:nth-child(3) { top: 12px; }
  .nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
}
.mobile-menu {
  display: none; margin-top: 10px; background: var(--ink); border-radius: var(--radius); padding: 12px;
  transform-origin: top; animation: drop .35s var(--ease);
}
.mobile-menu.open { display: grid; gap: 4px; }
.mobile-menu .nav-link { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .nav-link small { color: var(--muted); font-size: 13px; }
@keyframes drop { from { opacity: 0; transform: scaleY(.9) translateY(-8px); } to { opacity: 1; transform: none; } }
@media (min-width: 1021px) { .mobile-menu { display: none !important; } }

/* ---------- Hello badge + scribbles ---------- */
.hello {
  position: relative; display: inline-block; border: 1px solid var(--slate-900); color: var(--slate-900);
  font-weight: 500; font-size: 20px; padding: 8px 22px; border-radius: var(--radius-pill);
}
:root[data-theme="dark"] .hello { border-color: #fff; color: #fff; }
.scribble { position: absolute; color: var(--orange); pointer-events: none; }
.hello .scribble { width: 34px; right: -34px; top: -26px; }

/* ---------- Home hero ---------- */
.hero { position: relative; text-align: center; padding-top: 40px; overflow: hidden; }
.hero .container { position: relative; }
.hero h1 { font-size: clamp(44px, 7.4vw, 96px); font-weight: 600; margin-top: 18px; line-height: 1.02; }
.hero h1 .name { color: var(--orange); }
.hero h1 .role { display: block; }
.typed-caret { display: inline-block; width: 4px; height: .85em; background: var(--orange); margin-left: 6px; vertical-align: -.05em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-stage { position: relative; height: clamp(420px, 46vw, 600px); margin-top: -40px; }
.hero-arc {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(680px, 92vw); aspect-ratio: 2 / 1; border-radius: 680px 680px 0 0; background: var(--orange-soft);
}
.hero-photo { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 96%; width: auto; z-index: 1; filter: drop-shadow(0 30px 40px rgba(0,0,0,.18)); }
.hero-side { position: absolute; top: 18%; max-width: 300px; text-align: left; z-index: 2; }
.hero-side.left { left: var(--gutter); top: 34%; }
.hero-side.right { right: var(--gutter); text-align: right; top: 34%; }
.hero-side .quote-icon { width: 36px; height: 30px; color: var(--slate); margin-bottom: 18px; }
.hero-side p { font-weight: 500; font-size: 19px; color: var(--slate); }
.hero-side .big { font-size: clamp(32px, 3.4vw, 47px); font-weight: 600; color: var(--slate); line-height: 1; }
.hero-side .stars { display: flex; gap: 4px; justify-content: flex-end; color: var(--orange); margin-bottom: 16px; }
.hero-side .stars svg { width: 30px; height: 30px; }
.hero-cta {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 3;
  display: flex; padding: 10px; gap: 6px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.hero-cta a { white-space: nowrap; padding: 20px 30px; border-radius: var(--radius-pill); font-size: 22px; font-weight: 500; color: #fff; display: inline-flex; gap: 10px; align-items: center; transition: background .3s var(--ease); }
.hero-cta a svg { width: 24px; height: 24px; }
.hero-cta a.on, .hero-cta:not(:hover) a:first-child { background: var(--orange); }
.hero-cta:hover a:hover { background: var(--orange); }
.hero .scribble.s2 { left: 22%; top: 46%; width: 56px; }
@media (max-width: 900px) {
  .hero-side { position: static; max-width: none; text-align: center; margin: 0 auto 16px; }
  .hero-side.right { text-align: center; }
  .hero-side .stars { justify-content: center; }
  .hero-side .quote-icon { margin: 0 auto 10px; }
  .hero-sides { margin-top: 20px; }
  .hero-side.left { display: none; }
  .hero-side .stars svg { width: 22px; height: 22px; }
  .hero-side .stars { margin-bottom: 6px; }
  .hero-side p { font-size: 16px; }
  .hero-stage { margin-top: 10px; height: 440px; }
  .hero-cta a { padding: 14px 20px; font-size: 17px; }
  .hero .scribble.s2 { display: none; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { text-align: center; padding: 56px 0 24px; position: relative; }
.page-hero h1 { font-size: clamp(42px, 6.4vw, 88px); margin-top: 18px; }
.page-hero .lead { margin: 22px auto 0; }
.crumbs { display: flex; gap: 8px; justify-content: center; margin-top: 22px; font-size: 15px; color: var(--muted-2); }
.crumbs a:hover { color: var(--orange); }

/* ---------- Dark "services" style band ---------- */
.dark-band {
  position: relative; overflow: hidden; color: #fff; background: var(--ink); border-radius: var(--radius-lg);
  margin: 0 auto; isolation: isolate;
}
.dark-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .9;
  background:
    radial-gradient(600px 300px at 10% 15%, rgba(253,133,58,.35), transparent 60%),
    radial-gradient(500px 360px at 95% 90%, rgba(253,133,58,.3), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 26px);
}
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band .lead { color: #d0d5dd; }
.blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); background: radial-gradient(circle at 30% 30%, #ffd3b0, var(--orange) 55%, #c24f10); opacity: .85; animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(12px, -18px) rotate(12deg); } }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.service-card {
  position: relative; border-radius: 34px; overflow: hidden; min-height: 420px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .4s;
}
.service-card:hover { transform: translateY(-8px); border-color: var(--orange); }
.service-card h3 { font-size: 28px; font-weight: 500; padding: 30px 30px 24px; border-bottom: 1px solid rgba(255,255,255,.2); }
.service-card p { padding: 18px 30px 0; color: #d0d5dd; font-size: 16px; }
.service-shot {
  position: relative; margin: auto 0 0; height: 230px;
  -webkit-mask: radial-gradient(circle 52px at calc(100% - 58px) calc(100% - 58px), transparent 50px, #000 51px);
          mask: radial-gradient(circle 52px at calc(100% - 58px) calc(100% - 58px), transparent 50px, #000 51px);
}
.service-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 26px 26px 0 0; transition: transform .6s var(--ease); }
.service-card:hover .service-shot img { transform: scale(1.05); }
.service-card .icon-btn { position: absolute; right: 16px; bottom: 16px; }
@media (max-width: 980px) {
  .service-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(82%, 380px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .service-card { scroll-snap-align: start; }
}

/* ---------- Slider dots ---------- */
.dots { display: flex; justify-content: center; gap: 10px; margin-top: 32px; }
.dots button { width: 15px; height: 15px; border-radius: 99px; border: 0; background: var(--gray-200); padding: 0; transition: width .35s var(--ease), background .35s; }
.dots button[aria-current="true"] { width: 60px; background: var(--orange); }
.dark-band .dots button { background: #fff; }
.dark-band .dots button[aria-current="true"] { background: var(--orange); }

/* ---------- Timeline (work experience) ---------- */
.timeline { position: relative; display: grid; grid-template-columns: 1fr 48px 1fr; column-gap: clamp(24px, 8vw, 150px); row-gap: 70px; margin-top: 64px; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 24px; bottom: 24px; border-left: 2px dashed var(--slate-900); transform: translateX(-1px); }
:root[data-theme="dark"] .timeline::before { border-color: #475467; }
.tl-left { text-align: left; }
.tl-left h3, .tl-right h3 { font-size: clamp(24px, 2.8vw, 40px); }
.tl-left .date { color: var(--muted); font-size: clamp(16px, 1.6vw, 24px); margin-top: 12px; display: block; }
.tl-left .where { color: var(--muted-2); font-size: 16px; margin-top: 6px; }
.tl-right p { color: var(--muted); font-weight: 500; font-size: 18px; margin-top: 12px; }
.tl-dot { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; border: 2px dashed var(--slate-900); background: var(--bg); display: grid; place-items: center; }
.tl-dot::after { content: ""; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); transition: transform .4s var(--ease); }
.tl-row:nth-child(even) .tl-dot::after, .tl-dot.navy::after { background: var(--slate-900); }
:root[data-theme="dark"] .tl-dot { border-color: #98a2b3; }
:root[data-theme="dark"] .tl-dot.navy::after { background: #98a2b3; }
.tl-row { display: contents; }
.tl-row:hover .tl-dot::after { transform: scale(1.18); }
.tl-details { margin-top: 14px; }
.tl-details summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; color: var(--orange); font-size: 16px; padding: 6px 0;
}
.tl-details summary::-webkit-details-marker { display: none; }
.tl-details summary svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.tl-details[open] summary svg { transform: rotate(45deg); }
.tl-details ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-soft); font-size: 16px; }
.tl-details li { margin: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip { background: var(--bg-soft); color: var(--slate); border-radius: var(--radius-pill); padding: 10px 20px; font-size: 15px; font-weight: 500; border: 1px solid transparent; }
.chip.sm { padding: 6px 14px; font-size: 13px; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 48px 1fr; column-gap: 18px; row-gap: 14px; }
  .timeline::before { left: 24px; }
  .tl-dot { grid-column: 1; grid-row: span 2; align-self: start; }
  .tl-left, .tl-right { grid-column: 2; }
  .tl-right { margin-bottom: 36px; }
  .tl-row .tl-left { order: 0; }
}

/* ---------- Why hire me ---------- */
.why { background: var(--bg-soft); border-radius: var(--radius-lg); display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; padding: clamp(32px, 6vw, 100px) clamp(20px, 5vw, 70px); }
.why-photo { position: relative; display: grid; place-items: end center; min-height: 480px; }
.why-photo::before { content: ""; position: absolute; left: 12%; right: 12%; top: 14%; bottom: 0; background: var(--orange-soft); border-radius: 120px 120px 60px 60px; }
.why-photo img { position: relative; max-height: 560px; width: auto; }
.why h2 { font-size: clamp(40px, 5vw, 64px); }
.why .lead { margin-top: 28px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 24px; margin: 40px 0 46px; }
.stat strong { display: block; font-size: clamp(32px, 3.2vw, 47px); color: var(--slate); font-weight: 600; line-height: 1; }
.stat span { color: var(--muted-2); font-size: 18px; margin-top: 8px; display: block; }
@media (max-width: 900px) { .why { grid-template-columns: 1fr; } .why-photo { min-height: 380px; } .why-photo img { max-height: 400px; } }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 calc(50% - 12px); scroll-snap-align: start; border-radius: 34px; overflow: hidden; position: relative; aspect-ratio: 633 / 371; background: var(--bg-soft); cursor: pointer; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.slide:hover img { transform: scale(1.06); }
.slide .slide-label { position: absolute; left: 24px; bottom: 16px; font-size: clamp(34px, 4.4vw, 64px); color: #fff; font-weight: 700; letter-spacing: -.03em; text-shadow: 0 4px 30px rgba(0,0,0,.45); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55)); }
.slide .slide-label { z-index: 1; }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--slate-900); display: grid; place-items: center; box-shadow: var(--shadow); transition: background .25s, color .25s, transform .25s; }
.carousel-nav:hover { background: var(--orange); color: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-nav svg { width: 26px; height: 26px; }
.carousel-nav.prev { left: -20px; }
.carousel-nav.next { right: -20px; }
.carousel-caption { text-align: center; max-width: 760px; margin: 34px auto 0; }
.carousel-caption .chips { justify-content: center; }
.carousel-caption h3 { font-size: clamp(28px, 3.4vw, 46px); margin-top: 40px; display: inline-flex; align-items: center; gap: 18px; }
.carousel-caption h3 .icon-btn { width: 52px; height: 52px; }
.carousel-caption p { color: var(--muted-2); margin-top: 20px; }
@media (max-width: 760px) { .slide { flex-basis: 88%; } .carousel-nav { display: none; } }

/* ---------- Achievements (testimonial-style dark glass cards) ---------- */
.glass-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.glass-card {
  position: relative; padding: 28px; border-radius: 24px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .4s var(--ease), background .4s;
}
.glass-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.11); }
.glass-card .gc-head { display: flex; gap: 14px; align-items: center; }
.glass-card .gc-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; flex: none; }
.glass-card .gc-icon svg { width: 26px; height: 26px; }
.glass-card h3 { font-size: 22px; font-weight: 600; }
.glass-card small { color: #d0d5dd; font-size: 14px; }
.glass-card p { color: #e4e7ec; margin-top: 18px; font-size: 16px; }
.glass-card .quote-mark { position: absolute; right: 22px; top: 18px; width: 56px; color: rgba(255,255,255,.12); }
.glass-card .rating { display: flex; gap: 4px; color: var(--orange); margin-top: 18px; align-items: center; font-weight: 600; }
.glass-card .rating svg { width: 22px; height: 22px; }
@media (max-width: 980px) { .glass-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .glass-row { grid-template-columns: 1fr; } }

/* ---------- Marquee band ---------- */
.marquee { background: var(--orange); color: #fff; overflow: hidden; padding: 34px 0; transform: rotate(-1.5deg); margin: 40px -20px; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; gap: 48px; font-size: clamp(26px, 3.4vw, 48px); font-weight: 600; white-space: nowrap; }
.marquee span svg { width: 40px; height: 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- CTA email bar ---------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(36px, 5vw, 64px); max-width: 820px; margin: 0 auto; line-height: 1.12; }
.email-bar {
  display: flex; align-items: center; gap: 12px; max-width: 832px; margin: 28px auto 0; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--card); box-shadow: var(--shadow);
}
.email-bar .ico { width: 58px; height: 58px; border-radius: 50%; background: var(--orange-tint); color: var(--orange); display: grid; place-items: center; flex: none; }
.email-bar .ico svg { width: 28px; height: 28px; }
.email-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; padding: 12px 4px; }
.trust { display: flex; justify-content: center; gap: clamp(18px, 6vw, 90px); flex-wrap: wrap; margin-top: 22px; color: var(--slate); font-size: 16px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 22px; height: 22px; color: var(--slate); }
@media (max-width: 560px) { .email-bar { border-radius: 26px; flex-wrap: wrap; } .email-bar .btn { width: 100%; } .email-bar .ico { display: none; } }

/* ---------- Blog / post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card .thumb { position: relative; aspect-ratio: 416 / 432; border-radius: 34px; overflow: hidden; }
.post-card .thumb > div, .post-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s var(--ease); }
.post-card:hover .thumb > div, .post-card:hover .thumb img { transform: scale(1.05); }
.post-card .thumb { -webkit-mask: radial-gradient(circle 52px at calc(100% - 58px) calc(100% - 58px), transparent 50px, #000 51px); mask: radial-gradient(circle 52px at calc(100% - 58px) calc(100% - 58px), transparent 50px, #000 51px); }
.post-card .wrap { position: relative; }
.post-card .icon-btn { position: absolute; right: 16px; bottom: 16px; }
.post-card .chip { display: inline-block; margin-top: 28px; }
.post-meta { display: flex; gap: 28px; margin-top: 22px; color: var(--muted-2); font-size: 16px; }
.post-meta span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 8px; vertical-align: middle; }
.post-card h3 { font-weight: 400; font-size: clamp(22px, 2vw, 28px); line-height: 1.3; margin-top: 18px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- Project grid + filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0 auto 40px; }
.filter { border: 1px solid var(--border); background: var(--card); padding: 12px 22px; border-radius: var(--radius-pill); font-weight: 500; font-size: 16px; color: var(--slate); transition: all .25s var(--ease); }
.filter:hover { border-color: var(--orange); color: var(--orange); }
.filter[aria-pressed="true"] { background: var(--orange); color: #fff; border-color: var(--orange); }
.filter .count { opacity: .7; margin-left: 6px; font-size: 13px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project-card { text-align: left; border: 0; padding: 0; background: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.project-card.is-hidden { display: none; }
.project-card.fade-in { animation: popin .45s var(--ease); }
@keyframes popin { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.project-card h3 { font-size: 24px; margin-top: 20px; }
.project-card p { color: var(--text-soft); font-size: 16px; margin-top: 10px; }
.cover { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.cover svg.big { width: 34%; height: auto; opacity: .95; filter: drop-shadow(0 20px 30px rgba(0,0,0,.25)); }
.cover .tag { position: absolute; left: 20px; top: 20px; font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.2); padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(6px); }
.cover-orange { background: linear-gradient(140deg, #ffb27d, #fd853a 55%, #c2510f); }
.cover-navy { background: linear-gradient(140deg, #475467, #1d2939 60%, #101828); }
.cover-purple { background: linear-gradient(140deg, #c4b5fd, #7c5cff 55%, #4c2fd1); }
.cover-green { background: linear-gradient(140deg, #6ee7b7, #12976a 55%, #065f46); }
.cover-amber { background: linear-gradient(140deg, #fde68a, #f5b301 55%, #b45309); }
.cover-pink { background: linear-gradient(140deg, #fbcfe8, #ec4899 55%, #9d174d); }
@media (max-width: 980px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }
.empty-state { text-align: center; color: var(--text-soft); padding: 40px 0; display: none; }

/* ---------- Modal + lightbox ---------- */
dialog { border: 0; padding: 0; background: transparent; max-width: min(920px, calc(100vw - 32px)); width: 100%; color: var(--text); }
dialog::backdrop { background: rgba(10,10,12,.7); backdrop-filter: blur(6px); }
dialog[open] { animation: modal-in .4s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-card { background: var(--card); border-radius: 30px; overflow: hidden; max-height: calc(100vh - 48px); overflow-y: auto; }
.modal-media { aspect-ratio: 16 / 7; overflow: hidden; }
.modal-media img, .modal-media .cover { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.modal-body { padding: clamp(22px, 4vw, 40px); }
.modal-body h2 { font-size: clamp(28px, 3.4vw, 40px); }
.modal-body .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; padding: 18px 0; border-block: 1px solid var(--border); }
.modal-body .meta small { color: var(--muted-2); display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.modal-body .meta strong { font-weight: 600; font-size: 16px; }
.modal-body ul { padding-left: 20px; color: var(--text-soft); }
.modal-body li { margin: 6px 0; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.modal-close svg { width: 22px; height: 22px; }
.modal-wrap { position: relative; }
@media (max-width: 560px) { .modal-body .meta { grid-template-columns: 1fr 1fr; } }

.lightbox { max-width: min(1100px, calc(100vw - 24px)); }
.lightbox figure { margin: 0; position: relative; }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 18px; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 14px; font-size: 16px; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev { left: 8px; }
.lightbox .lb-next { right: 8px; }

/* ---------- Gallery (KUKA) ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 6px; background: var(--bg-soft); border-radius: var(--radius-pill); flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 12px 22px; border-radius: var(--radius-pill); font-weight: 600; font-size: 16px; color: var(--muted-2); transition: background .25s, color .25s; }
.tab[aria-selected="true"] { background: var(--orange); color: #fff; }
.tab-panel[hidden] { display: none; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.gallery button { border: 0; padding: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 1; position: relative; background: var(--bg-soft); }
.gallery button.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery button:hover img { transform: scale(1.08); }
.gallery button::after { content: attr(data-caption); position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; text-align: left; color: #fff; font-size: 14px; font-weight: 500; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transform: translateY(8px); transition: all .3s var(--ease); }
.gallery button:hover::after, .gallery button:focus-visible::after { opacity: 1; transform: none; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.portrait-card { position: relative; border-radius: var(--radius-lg); background: var(--orange-soft); min-height: 560px; display: grid; place-items: end center; overflow: hidden; }
.portrait-card img { max-height: 540px; width: auto; position: relative; z-index: 1; }
.portrait-card .ring { position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.7); top: 40px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.float-badge { position: absolute; z-index: 2; background: var(--card); color: var(--slate); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 15px; font-weight: 600; display: flex; gap: 10px; align-items: center; animation: float 7s ease-in-out infinite; }
.float-badge svg { width: 22px; height: 22px; color: var(--orange); }
.float-badge.b1 { left: 18px; top: 40px; }
.float-badge.b2 { right: 18px; top: 44%; animation-delay: -2s; }
.float-badge.b3 { left: 26px; bottom: 60px; animation-delay: -4s; }
.about-copy h2 { font-size: clamp(36px, 4.4vw, 56px); }
.about-copy p { margin-top: 20px; color: var(--text-soft); }
.details-card { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; }
.details-card div { background: var(--card); padding: 18px 20px; }
.details-card small { display: block; color: var(--muted-2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.details-card strong { font-weight: 600; font-size: 17px; word-break: break-word; }
.details-card a:hover { color: var(--orange); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .portrait-card { min-height: 460px; } .portrait-card img { max-height: 440px; } }
@media (max-width: 480px) { .details-card { grid-template-columns: 1fr; } }

.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; margin-top: 50px; }
.journey li { list-style: none; position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 24px 20px; transition: transform .35s var(--ease), border-color .35s; }
.journey li:hover { transform: translateY(-6px); border-color: var(--orange); }
.journey li::before { counter-increment: step; content: "0" counter(step); display: block; font-size: 40px; font-weight: 700; color: var(--orange); line-height: 1; }
.journey h3 { font-size: 20px; margin-top: 14px; }
.journey small { color: var(--muted-2); font-weight: 600; }
.journey p { color: var(--text-soft); font-size: 15px; margin-top: 8px; }
.journey { padding: 0; }
@media (max-width: 680px) { .journey { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .journey { grid-template-columns: 1fr; } }

.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.flip { perspective: 1000px; height: 220px; border: 0; padding: 0; background: none; text-align: left; }
.flip-inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .7s var(--ease); transform-style: preserve-3d; }
.flip:hover .flip-inner, .flip:focus-visible .flip-inner, .flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.flip-front { background: var(--bg-soft); }
.flip-front svg { width: 40px; height: 40px; color: var(--orange); }
.flip-front h3 { font-size: 22px; margin-bottom: 4px; }
.flip-front > span { display: block; }
.flip-front small { color: var(--muted-2); font-size: 13px; }
.flip-back { background: var(--orange); color: #fff; transform: rotateY(180deg); font-size: 18px; line-height: 1.5; justify-content: center; }
@media (max-width: 980px) { .fact-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Education extras ---------- */
.edu-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.edu-card { background: var(--card); border: 1px solid var(--border); border-radius: 28px; padding: 28px; transition: transform .35s var(--ease), box-shadow .35s; }
.edu-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.edu-card .badge { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--orange-tint); color: var(--orange); }
.edu-card .badge svg { width: 30px; height: 30px; }
.edu-card h3 { font-size: 22px; margin-top: 18px; }
.edu-card p { color: var(--text-soft); font-size: 16px; margin-top: 8px; }
@media (max-width: 900px) { .edu-cards { grid-template-columns: 1fr; } }

.gpa-ring { --p: 0; width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--p) * 1%), var(--gray-200) 0); position: relative; flex: none; }
.gpa-ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--bg-soft); }
.gpa-ring span { position: relative; font-size: 38px; font-weight: 700; color: var(--slate); text-align: center; line-height: 1; }
.gpa-ring span small { display: block; font-size: 14px; font-weight: 500; color: var(--muted-2); margin-top: 4px; }
.highlight-panel { display: flex; gap: 40px; align-items: center; background: var(--bg-soft); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 60px); }
.highlight-panel h2 { font-size: clamp(30px, 3.6vw, 48px); }
.highlight-panel p { color: var(--text-soft); margin-top: 14px; }
@media (max-width: 760px) { .highlight-panel { flex-direction: column; text-align: center; } }

/* ---------- Qualities / skills ---------- */
.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.quality-grid .glass-card p { margin-top: 14px; }
.quality-grid .glass-card .proof { margin-top: 16px; font-size: 14px; color: var(--orange-soft); font-weight: 600; }
@media (max-width: 980px) { .quality-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .quality-grid { grid-template-columns: 1fr; } }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.skill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 16px; transition: transform .25s var(--ease), border-color .25s; }
.skill:hover { transform: translateY(-3px); border-color: var(--orange); }
.skill i { font-style: normal; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--orange-tint); color: var(--orange-600); }
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.cert { display: flex; gap: 20px; align-items: center; padding: 24px; border-radius: 26px; background: var(--card); border: 1px solid var(--border); }
.cert .badge { width: 70px; height: 70px; flex: none; border-radius: 20px; display: grid; place-items: center; background: var(--slate-900); color: var(--orange); }
.cert .badge svg { width: 34px; height: 34px; }
.cert h3 { font-size: 20px; }
.cert p { color: var(--text-soft); font-size: 15px; margin-top: 6px; }
@media (max-width: 760px) { .cert-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }
.contact-info { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 48px); position: relative; overflow: hidden; isolation: isolate; }
.contact-info h2 { color: #fff; font-size: clamp(30px, 3.4vw, 44px); }
.contact-info p { color: #d0d5dd; margin-top: 14px; }
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.contact-list .ci { width: 46px; height: 46px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; flex: none; }
.contact-list .ci svg { width: 22px; height: 22px; }
.contact-list small { display: block; color: #98a2b3; font-size: 13px; }
.contact-list a:hover { color: var(--orange-soft); }
.copy-btn { margin-left: auto; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.copy-btn:hover { background: #fff; color: var(--ink); }
.form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); }
.form h2 { font-size: clamp(28px, 3vw, 40px); }
.field { display: grid; gap: 8px; margin-top: 22px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea, .field select { width: 100%; padding: 16px 20px; border-radius: 18px; border: 1.5px solid var(--border); background: var(--bg); outline: 0; transition: border-color .25s, box-shadow .25s; font-size: 17px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(253,133,58,.18); }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #f04438; }
.field .err { color: #f04438; font-size: 14px; min-height: 1em; }
.field .hint { color: var(--muted-2); font-size: 13px; text-align: right; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.topic-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.topic-pills label { cursor: pointer; position: relative; }
.topic-pills input { position: absolute; opacity: 0; pointer-events: none; }
.topic-pills span { display: inline-block; padding: 10px 18px; border-radius: 99px; border: 1.5px solid var(--border); font-weight: 500; font-size: 15px; transition: all .2s; }
.topic-pills input:checked + span { background: var(--orange); color: #fff; border-color: var(--orange); }
.topic-pills input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.form .btn { margin-top: 28px; width: 100%; }
.form-success { display: none; text-align: center; padding: 30px 0; }
.form-success svg { width: 80px; height: 80px; color: var(--orange); margin: 0 auto; }
.form.sent .form-success { display: block; }
.form.sent .form-fields { display: none; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.faq { max-width: 860px; margin: 40px auto 0; display: grid; gap: 14px; }
.faq details { background: var(--bg-soft); border-radius: 22px; padding: 6px 24px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 19px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex: none; color: var(--orange); transition: transform .3s var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { color: var(--text-soft); padding-bottom: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); color: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 40px 0 26px; margin-top: 40px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 46px; border-bottom: 1px solid #475467; }
.footer-top h2 { color: #fff; font-size: clamp(36px, 5vw, 64px); }
.footer-main { display: grid; grid-template-columns: 2fr .8fr 1.2fr 1.6fr; gap: 30px; padding: 54px 0; border-bottom: 1px solid #475467; }
.footer-main h3 { color: var(--orange); font-size: 18px; font-weight: 600; margin-bottom: 22px; }
.footer-main ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 15px; }
.footer-main a:hover { color: var(--orange); }
.footer-main .about p { color: #e4e7ec; margin: 26px 0; font-size: 16px; max-width: 50ch; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: background .25s, transform .25s; }
.socials a:hover { background: var(--orange); transform: translateY(-3px); color: #fff; }
.socials svg { width: 20px; height: 20px; }
.footer-form { display: flex; border-radius: 12px; overflow: hidden; background: #fff; }
.footer-form input { flex: 1; min-width: 0; border: 0; padding: 14px; font-size: 15px; color: #1d2939; outline: 0; }
.footer-form button { border: 0; background: var(--orange); color: #fff; width: 50px; display: grid; place-items: center; }
.footer-form button svg { width: 22px; height: 22px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; font-size: 16px; color: #e4e7ec; }
@media (max-width: 980px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-main { grid-template-columns: 1fr; } }

/* ---------- Floating dock (theme, palette, top) ---------- */
.dock { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.dock button { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); transition: transform .25s var(--ease), background .25s; position: relative; }
.dock button:hover { background: var(--orange); transform: translateY(-2px); }
.dock svg { width: 22px; height: 22px; }
.dock .to-top { opacity: 0; pointer-events: none; transition: opacity .3s; }
.dock .to-top.show { opacity: 1; pointer-events: auto; }
.dock .to-top .ring { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); transform: rotate(-90deg); }
.dock .to-top .ring circle { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; }
.tooltip { position: absolute; right: 60px; top: 50%; transform: translateY(-50%) translateX(6px); background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 10px; font-size: 13px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .2s; }
.dock button:hover .tooltip, .dock button:focus-visible .tooltip { opacity: 1; transform: translateY(-50%); }
:root[data-theme="dark"] .dock button { background: #2c2c30; }

/* ---------- Command palette ---------- */
.palette { max-width: 620px; margin-top: 12vh; }
.palette-card { background: var(--card); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.palette-search svg { width: 22px; height: 22px; color: var(--muted-2); flex: none; }
.palette-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 19px; }
kbd { font-family: inherit; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted-2); }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette-list a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; }
.palette-list a small { margin-left: auto; color: var(--muted-2); font-size: 13px; }
.palette-list .pi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft); color: var(--orange); flex: none; }
.palette-list .pi svg { width: 18px; height: 18px; }
.palette-list li[aria-selected="true"] a { background: var(--orange); color: #fff; }
.palette-list li[aria-selected="true"] .pi { background: rgba(255,255,255,.2); color: #fff; }
.palette-list li[aria-selected="true"] small { color: #fff; }
.palette-foot { display: flex; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-2); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 99px; font-weight: 600; font-size: 15px; z-index: 150; opacity: 0; pointer-events: none; transition: all .35s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast svg { width: 20px; height: 20px; color: var(--orange); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 80px 0 40px; }
.nf h1 { font-size: clamp(100px, 20vw, 220px); color: var(--orange); line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

@media print {
  .site-header, .dock, .site-footer, .progress-bar, .marquee { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .dark-band, .contact-info { background: #fff !important; color: #000 !important; }
}

@media (max-width: 640px) {
  .dock { right: 12px; bottom: 12px; gap: 8px; }
  .dock button { width: 42px; height: 42px; }
  .dock svg { width: 18px; height: 18px; }
}

/* =========================================================
   Motion layer (assets/js/motion.js). Off for reduced motion.
   ========================================================= */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
.fit-contain { object-fit: contain !important; background: var(--bg-soft); }
.slide img.fit-contain, .thumb img.fit-contain { padding: 12px; }

/* Preloader (first visit per session) */
.preloader { display: none; }
.intro .preloader {
  position: fixed; inset: 0; z-index: 300; background: var(--ink); color: #fff;
  display: grid; place-items: center; animation: pre-fallback 0s 3.5s forwards;
  transition: clip-path 1s cubic-bezier(.76,0,.24,1);
  clip-path: inset(0 0 0 0);
}
.preloader.done { clip-path: inset(0 0 100% 0); }
.preloader-inner { display: flex; align-items: center; gap: 22px; }
.preloader .brand-mark { width: 72px; height: 72px; animation: spin-in 1.4s var(--ease); }
.preloader-count { font-size: clamp(80px, 16vw, 200px); font-weight: 800; letter-spacing: -.05em; line-height: 1; min-width: 3ch; }
.preloader-count::after { content: "%"; color: var(--orange); font-size: .4em; vertical-align: top; }
.preloader small { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); color: #98a2b3; letter-spacing: .3em; text-transform: uppercase; font-size: 13px; }
@keyframes spin-in { from { transform: scale(.4); opacity: 0; } }
@keyframes pre-fallback { to { visibility: hidden; } }

/* Page transition curtain */
.curtain { position: fixed; inset: 0; z-index: 250; background: var(--orange); pointer-events: none; transform: translateY(100%); visibility: hidden; }
.curtain::after { content: "AMIRUL"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: clamp(40px, 9vw, 120px); letter-spacing: .1em; }
.curtain.enter { visibility: visible; transform: translateY(0); transition: transform .5s cubic-bezier(.76,0,.24,1); }
.arriving .curtain { visibility: visible; transform: translateY(0); animation: curtain-out .7s .15s cubic-bezier(.76,0,.24,1) forwards; }
@keyframes curtain-out { 99% { visibility: visible; } to { transform: translateY(-100%); visibility: hidden; } }

/* Split words */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.split .wi { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1s cubic-bezier(.2,.9,.2,1); }
.split.words-in .wi { transform: none; }
.motion-on:not(.is-ready) .hero .split .wi, .motion-on:not(.is-ready) .page-hero .split .wi { transform: translateY(110%) rotate(4deg) !important; }

/* Hero entrance + parallax */
.motion-on .hero h1 { transform: translateY(var(--ty, 0px)); will-change: transform; }
.motion-on .hero-photo { transform: translateX(calc(-50% + var(--hx, 0px))) translateY(var(--hy, 0px)); transition: opacity 1.2s var(--ease) .5s, filter 1.2s .5s; }
.motion-on .hero-arc { transform: translateX(calc(-50% + var(--ax, 0px))) scale(var(--as, 1)); transform-origin: 50% 100%; }
.motion-on:not(.is-ready) .hero-photo { opacity: 0; filter: blur(12px); }
.motion-on .hero-arc { transition: clip-path 1.2s cubic-bezier(.76,0,.24,1) .2s; clip-path: inset(0 0 0 0 round 680px 680px 0 0); }
.motion-on:not(.is-ready) .hero-arc { clip-path: inset(100% 0 0 0 round 680px 680px 0 0); }
.motion-on .hero-cta { transition: opacity .8s .9s, translate .8s .9s var(--ease); }
.motion-on:not(.is-ready) .hero-cta { opacity: 0; translate: 0 30px; }
.motion-on .hello { transition: opacity .6s, scale .6s var(--ease); }
.motion-on:not(.is-ready) .hello { opacity: 0; scale: .6; }
.motion-on .hello .scribble { animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 50% { transform: rotate(14deg) scale(1.1); } }
[data-speed] { translate: 0 var(--py, 0px); }

/* Image wipe */
.motion-on .wipe { clip-path: inset(0 0 100% 0 round 34px); transition: clip-path 1.1s cubic-bezier(.76,0,.24,1); }
.motion-on .wipe.wiped { clip-path: inset(0 0 0 0 round 0px); }
.motion-on .wipe img { scale: 1.25; transition: scale 1.6s cubic-bezier(.2,.8,.2,1), transform .8s var(--ease); }
.motion-on .wipe.wiped img { scale: 1; }

/* Custom cursor */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [role=tab], .has-cursor summary, .has-cursor label { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; border-radius: 50%; }
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--orange); transition: opacity .2s; }
.cursor-dot.hide { opacity: 0; }
.cursor-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; display: grid; place-items: center; }
.cursor-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--orange); transition: transform .35s var(--ease), background .35s, border-color .35s; }
.cursor-ring.hover::before { transform: scale(1.7); background: rgba(253,133,58,.12); }
.cursor-ring.down::before { transform: scale(.8); }
.cursor-ring.label::before { transform: scale(2.4); background: var(--orange); border-color: var(--orange); }
.cursor-ring span { position: relative; color: #fff; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; }
.cursor-ring.label span { opacity: 1; }

/* Magnetic */
.magnet { translate: var(--mx, 0px) var(--my, 0px); transition: translate .35s cubic-bezier(.2,.8,.2,1), background .25s, color .25s, box-shadow .25s, transform .25s; }

/* 3D tilt + glare */
.motion-on .tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; }
.motion-on .tilt.reveal:not(.in) { transform: translateY(36px); }
.motion-on .service-card.tilt::after, .motion-on .glass-card.tilt::after, .motion-on .edu-card.tilt::after, .motion-on .cert.tilt::after, .motion-on .journey li.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.18), transparent 45%);
}
.motion-on .tilt:hover::after { opacity: 1; }
.edu-card, .cert, .journey li { position: relative; }

/* Timeline draws itself */
.timeline::after { content: ""; position: absolute; left: 50%; top: 24px; bottom: 24px; width: 3px; transform: translateX(-1.5px) scaleY(var(--draw, 0)); transform-origin: top; background: linear-gradient(var(--orange), var(--orange-soft)); border-radius: 3px; }
.motion-off .timeline::after { display: none; }
@media (max-width: 760px) { .timeline::after { left: 24px; } }

/* Marquee driven by JS when motion is on */
.motion-on .marquee-track { animation: none; will-change: transform; }

/* Stagger children */
.motion-on .stagger > * { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease), translate .6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.motion-on .stagger.stagger-in > * { opacity: 1; translate: 0 0; }

/* Nav link hover underline sweep */
.nav-link::after { content: ""; position: absolute; left: 26px; right: 26px; bottom: 12px; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link[aria-current="page"]::after { display: none; }

/* Buttons: fill sweep */
.btn-outline { position: relative; overflow: hidden; isolation: isolate; }
.btn-outline::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--slate); border-radius: inherit; transform: translateY(101%); transition: transform .45s var(--ease); }
.btn-outline:hover { background: transparent; }
.btn-outline:hover::before { transform: none; }

/* Little Dreamers image + video pair */
.media-duo { display: grid; grid-template-columns: 1.45fr 1fr; gap: 24px; align-items: stretch; margin-top: 32px; }
.media-duo figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.media-duo figcaption { color: var(--text-soft); font-size: 15px; }
.duo-img button { border: 0; padding: 0; border-radius: 28px; overflow: hidden; background: var(--bg-soft); flex: 1; display: block; cursor: zoom-in; }
.duo-img img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .7s var(--ease); }
.duo-img button:hover img { transform: scale(1.04); }
.duo-video video { width: 100%; height: auto; aspect-ratio: 9 / 13; object-fit: cover; border-radius: 28px; background: #000; display: block; }
.modal-video { width: min(100%, 320px); aspect-ratio: 9 / 13; object-fit: cover; border-radius: 20px; background: #000; display: block; margin: 0 0 24px; }
@media (max-width: 760px) { .media-duo { grid-template-columns: 1fr; } .duo-img img { aspect-ratio: 1; } }
