/* ==========================================================================
   Kyaw Zay Moore: Portfolio
   ========================================================================== */

:root {
  --bg: #0b0d10;
  --bg-2: #12161b;
  --card: #161b22;
  --line: #232a33;
  --text: #e7ecf2;
  --muted: #8a96a3;
  --accent: #7cf5c4;
  --accent-ink: #04120c;
  --accent-2: #8b9cff;
  --num: #ffb38a;
  --glow: rgba(124, 245, 196, .10);
  --glow-2: rgba(139, 156, 255, .10);
  --shadow: 0 30px 60px -24px rgba(0, 0, 0, .6);
  --nav-bg: rgba(11, 13, 16, .72);

  --radius: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-2: #eceff3;
  --card: #ffffff;
  --line: #dde2e8;
  --text: #0f141a;
  --muted: #5b6673;
  --accent: #0e9f6e;
  --accent-ink: #ffffff;
  --accent-2: #4f5fd6;
  --num: #c2571a;
  --glow: rgba(14, 159, 110, .10);
  --glow-2: rgba(79, 95, 214, .10);
  --shadow: 0 30px 60px -28px rgba(15, 20, 26, .25);
  --nav-bg: rgba(246, 247, 249, .78);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
.mono { font-family: var(--mono); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Progress & cursor glow ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 100;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform-origin: 0 50%; transform: scaleX(0);
}
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: 0;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity .4s;
}
body.has-pointer .cursor-glow { opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--line); background: transparent;
  transition: border-color .3s, background-color .3s, color .3s, transform .3s var(--ease);
  will-change: transform;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { box-shadow: 0 10px 30px -10px var(--accent); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted);
  transition: color .3s, border-color .3s, transform .5s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); transform: rotate(25deg); }
.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="light"] .i-moon { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px max(24px, calc((100vw - 1160px) / 2 + 24px));
  border-bottom: 1px solid transparent;
  transition: border-color .3s, padding .3s;
}
/* Blur lives on a pseudo-element: backdrop-filter on .nav itself would trap the fixed mobile menu inside the bar */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.nav.scrolled { border-bottom-color: var(--line); }
.logo { position: relative; z-index: 60; font-family: var(--mono); font-weight: 600; font-size: 17px; }
.menu-cv { display: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  position: relative; padding: 8px 12px; font-size: 14px; color: var(--muted);
  border-radius: 8px; transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.burger { display: none; width: 40px; height: 40px; position: relative; z-index: 60; }
.burger span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .35s var(--ease), opacity .2s, top .35s var(--ease);
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100vh - 69px); display: flex; align-items: center;
  padding: 80px 0 110px; overflow: hidden;
  background:
    radial-gradient(640px 340px at 82% 18%, var(--glow), transparent 70%),
    radial-gradient(540px 320px at 8% 92%, var(--glow-2), transparent 70%);
}
.hero-grid {
  position: absolute; inset: -40px; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  animation: grid-pan 22s linear infinite;
}
@keyframes grid-pan { to { transform: translate(56px, 56px); } }

