:root {
  --bg: #050505;
  --panel: rgba(255,255,255,.07);
  --panel-strong: rgba(255,255,255,.11);
  --line: rgba(255,255,255,.12);
  --text: #fff;
  --muted: #a3a3a3;
  --blue: #00D4FF;
  --purple: #0077FF;
  --accent: #00D4FF;
  --steel: #b9c0ca;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #fb7185;
  --radius: 24px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(0,212,255,.14), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(185,192,202,.08), transparent 32%),
    radial-gradient(circle at 50% 115%, rgba(0,212,255,.08), transparent 36%),
    linear-gradient(135deg, #050505, #0b0b0d 42%, #15120d 70%, #050505);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(255,255,255,.035) 1px, transparent 1.4px);
  background-size: 48px 48px, 48px 48px, 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255,255,255,.045) 47%, transparent 58%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 1px, transparent 1px 7px);
  opacity: .58;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.particles,
.particle {
  display: none;
}

.particle-network {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .95;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.nav {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 20px 70px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(50,210,255,.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(101,224,255,.95), transparent 34%),
    linear-gradient(135deg, #1dd3ff 0%, #4268ff 100%);
  color: #071018;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -.08em;
  box-shadow:
    0 0 0 6px rgba(0,212,255,.035),
    0 0 34px rgba(0,150,255,.22),
    inset 0 1px rgba(255,255,255,.38);
  animation: logoPulse 3s ease-in-out infinite;
}
.nav-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: .86rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-btn, .premium-btn, .ghost-btn {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 11px 16px;
  min-height: 44px;
  color: #fff;
  background: linear-gradient(135deg, rgba(0,212,255,.16), rgba(255,255,255,.055));
  box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.18);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.back-btn:hover, .premium-btn:hover, .ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(0,212,255,.5);
  box-shadow: 0 18px 44px rgba(0,212,255,.12);
}
.ghost-btn { background: rgba(255,255,255,.07); }
.premium-btn { background: linear-gradient(135deg, #00E5FF, #0077FF); color: #050505; font-weight: 800; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 64px 0 26px;
  animation: fadeUp .7s ease both;
}
.eyebrow { color: #00D4FF; text-transform: uppercase; font-size: .78rem; letter-spacing: .18em; font-weight: 800; }
h1 { margin: 8px 0 10px; font-size: clamp(2.2rem, 6vw, 5.2rem); line-height: .94; letter-spacing: 0; }
.hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); line-height: 1.7; }

.grid { display: grid; gap: 18px; }
.layout { grid-template-columns: minmax(0, 1.18fr) minmax(290px, .82fr); align-items: start; }
.triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.double { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.035)),
    linear-gradient(180deg, rgba(0,212,255,.035), transparent 45%);
  box-shadow: 0 24px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.12);
  backdrop-filter: blur(22px);
  padding: 22px;
  overflow: hidden;
  animation: fadeUp .75s ease both;
}
.glass::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, transparent, rgba(0,212,255,.16), transparent, rgba(255,255,255,.08), transparent);
  opacity: .55;
  pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 0; font-size: 1.05rem; }
.chip { color: #00E5FF; background: rgba(0,212,255,.1); border: 1px solid rgba(0,212,255,.24); border-radius: 999px; padding: 7px 11px; font-size: .78rem; font-weight: 800; }

.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: .86rem; }
input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(5,5,5,.52);
  color: #fff;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,212,255,.12); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.055);
  transition: transform .2s ease;
}
.stat:hover { transform: translateY(-3px); }
.stat span { color: var(--muted); font-size: .78rem; }
.stat strong { display: block; margin-top: 7px; font-size: clamp(1.3rem, 3vw, 2rem); }

.currency-result-card {
  display: grid;
  gap: 18px;
  align-content: center;
}

.currency-result {
  display: block;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: .9;
  letter-spacing: -.05em;
  color: #fff;
  text-shadow: 0 0 42px rgba(0,212,255,.2);
  overflow-wrap: anywhere;
}