.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-inner > *, .about > *, .exp > *, .two-col > * { min-width: 0; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; background: var(--bg);
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.hero-name { font-size: clamp(48px, 8vw, 96px); line-height: .98; letter-spacing: -.035em; font-weight: 700; }
.split { display: inline-block; }
.split .ch {
  display: inline-block; opacity: 0; transform: translateY(60%) rotate(6deg);
  animation: rise .9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 40ms + 150ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

.roles { font-size: clamp(17px, 2vw, 21px); margin: 20px 0 22px; color: var(--muted); min-height: 1.6em; }
.roles b { color: var(--accent); font-weight: 600; }
.caret {
  display: inline-block; width: 10px; height: 1.1em; margin-left: 3px; vertical-align: -3px;
  background: var(--accent); animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lead { color: var(--muted); max-width: 500px; font-size: 17px; }
.cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.hero-visual { position: relative; perspective: 1000px; }
.profile-chip {
  position: absolute; left: -28px; bottom: -30px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 7px; border-radius: 14px; font-size: 12.5px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.profile-chip img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.profile-chip b { display: block; font-size: 13.5px; }
.profile-chip span { color: var(--muted); }
@keyframes float { 50% { transform: translateY(-8px); } }

.term {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transform-style: preserve-3d; transition: transform .25s ease-out;
}
.term-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.term-head .path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-head .method {
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  padding: 2px 7px; border-radius: 4px; font-weight: 600;
}
.term-head .ok { margin-left: auto; white-space: nowrap; color: var(--muted); transition: color .3s; }
.term-head .ok.done { color: var(--accent); }
.term pre {
  padding: 18px 20px; font-size: 13.5px; line-height: 1.75; min-height: 234px;
  white-space: pre-wrap; word-break: break-word;
}
.term pre .line { display: block; animation: line-in .35s var(--ease) both; }
@keyframes line-in { from { opacity: 0; transform: translateX(-8px); } }
.tk-key { color: var(--accent-2); }
.tk-str { color: var(--accent); }
.tk-num { color: var(--num); }
.tk-p { color: var(--muted); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.scroll-hint span { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 110px 0; border-top: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-size: 13.5px; margin-bottom: 12px; }
h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; }
h2 em { font-style: normal; color: var(--accent); }

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

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
.about-right p { color: var(--muted); margin-bottom: 16px; font-size: 16.5px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 30px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 16px;
  transition: border-color .3s, transform .4s var(--ease);
}
.stat:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat b { display: block; font-size: 36px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.stat b i { font-style: normal; color: var(--accent); }
.stat small { color: var(--muted); font-size: 12.5px; display: block; margin-top: 8px; line-height: 1.35; }
.about-photo {
  margin-top: 20px; width: 100%; max-width: 320px; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
  filter: grayscale(.35) contrast(1.05); transition: filter .5s;
}
.about-photo:hover { filter: none; }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.info li {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; overflow-wrap: anywhere;
}
.info small {
  display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 2px;
}
.info li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.info a { transition: color .2s; }
.info a:hover { color: var(--accent); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.svc {
  position: relative; overflow: hidden; padding: 26px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .35s, transform .45s var(--ease), box-shadow .45s var(--ease), opacity .8s var(--ease);
}
.svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 70%);
}
.svc:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-6px); box-shadow: 0 24px 44px -24px color-mix(in srgb, var(--accent) 45%, transparent); }
.svc:hover::before { opacity: 1; }
.svc-ic {
  position: relative; width: 44px; height: 44px; border-radius: 11px; margin-bottom: 18px;
  display: grid; place-items: center; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent);
  transition: transform .5s var(--ease);
}
.svc:hover .svc-ic { transform: rotate(-8deg) scale(1.08); }
.svc h3 { position: relative; font-size: 18px; margin-bottom: 8px; }
.svc p { position: relative; color: var(--muted); font-size: 14.5px; }

/* ---------- Skills ---------- */
.tabs { display: flex; gap: 8px; margin: 34px 0 28px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; color: var(--muted); transition: all .3s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--muted); }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.skill-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 56px; }
.skill-panel[hidden] { display: none; }
.skill-panel.active .skill { animation: fade-up .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }
.skill-row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 9px; }
.pct { color: var(--muted); font-size: 13px; }
.track { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.fill {
  height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 1.4s var(--ease);
}

.marquee {
  margin-top: 70px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 20px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-size: clamp(20px, 2.6vw, 28px); color: var(--muted); white-space: nowrap; padding-right: 32px;
  transition: color .25s;
}
.marquee-track span:hover { color: var(--text); }
.marquee-track span::after { content: "✦"; color: var(--accent); font-size: 14px; margin-left: 32px; vertical-align: 5px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Experience ---------- */
.exp { display: grid; grid-template-columns: 290px 1fr; gap: 56px; margin-top: 44px; }
.exp-side { position: sticky; top: 100px; align-self: start; }
.co-tabs { display: flex; flex-direction: column; gap: 4px; }
.co-tab {
  text-align: left; padding: 14px 16px; font-size: 15px; color: var(--muted);
  border-left: 2px solid var(--line); transition: all .35s var(--ease);
}
.co-tab small { display: block; font-size: 12px; margin-top: 2px; }
.co-tab:hover { color: var(--text); }
.co-tab.active {
  color: var(--text); border-left-color: var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent);
}
.co-tab.active small { color: var(--accent); }
.co-panel[hidden] { display: none; }
.co-panel.active { animation: fade-up .5s var(--ease) both; }
.co-about { color: var(--muted); margin-bottom: 28px; max-width: 680px; }

.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line);
}
.timeline::after {
  content: ""; position: absolute; left: 7px; top: 8px; width: 2px; height: calc((100% - 16px) * var(--p, 0));
  background: linear-gradient(var(--accent-2), var(--accent));
}
.role {
  position: relative; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s, opacity .8s var(--ease), transform .8s var(--ease);
}
.role:hover, .role.open { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.role::before {
  content: ""; position: absolute; left: -32px; top: 24px; z-index: 1;
  width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
  transition: background-color .3s, box-shadow .3s;
}
.role.open::before { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
.role-head {
  width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 16px;
  padding: 20px 22px; align-items: center;
}
.when { grid-column: 1; color: var(--accent); font-size: 12.5px; }
.role-title { grid-column: 1; font-size: 19px; font-weight: 600; }
.chev {
  grid-column: 2; grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted);
  transition: transform .4s var(--ease), color .3s;
}
.role.open .chev { transform: rotate(180deg); color: var(--accent); }
.role-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.role.open .role-body { grid-template-rows: 1fr; }
.role-body ul { overflow: hidden; padding: 0 22px; display: grid; gap: 9px; }
.role.open .role-body ul { padding-bottom: 22px; }
.role-body li { position: relative; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.role-body li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.role-body li b { color: var(--text); font-weight: 500; }

/* ---------- Products ---------- */
.section-lead { color: var(--muted); margin-top: 14px; max-width: 560px; font-size: 16.5px; }
.product {
  --brand: #14b8a6; --brand-deep: #0f766e;
  position: relative; overflow: hidden; margin-top: 40px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding: 44px; border-radius: 22px;
  background:
    radial-gradient(520px 320px at 100% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    var(--card);
  border: 1px solid var(--line);
  transition: border-color .4s, opacity .8s var(--ease), transform .8s var(--ease);
}
.product:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.product > * { min-width: 0; }
.product-brand { display: flex; align-items: center; gap: 14px; }
.product-brand img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 12px 24px -12px var(--brand-deep); }
.product-brand h3 { font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
.product-brand .mono { color: var(--muted); font-size: 13px; }
.product-tagline { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 26px 0 12px; }
.product-desc { color: var(--muted); font-size: 16px; max-width: 460px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 28px; }
.product-tags li {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  color: color-mix(in srgb, var(--brand) 70%, var(--text));
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.product-links { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-shinmal { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.btn-shinmal:hover { border-color: var(--brand); box-shadow: 0 10px 30px -10px var(--brand); }

.product-visual { display: flex; flex-direction: column; align-items: center; gap: 22px; perspective: 1200px; }
.phone {
  --dur: 4s;
  position: relative; width: 270px; aspect-ratio: 390 / 844; padding: 10px;
  border-radius: 44px; background: #0a0d10;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, #2a3138);
  box-shadow:
    inset 0 0 0 2px #1d2329,
    0 50px 80px -40px rgba(4, 47, 46, .9),
    0 0 0 8px color-mix(in srgb, var(--brand) 6%, transparent);
  transform: rotateY(-10deg) rotateX(4deg);
  transition: transform .8s var(--ease);
}
.product:hover .phone { transform: rotateY(0) rotateX(0) translateY(-6px); }
.phone-notch {
  position: absolute; z-index: 2; top: 18px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 22px; border-radius: 999px; background: #000;
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #111418; }
.phone-status {
  position: absolute; inset: 0 0 auto 0; height: 34px; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; padding: 2px 26px 0;
  background: #134e4a; color: #fff; font-size: 11.5px; font-weight: 600;
}
.status-icons { display: flex; align-items: flex-end; gap: 2px; }
.status-icons i { width: 3px; background: #fff; border-radius: 1px; }
.status-icons i:nth-child(1) { height: 4px; } .status-icons i:nth-child(2) { height: 6px; } .status-icons i:nth-child(3) { height: 8px; }
.status-icons b { width: 18px; height: 9px; margin-left: 5px; border: 1.5px solid #fff; border-radius: 3px; box-shadow: inset -5px 0 0 0 #134e4a, inset 0 0 0 1px #134e4a; background: #fff; }
.screen {
  position: absolute; inset: 34px 0 0 0; width: 100%; height: calc(100% - 34px); object-fit: cover; object-position: top;
  opacity: 0; transform: translateX(14%) scale(.98);
  transition: opacity .6s var(--ease), transform .7s var(--ease);
}
.screen.active { opacity: 1; transform: none; }
.screen.prev { opacity: 0; transform: translateX(-14%) scale(.98); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; max-width: 380px; }
.step {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 10px 10px; border-radius: 10px; font-size: 13px; color: var(--muted);
  border: 1px solid var(--line); text-align: left;
  transition: color .3s, border-color .3s, background-color .3s;
}
.step .mono { font-size: 10.5px; opacity: .7; }
.step:hover { color: var(--text); }
.step.active { color: var(--text); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.step i { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--brand); }
.step.active i { width: 100%; }
.product-visual.playing .step.active i { animation: step-fill var(--dur, 4s) linear forwards; }
@keyframes step-fill { from { width: 0; } to { width: 100%; } }

/* ---------- Education & Certificates ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.edu { margin-top: 32px; border-left: 1px solid var(--line); padding-left: 26px; }
.edu li { position: relative; margin-bottom: 28px; }
.edu li::before {
  content: ""; position: absolute; left: -31px; top: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 4px var(--bg);
}
.edu small { color: var(--accent-2); font-size: 12.5px; }
.edu h3 { font-size: 17.5px; margin: 2px 0; }
.edu p { color: var(--muted); font-size: 14.5px; }

.certs { margin-top: 32px; display: grid; gap: 12px; }
.cert {
  display: flex; gap: 16px; align-items: center; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .3s, transform .45s var(--ease), opacity .8s var(--ease);
}
.cert:hover { border-color: #ff9900; transform: translateX(6px); }
.badge {
  position: relative; overflow: hidden; flex: none; width: 46px; height: 46px; border-radius: 11px;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: linear-gradient(135deg, #ff9900, #ffbf5c); color: #1a1200;
  transition: transform .6s var(--ease);
}
.badge::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.cert:hover .badge { transform: rotate(-10deg) scale(1.06); }
.cert:hover .badge::after { transform: translateX(120%); }
.cert-text { min-width: 0; }
.cert-text b { display: block; font-size: 15px; font-weight: 600; }
.cert-text small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.go { margin-left: auto; color: var(--accent); font-size: 13.5px; white-space: nowrap; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: 140px 0; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 55%; width: 760px; height: 420px; pointer-events: none;
  transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--glow), transparent);
}
.contact .container { position: relative; }
.contact h2 { font-size: clamp(36px, 6vw, 64px); max-width: 820px; margin: 0 auto; }
.contact-lead { color: var(--muted); margin: 18px auto 34px; max-width: 520px; font-size: 17px; }
.whatsapp {
  display: inline-flex; align-items: center; gap: 16px; text-align: left;
  padding: 14px 22px 14px 16px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .35s, transform .45s var(--ease), box-shadow .45s var(--ease), opacity .8s var(--ease);
}
.whatsapp:hover { border-color: #25d366; transform: translateY(-4px); box-shadow: 0 24px 44px -24px rgba(37, 211, 102, .55); }
.wa-ic {
  flex: none; width: 52px; height: 52px; padding: 12px; border-radius: 14px;
  background: #25d366; color: #fff; transition: transform .5s var(--ease);
}
.whatsapp:hover .wa-ic { transform: rotate(-10deg) scale(1.06); }
.wa-text small { display: block; color: var(--muted); font-size: 13px; }
.wa-text .mono { font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; }
.wa-arrow { margin-left: 8px; font-size: 20px; color: var(--muted); transition: transform .4s var(--ease), color .3s; }
.whatsapp:hover .wa-arrow { color: #25d366; transform: translate(3px, -3px); }
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.socials a {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--muted);
  transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.socials a:hover { color: var(--text); border-color: var(--accent); }
.cv-sm { display: none; margin-top: 30px; }

/* Keep the reveal stagger on cards that define their own transitions */
.svc.reveal, .cert.reveal, .role.reveal, .whatsapp.reveal { transition-delay: var(--d, 0ms); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .nav-links a { padding: 8px 7px; font-size: 13.5px; }
  .nav-links a::after { left: 7px; right: 7px; }
}

@media (max-width: 920px) {
  .container { padding: 0 16px; }
  .nav { padding: 12px 16px; }
  .burger { display: block; }
  .hide-sm { display: none; }
  .cv-sm { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 0; z-index: 55; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0;
    padding: 88px 24px 32px; overflow-y: auto; counter-reset: nav;
    background:
      radial-gradient(420px 300px at 100% 0%, var(--glow), transparent 70%),
      var(--bg);
    clip-path: circle(0 at calc(100% - 36px) 34px);
    transition: clip-path .6s var(--ease), visibility 0s linear .6s;
    visibility: hidden;
  }
  .nav-links.open { clip-path: circle(150% at calc(100% - 36px) 34px); visibility: visible; transition: clip-path .6s var(--ease), visibility 0s; }
  .nav-links a {
    display: flex; align-items: baseline; gap: 14px;
    font-size: 30px; font-weight: 500; letter-spacing: -.01em; color: var(--text);
    padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(14px);
    transition: opacity .4s, transform .5s var(--ease), color .25s, padding-left .35s var(--ease);
  }
  .nav-links a:not(.menu-cv)::before {
    counter-increment: nav; content: "0" counter(nav);
    font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted);
  }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--accent); padding-left: 12px; }
  .nav-links a.active::before { color: var(--accent); }
  .nav-links.open a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 45ms + 150ms); }
  .nav-links .menu-cv {
    display: inline-flex; justify-content: center; margin-top: 28px; padding: 14px 20px;
    font-size: 16px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent-ink);
  }
  .nav-actions { position: relative; z-index: 60; }

  .hero { padding: 64px 0 100px; min-height: auto; }
  .hero-inner, .about, .exp, .two-col { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { margin-top: 20px; }
  .profile-chip { left: 12px; bottom: -26px; }
  .about-photo { display: none; }
  .product { grid-template-columns: 1fr; padding: 28px 22px 32px; gap: 40px; }
  .phone { width: 240px; transform: none; }
  .exp { gap: 28px; }
  .exp-side { position: static; }
  .co-tabs { flex-direction: row; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .co-tab { border-left: 0; border: 1px solid var(--line); border-radius: 12px; flex: 1 0 220px; }
  .co-tab.active { border-color: var(--accent); }
  .section { padding: 80px 0; }
  .contact { padding: 100px 0; }
}

@media (max-width: 600px) {
  .services, .skill-panel, .info { grid-template-columns: 1fr; }
  .stats { gap: 8px; }
  .stat { padding: 14px 12px; }
  .stat b { font-size: 28px; }
  .term pre { font-size: 12px; padding: 14px; min-height: 0; }
  .term-head .path { font-size: 11px; }
  .timeline { padding-left: 24px; }
  .timeline::before, .timeline::after { left: 5px; }
  .role::before { left: -25px; width: 14px; height: 14px; }
  .role-head { padding: 16px; }
  .role-body ul { padding: 0 16px; }
  .role.open .role-body ul { padding-bottom: 18px; }
  .cert { flex-wrap: wrap; }
  .go { margin-left: 62px; }
  .scroll-hint { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .split .ch { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .cursor-glow { display: none; }
}