.ring {
  --value: 0;
  position: relative;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  margin: 8px auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#00D4FF calc(var(--value) * 1%), rgba(255,255,255,.09) 0);
  box-shadow: 0 0 44px rgba(0,212,255,.14);
}
.ring::before {
  content: "";
  position: absolute;
  width: calc(min(260px, 70vw) - 34px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0a0a0d;
  border: 1px solid rgba(255,255,255,.1);
}
.ring-value { position: relative; z-index: 1; text-align: center; }
.ring-value strong { display: block; font-size: 3rem; }
.meter { height: 12px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; }
.meter span { display: block; width: var(--w,0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00E5FF, #0077FF); transition: width .7s ease; }

.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); }
.subject-row { display: grid; grid-template-columns: 1.5fr .7fr .7fr; }
.item small, .muted { color: var(--muted); }

.calculator-hero { padding-bottom: 18px; }
.calculator-stage {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(310px, 430px) minmax(280px, 390px);
  gap: 28px;
  align-items: center;
  justify-content: center;
}
.calc-device {
  position: relative;
  width: min(100%, 430px);
  padding: 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.055)),
    linear-gradient(180deg, rgba(5,5,5,.9), rgba(12,12,18,.94));
  box-shadow:
    0 42px 110px rgba(0,0,0,.62),
    0 0 90px rgba(0,212,255,.12),
    inset 0 1px rgba(255,255,255,.22),
    inset 0 -24px 70px rgba(0,0,0,.36);
  backdrop-filter: blur(26px);
  animation: fadeUp .75s ease both;
}
.calc-device::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}
.calc-device::after {
  content: "";
  position: absolute;
  inset: auto 42px -22px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,212,255,.24);
  filter: blur(28px);
  z-index: -1;
}
.calc-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 6px 14px;
}
.traffic { display: flex; gap: 7px; }
.traffic span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
}
.traffic span:nth-child(1) { background: #fb7185; }
.traffic span:nth-child(2) { background: #00D4FF; }
.traffic span:nth-child(3) { background: #22c55e; }
.mode-pill {
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.06);
  font-size: .78rem;
  font-weight: 800;
}
.display-wrap {
  margin-bottom: 16px;
  padding: 18px;
  min-height: 150px;
  display: grid;
  align-content: end;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 15%, rgba(0,212,255,.14), transparent 34%),
    linear-gradient(180deg, rgba(0,0,0,.54), rgba(0,0,0,.28));
  box-shadow: inset 0 2px 24px rgba(0,0,0,.52);
}
.display-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.display {
  text-align: right;
  min-height: 58px;
  color: #fff;
  font-size: clamp(2.4rem, 9vw, 4.1rem);
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-shadow: 0 0 28px rgba(0,212,255,.18);
}
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.key {
  position: relative;
  min-height: 66px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  box-shadow:
    0 12px 24px rgba(0,0,0,.28),
    inset 0 1px rgba(255,255,255,.2),
    inset 0 -10px 18px rgba(0,0,0,.18);
  font-size: 1.28rem;
  font-weight: 800;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.key:hover {
  transform: translateY(-2px) scale(1.025);
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.09));
  box-shadow: 0 18px 34px rgba(0,0,0,.34), 0 0 24px rgba(0,212,255,.09);
}
.key:active { transform: translateY(1px) scale(.98); }
.key.utility {
  color: #050505;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(191,201,214,.78));
}
.key.scientific {
  color: var(--blue);
  font-size: 1rem;
  background: rgba(0,212,255,.09);
}
.key.op {
  background: linear-gradient(145deg, rgba(0,229,255,.95), rgba(0,119,255,.82));
  box-shadow: 0 16px 34px rgba(0,212,255,.16), inset 0 1px rgba(255,255,255,.28);
}
.key.eq {
  grid-row: span 2;
  min-height: 143px;
  background: linear-gradient(160deg, var(--blue), var(--purple));
  color: #050505;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 20px 46px rgba(0,212,255,.2), inset 0 1px rgba(255,255,255,.36);
}
.key.zero { grid-column: span 2; }
.calc-side {
  align-self: stretch;
  display: grid;
  align-content: start;
}
.calc-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.calc-mini-stats div {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}
.calc-mini-stats span { display: block; color: var(--muted); font-size: .78rem; }
.calc-mini-stats strong { display: block; margin-top: 6px; font-size: 1.35rem; }
.calc-history {
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.game-board { display: grid; gap: 10px; justify-content: center; }
.memory-board { grid-template-columns: repeat(4, minmax(58px, 86px)); perspective: 900px; }
.memory-card, .cell {
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  box-shadow: inset 0 1px rgba(255,255,255,.14);
  transition: transform .28s ease, box-shadow .28s ease, background .28s ease;
}
.memory-card { transform-style: preserve-3d; }
.memory-card.flipped, .memory-card.matched { transform: rotateY(180deg); background: linear-gradient(135deg, rgba(0,212,255,.2), rgba(255,255,255,.08)); }
.memory-card span { transform: rotateY(180deg); opacity: 0; }
.memory-card.flipped span, .memory-card.matched span { opacity: 1; }
.ttt-board { grid-template-columns: repeat(3, minmax(72px, 118px)); }
.cell:hover { transform: scale(1.04); box-shadow: 0 0 24px rgba(0,212,255,.16); }
.win { background: linear-gradient(135deg, rgba(0,212,255,.26), rgba(255,255,255,.08)); animation: winPulse .8s ease infinite alternate; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 11px; color: var(--muted); background: rgba(255,255,255,.06); }
.badge.active { color: #fff; border-color: rgba(0,212,255,.45); box-shadow: 0 0 22px rgba(0,212,255,.12); }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(17,17,17,.86);
  border: 1px solid rgba(0,212,255,.28);
  box-shadow: 0 20px 60px rgba(0,0,0,.42);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; background: var(--blue); animation: fall 1.5s ease-in forwards; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding: 18px 2px 0;
  border-top: 1px solid rgba(255,255,255,.09);
  color: var(--muted);
  font-size: .88rem;
}
.site-footer span:first-child {
  color: #00E5FF;
  font-weight: 800;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { from { transform: translateY(105vh) translateX(0); } to { transform: translateY(-15vh) translateX(70px); } }
@keyframes logoPulse {
  50% {
    transform: rotate(3deg) scale(1.06);
    box-shadow:
      0 0 0 7px rgba(0,212,255,.05),
      0 0 44px rgba(0,150,255,.32),
      inset 0 1px rgba(255,255,255,.42);
  }
}
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0; } }
@keyframes winPulse { to { box-shadow: 0 0 36px rgba(34,197,94,.35); } }

@media (max-width: 820px) {
  .nav { align-items: flex-start; border-radius: 24px; }
  .nav-meta { display: none; }
  .hero, .layout, .triple, .double { grid-template-columns: 1fr; }
  .calculator-stage { grid-template-columns: 1fr; min-height: 0; }
  .calc-device { margin: 0 auto; border-radius: 30px; padding: 14px; }
  .display-wrap { min-height: 130px; border-radius: 24px; }
  .hero { padding-top: 42px; }
  .stats { grid-template-columns: 1fr; }
  .subject-row { grid-template-columns: 1fr; }
  .glass { padding: 18px; }
  .keys { gap: 8px; }
  .key { min-height: 58px; border-radius: 18px; }
  .key.eq { min-height: 124px; }
  .site-footer { flex-direction: column; }
}

/* MM premium portfolio redesign layer */
body {
  background:
    radial-gradient(circle at 0% 78%, rgba(0,92,125,.2), transparent 30%),
    radial-gradient(circle at var(--spot-x, 20%) var(--spot-y, 8%), rgba(0,212,255,.075), transparent 29%),
    radial-gradient(circle at 82% 12%, rgba(185,192,202,.045), transparent 34%),
    linear-gradient(135deg, #020202, #060708 38%, #090805 72%, #020202);
}

body::before {
  background-image:
    linear-gradient(115deg, rgba(255,255,255,.05) 0 1px, transparent 1px 11px),
    linear-gradient(25deg, rgba(255,255,255,.025) 0 1px, transparent 1px 9px),
    radial-gradient(circle at center, rgba(0,212,255,.055) 1px, transparent 1.5px);
  background-size: 34px 34px, 28px 28px, 20px 20px;
  opacity: .72;
  animation: textureDrift 24s linear infinite;
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 38%, rgba(0,0,0,.7) 100%),
    linear-gradient(110deg, transparent 0 40%, rgba(0,120,150,.045) 50%, transparent 62%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 1px, transparent 1px 8px);
  mix-blend-mode: screen;
  opacity: .48;
  animation: reflectionSweep 12s ease-in-out infinite alternate;
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  padding-top: 18px;
}

.nav {
  top: 16px;
  min-height: 70px;
  padding: 10px 12px;
  border-color: rgba(255,255,255,.105);
  background: linear-gradient(180deg, rgba(14,14,14,.82), rgba(8,8,8,.62));
}

.portfolio-nav {
  animation: navReveal .7s ease both;
}

.brand {
  min-width: max-content;
}

.brand:hover .logo {
  border-color: rgba(92,220,255,.72);
  box-shadow:
    0 0 0 8px rgba(0,212,255,.055),
    0 0 52px rgba(0,150,255,.34),
    inset 0 1px rgba(255,255,255,.45);
}

.logo {
  position: relative;
  overflow: hidden;
  animation: logoReveal .9s cubic-bezier(.2,.8,.2,1) both, logoPulse 4s ease-in-out 1s infinite;
}

.logo::after {
  content: "";
  position: absolute;
  inset: -45%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.56), transparent 62%);
  transform: translateX(-90%) rotate(8deg);
  animation: logoSheen 3.8s ease-in-out infinite;
}

.nav-meta {
  padding: 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
}

.nav-meta a,
.nav-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}

.nav-meta a:hover {
  color: #00E5FF;
  background: rgba(0,212,255,.08);
}

.hero {
  min-height: 360px;
  align-items: center;
  padding: 86px 0 36px;
}

.portfolio-hero {
  min-height: calc(100vh - 118px);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
}

.hero h1,
.section-head h2,
.system-copy h2,
.contact-section h2 {
  max-width: 920px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.portfolio-hero h1 {
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  line-height: .88;
}

.hero p {
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  min-height: 330px;
  display: grid;
  align-content: end;
}

.hero-panel strong {
  display: block;
  margin: 18px 0 10px;
  font-size: clamp(5rem, 12vw, 8rem);
  line-height: .8;
  color: #00E5FF;
  text-shadow: 0 0 46px rgba(0,212,255,.18);
}

.panel-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 800;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: -44px;
  position: relative;
  z-index: 2;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: end;
  margin: 92px 0 22px;
}

.section-head h2,
.system-copy h2,
.contact-section h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: .96;
}

.project-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: start;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,.34);
  box-shadow: 0 34px 90px rgba(0,0,0,.5), 0 0 44px rgba(0,212,255,.08);
}

.project-card.featured {
  grid-column: span 2;
  min-height: 300px;
  align-items: end;
  background:
    radial-gradient(circle at 85% 20%, rgba(0,212,255,.16), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.115), rgba(255,255,255,.035));
}

.project-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-index {
  color: rgba(0,229,255,.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.system-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 18px;
  margin-top: 82px;
}

.system-copy {
  min-height: 360px;
  display: grid;
  align-content: end;
}

.system-steps {
  display: grid;
  gap: 12px;
}

.system-steps .item {
  min-height: 112px;
  align-items: flex-start;
  flex-direction: column;
}

.system-steps span {
  color: var(--muted);
  line-height: 1.55;
}

.contact-section {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 82px;
  padding: 34px;
}

.contact-section p {
  max-width: 680px;
  line-height: 1.7;
}

.glass,
.stat,
.item,
.calc-device {
  transform-style: preserve-3d;
}

.glass:hover,
.stat:hover {
  border-color: rgba(0,212,255,.24);
}

@keyframes navReveal {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logoReveal {
  from { opacity: 0; transform: scale(.72) rotate(-18deg); filter: blur(8px); }
  to { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
}

@keyframes logoSheen {
  0%, 42% { transform: translateX(-90%) rotate(8deg); }
  62%, 100% { transform: translateX(90%) rotate(8deg); }
}

@keyframes textureDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 80px 40px, -56px 60px, 40px -60px; }
}

@keyframes reflectionSweep {
  from { opacity: .34; transform: translateX(-1.5%); }
  to { opacity: .54; transform: translateX(1.5%); }
}

@media (max-width: 920px) {
  .portfolio-hero,
  .section-head,
  .system-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .portfolio-hero {
    min-height: auto;
  }

  .proof-grid,
  .project-showcase {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .project-card,
  .project-card.featured {
    grid-column: auto;
    min-height: 220px;
  }

  .contact-section {
    display: grid;
  }
}

@media (max-width: 620px) {
  .nav {
    border-radius: 26px;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .back-btn {
    width: 100%;
    text-align: center;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
  }

  .nav-actions .back-btn,
  .nav-actions .ghost-btn {
    width: 100%;
    text-align: center;
  }

  .portfolio-hero h1 {
    font-size: clamp(2.7rem, 16vw, 4rem);
  }

  .project-card {
    grid-template-columns: 1fr;
  }
}
