:root {
  --bg: #050812;
  --bg-soft: #081321;
  --panel: rgba(13, 25, 43, 0.78);
  --paper: #f5f8fb;
  --paper-card: #ffffff;
  --text: #f7fbff;
  --muted: #9fb0c5;
  --ink: #101828;
  --ink-muted: #58677a;
  --accent: #17e7c1;
  --accent-blue: #5aacff;
  --accent-rose: #ff8ac8;
  --accent-gold: #ffe08a;
  --line: rgba(255, 255, 255, 0.14);
  --dark-line: rgba(16, 24, 40, 0.12);
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(24px) saturate(1.35);
  background: rgba(2, 8, 23, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 38px rgba(7, 18, 44, 0.04);
  color: #ffffff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  left: 0;
  padding: 16px clamp(18px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  transition:
    background 260ms ease,
    box-shadow 260ms ease,
    padding 260ms ease,
    border-color 260ms ease;
  z-index: 50;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.7);
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  border-bottom-color: rgba(7, 17, 31, 0.12);
  box-shadow: 0 18px 46px rgba(7, 18, 44, 0.08);
  padding-bottom: 12px;
  padding-top: 12px;
  color: #07111f;
}

.brand {
  align-items: center;
  background: #07111f;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 650;
  height: 42px;
  justify-content: center;
  width: 42px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-end;
}

nav a {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

nav a:hover {
  color: #d6ecff;
}

.menu-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.menu-toggle span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  width: 20px;
}

.site-header.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header.is-scrolled nav a {
  color: #07111f;
}

.site-header.is-scrolled nav a:hover {
  color: #1f74d8;
}

.hero {
  align-items: center;
  background: #020817;
  display: grid;
  gap: clamp(18px, 4vw, 46px);
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.9fr);
  height: calc(100vh - 74px);
  min-height: 560px;
  max-height: 760px;
  overflow: hidden;
  padding: clamp(24px, 5vw, 54px) clamp(18px, 5vw, 72px);
  position: relative;
}

.hero::before {
  background:
    radial-gradient(circle at 18% 20%, rgba(35, 132, 255, 0.24), transparent 26%),
    radial-gradient(circle at 82% 28%, rgba(73, 221, 206, 0.12), transparent 28%),
    linear-gradient(135deg, #020817, #06142d 54%, #020817);
  content: "";
  inset: 0;
  position: absolute;
}

.hero-lottie-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-lottie-bg svg {
  width: 100% !important;
  height: 100% !important;
}

.hero-copy,
.hero-showcase {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  letter-spacing: -0.01em;
  line-height: 0.92;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(2rem, 4.3vw, 4rem);
  letter-spacing: 0;
  line-height: 1.04;
  margin-bottom: 0;
}

.role {
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.76rem);
  font-weight: 900;
  margin-bottom: 10px;
}

.hero-stack,
.tagline {
  color: var(--muted);
  font-size: clamp(0.86rem, 1.35vw, 1.05rem);
  max-width: 780px;
}

.tagline {
  color: #d8e8f6;
  font-weight: 850;
}

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

.button,
.contact-links a,
.sticky-call,
.sticky-whatsapp {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  min-height: 46px;
  padding: 11px 17px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.contact-links a:hover,
.sticky-call:hover,
.sticky-whatsapp:hover {
  border-color: rgba(23, 231, 193, 0.64);
  box-shadow: 0 0 34px rgba(23, 231, 193, 0.14);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  border-color: transparent;
  color: #03131c;
}

.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.hero-showcase {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 420px;
  position: relative;
}

.astronaut-lottie-shell {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  display: flex;
  height: min(35vw, 360px);
  justify-content: center;
  overflow: visible;
  padding: 0;
  position: relative;
  width: min(35vw, 360px);
}

.hero-lottie {
  height: min(35vw, 360px);
  max-height: 360px;
  position: relative;
  transform: translateX(4%) scale(2.0);
  transform-origin: center center;
  width: min(35vw, 360px);
  z-index: 1;
}

.preview-window {
  background: linear-gradient(145deg, rgba(13, 25, 43, 0.96), rgba(7, 16, 31, 0.9));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.preview-topline {
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  border-radius: 999px;
  height: 8px;
  margin-bottom: 22px;
  width: 42%;
}

.preview-chart {
  background:
    linear-gradient(135deg, rgba(23, 231, 193, 0.18), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 180px;
  margin-bottom: 16px;
  position: relative;
}

.preview-chart::after {
  background: linear-gradient(90deg, transparent, var(--accent));
  border-radius: 999px;
  bottom: 40px;
  content: "";
  height: 5px;
  left: 32px;
  position: absolute;
  transform: rotate(-9deg);
  width: 75%;
}

.preview-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
}

.preview-row span,
.mini-card {
  color: var(--muted);
  font-weight: 850;
}

.preview-row strong {
  color: var(--accent);
}

.mini-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px 22px;
  position: absolute;
}

.mini-card.one {
  right: -18px;
  top: 44px;
}

.mini-card.two {
  left: -18px;
  top: 238px;
}

.mini-card.three {
  bottom: 32px;
  right: 44px;
}

.result-bar {
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 32px clamp(18px, 5vw, 72px);
  overflow: hidden;
}

.stat {
  background: rgba(13, 25, 43, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  min-height: 132px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  will-change: transform;
}

.stat strong {
  color: var(--accent);
  display: block;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 10px;
}

.stat span {
  color: var(--muted);
  display: block;
  font-weight: 900;
}

.section,
.contact {
  padding: clamp(58px, 8vw, 106px) clamp(18px, 5vw, 72px);
}

.dark-section {
  background: var(--bg);
  color: var(--text);
}

.light-section {
  background: var(--paper);
  color: var(--ink);
}

.section.compact {
  padding-top: clamp(50px, 7vw, 86px);
}

.section-heading {
  margin-bottom: 32px;
  max-width: 920px;
}

.light-section .eyebrow {
  color: #0a9f82;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  padding: 10px 15px;
}

.filter.active,
.filter:hover {
  background: rgba(23, 231, 193, 0.16);
  border-color: rgba(23, 231, 193, 0.56);
  color: var(--text);
}

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

.portfolio-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 400px;
  overflow: hidden;
  position: relative;
  transition:
    transform 190ms ease,
    border-color 190ms ease,
    box-shadow 190ms ease;
}

.portfolio-card:hover {
  border-color: rgba(23, 231, 193, 0.52);
  box-shadow: 0 0 44px rgba(23, 231, 193, 0.12);
  transform: translateY(-5px);
}

.portfolio-visual {
  aspect-ratio: 16 / 10;
  background: #0b1525;
  overflow: hidden;
  position: relative;
}

.visual-growth::after,
.visual-reports::after {
  background: linear-gradient(90deg, transparent, var(--accent));
  border-radius: 999px;
  content: "";
  height: 7px;
  left: 12%;
  position: absolute;
  top: 58%;
  transform: rotate(-10deg);
  width: 76%;
}

.visual-realestate::after,
.visual-travel::after {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  content: "";
  height: 52%;
  left: 10%;
  position: absolute;
  top: 20%;
  width: 80%;
}

.visual-automation::after {
  background:
    radial-gradient(circle, var(--accent) 0 7px, transparent 8px),
    radial-gradient(circle, var(--accent-blue) 0 7px, transparent 8px),
    radial-gradient(circle, var(--accent) 0 7px, transparent 8px);
  background-position:
    18% 48%,
    50% 48%,
    82% 48%;
  background-repeat: no-repeat;
  content: "";
  inset: 0;
  position: absolute;
}

.visual-creative::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 52%),
    linear-gradient(45deg, rgba(23, 231, 193, 0.22), rgba(90, 172, 255, 0.2));
  border-radius: 8px;
  content: "";
  height: 64%;
  left: 12%;
  position: absolute;
  top: 18%;
  transform: rotate(-3deg);
  width: 76%;
}

.visual-screen {
  background: rgba(5, 8, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  inset: 14%;
  padding: 24px;
  position: absolute;
  z-index: 1;
}

.visual-screen span {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  display: block;
}

.portfolio-copy {
  padding: 26px;
}

.portfolio-copy p {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.portfolio-copy h3 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.08;
  margin-bottom: 8px;
}

.portfolio-copy strong,
.portfolio-copy span {
  color: var(--muted);
  display: block;
  font-weight: 850;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row em {
  background: rgba(23, 231, 193, 0.12);
  border: 1px solid rgba(23, 231, 193, 0.28);
  border-radius: 999px;
  color: #dffdf7;
  font-style: normal;
  font-weight: 900;
  padding: 7px 10px;
}

.view-project {
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  border: 0;
  border-radius: 8px;
  bottom: 24px;
  color: #03131c;
  cursor: pointer;
  font-weight: 950;
  opacity: 0;
  padding: 12px 16px;
  position: absolute;
  right: 24px;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.portfolio-card:hover .view-project {
  opacity: 1;
  transform: translateY(0);
}

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

.automation-card,
.timeline-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.automation-card:hover,
.timeline-item:hover {
  border-color: rgba(23, 231, 193, 0.42);
  box-shadow: 0 0 34px rgba(23, 231, 193, 0.1);
  transform: translateY(-4px);
}

.automation-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.workflow {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 22px;
  overflow: hidden;
}

.workflow span {
  background: rgba(23, 231, 193, 0.08);
  color: var(--text);
  font-weight: 900;
  padding: 18px;
  position: relative;
  text-align: center;
}

.workflow span:not(:last-child)::after {
  color: var(--accent);
  content: "->";
  position: absolute;
  right: -8px;
  z-index: 2;
}

.tool-groups {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-group {
  background: var(--paper-card);
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
  padding: 24px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  background: #e7f6f3;
  border: 1px solid #c6e3dd;
  border-radius: 8px;
  color: #0d483d;
  font-weight: 850;
  padding: 10px 12px;
}

.timeline {
  border-left: 1px solid rgba(23, 231, 193, 0.38);
  display: grid;
  gap: 18px;
  margin-left: 12px;
}

.timeline-item {
  margin-left: 24px;
  position: relative;
}

.timeline-item::before {
  background: var(--accent);
  border-radius: 50%;
  content: "";
  height: 13px;
  left: -31px;
  position: absolute;
  top: 24px;
  width: 13px;
}

.timeline-item strong,
.timeline-item span {
  display: block;
}

.timeline-item span {
  color: var(--muted);
  margin-top: 4px;
}

.contact {
  align-items: center;
  background: linear-gradient(135deg, #06101d, #0d1728);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.contact h2 {
  max-width: 850px;
}

.floating-actions {
  bottom: 18px;
  display: flex;
  gap: 10px;
  position: fixed;
  right: 18px;
  z-index: 90;
}

.sticky-call {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sticky-whatsapp {
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  border-color: transparent;
  color: #03131c;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 72px);
}

.case-modal {
  align-items: center;
  background: rgba(2, 6, 14, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 120;
}

.media-lightbox {
  align-items: center;
  background: rgba(2, 6, 14, 0.86);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 180;
}

.case-modal-panel {
  background: #07101d;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  max-width: 980px;
  overflow: auto;
  padding: clamp(22px, 4vw, 38px);
  position: relative;
  width: 100%;
}

.media-lightbox-panel {
  background: #07101d;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 94vh;
  max-width: min(94vw, 860px);
  overflow: auto;
  padding: clamp(18px, 3vw, 28px);
  position: relative;
  width: fit-content;
}

#media-lightbox-content h3 {
  color: var(--accent);
  font-size: 1rem;
  margin: 0 52px 16px 0;
}

.media-frame {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.media-frame.short {
  aspect-ratio: 9 / 16;
  height: min(78vh, 720px);
}

.media-frame.video {
  max-height: 78vh;
  max-width: 820px;
}

.media-frame.image {
  align-items: center;
  display: flex;
  justify-content: center;
  max-height: 78vh;
  max-width: 86vw;
}

.media-frame iframe,
.media-frame video,
.media-frame img {
  border: 0;
  display: block;
  height: 100%;
  max-height: 78vh;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.media-frame.image img {
  height: auto;
  width: auto;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
  height: 42px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
}

.case-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0;
}

.case-detail-grid div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.case-detail-grid .wide {
  grid-column: 1 / -1;
}

.case-detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 5px;
}

.case-detail-grid strong {
  display: block;
}

.case-screens {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screenshot-placeholder {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 900;
  justify-content: center;
  min-height: 240px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}

.admin-page {
  background: #eef2ec;
  color: var(--ink);
}

.admin-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px 18px;
}

.admin-card,
.admin-dashboard {
  background: #fff;
  border: 1px solid #dfe5df;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.08);
  margin-bottom: 18px;
  padding: 24px;
}

.admin-dashboard {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.admin-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

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

label {
  color: #334155;
  display: grid;
  font-weight: 800;
  gap: 6px;
}

label.full {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.admin-item span,
.small,
.empty {
  color: #64748b;
}

.button.danger {
  background: #32151a;
  border-color: #6d2835;
  color: #ffcbd2;
}

@keyframes smokePulse {
  0% {
    opacity: 0.46;
    transform: translate3d(-8px, 5px, 0) scale(0.96) rotate(-18deg);
  }
  100% {
    opacity: 0.82;
    transform: translate3d(10px, -8px, 0) scale(1.08) rotate(-14deg);
  }
}


@media (max-width: 1040px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
    height: auto;
    padding-bottom: 36px;
    padding-top: 36px;
  }

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

  .astronaut-lottie-shell,
  .hero-lottie {
    height: min(50vw, 320px) !important;
    width: min(50vw, 320px) !important;
    min-height: auto !important;
  }

  .mini-card {
    display: none;
  }
}

@media (max-width: 1040px) and (orientation: landscape) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    height: calc(100vh - 74px);
    min-height: 320px;
    max-height: 480px;
    padding: 12px 24px;
    gap: 16px;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-copy h1 {
    font-size: 1.8rem;
    line-height: 0.95;
    margin-bottom: 8px;
  }

  .hero-copy .role {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .hero-copy .hero-stack,
  .hero-copy .tagline {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .hero-copy .hero-actions {
    margin-top: 10px;
    gap: 8px;
  }

  .hero-copy .button {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .hero-showcase {
    min-height: auto;
    height: 100%;
    align-items: center;
    justify-content: center;
  }

  .astronaut-lottie-shell,
  .hero-lottie {
    width: min(48vh, 180px) !important;
    height: min(48vh, 180px) !important;
    min-height: auto !important;
  }
}

@media (max-height: 520px) and (min-width: 621px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    height: calc(100vh - 74px);
    min-height: 320px;
    max-height: 520px;
    padding: 12px 24px;
    gap: 16px;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-copy h1 {
    font-size: 1.8rem;
    line-height: 0.95;
    margin-bottom: 8px;
  }

  .hero-copy .role {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .hero-copy .hero-stack,
  .hero-copy .tagline {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }

  .hero-copy .hero-actions {
    margin-top: 10px;
    gap: 8px;
  }

  .hero-copy .button {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .hero-showcase {
    min-height: auto;
    height: 100%;
    align-items: center;
    justify-content: center;
  }

  .astronaut-lottie-shell,
  .hero-lottie {
    width: min(48vh, 180px) !important;
    height: min(48vh, 180px) !important;
    min-height: auto !important;
  }
}

@media (max-width: 860px) {
  .result-bar,
  .automation-grid,
  .tool-groups,
  .workflow,
  .form-grid,
  .case-detail-grid,
  .case-screens {
    grid-template-columns: 1fr;
  }

  .workflow span:not(:last-child)::after {
    bottom: -14px;
    right: 50%;
    transform: translateX(50%) rotate(90deg);
  }

  .contact,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 4rem);
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 3rem);
  }

  .role {
    font-size: clamp(1.05rem, 4vw, 1.4rem);
  }

  .hero-stack,
  .tagline {
    font-size: 0.92rem;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 70px;
  }

  .site-header {
    align-items: center;
    display: grid;
    grid-template-columns: auto auto;
    padding: 12px 16px;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  nav {
    background: rgba(7, 17, 31, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
    display: none;
    flex-direction: column;
    gap: 0;
    grid-column: 1 / -1;
    margin-top: 12px;
    overflow: hidden;
    width: 100%;
  }

  .site-header.nav-open nav {
    display: flex;
  }

  nav a,
  .site-header.is-scrolled nav a {
    color: #ffffff;
    padding: 13px 14px;
  }

  nav a + a {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  h1 {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
    margin-bottom: 10px;
  }

  h2 {
    font-size: clamp(1.4rem, 7vw, 2.4rem);
  }

  .hero {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-height: calc(100vh - 120px);
    height: auto;
    padding: 24px 16px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
    margin-top: 14px;
    gap: 8px;
  }

  .hero-showcase {
    min-height: auto;
    margin-top: 12px;
  }

  .astronaut-lottie-shell,
  .hero-lottie {
    height: min(55vw, 220px) !important;
    width: min(55vw, 220px) !important;
    min-height: auto !important;
  }

  .portfolio-card {
    min-height: 360px;
  }

  .portfolio-copy,
  .tool-group,
  .admin-card {
    padding: 18px;
  }

  .floating-actions {
    bottom: 10px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    left: 10px;
    right: 10px;
  }

  .sticky-call,
  .sticky-whatsapp {
    justify-content: center;
    min-width: 0;
  }

  .media-lightbox {
    padding: 10px;
  }

  .media-lightbox-panel {
    max-width: 96vw;
    padding: 16px;
  }

  .media-frame.short {
    height: min(78vh, 620px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* New Case Study Modal Styles */
.modal-section {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.modal-section h3 {
  font-size: 1.25rem;
  margin-bottom: 14px;
  color: var(--accent);
}
.project-description {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.modal-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.modal-link {
  min-height: 40px !important;
  padding: 8px 16px !important;
  font-size: 0.9rem;
}
.video-player-wrapper {
  background: #050b14;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  margin-bottom: 12px;
  max-width: 720px;
}
.video-preview-button {
  background: #000;
  border: 0;
  display: block;
  min-height: 240px;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.modal-video {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: contain;
}
.youtube-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.youtube-player-wrapper {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  position: relative;
}
.youtube-player-wrapper.landscape-aspect {
  aspect-ratio: 16 / 9;
  width: 100%;
}
.youtube-player-wrapper.short-aspect {
  aspect-ratio: 9 / 16;
  max-width: 280px;
  margin: 0 auto;
}
.youtube-player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* New YouTube Shorts layout */
.yt-main-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.yt-short-frame {
  position: relative;
  width: 260px;
  aspect-ratio: 9 / 16;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.yt-short-frame img,
.yt-short-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.yt-short-frame img {
  object-fit: cover;
}
.media-preview-button {
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.yt-short-frame > span,
.video-preview-button > span {
  align-items: center;
  background: rgba(5, 8, 18, 0.78);
  border: 1px solid rgba(23, 231, 193, 0.52);
  border-radius: 999px;
  bottom: 14px;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 950;
  left: 50%;
  min-height: 36px;
  padding: 7px 12px;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
}
.yt-sub-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.yt-scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.yt-scroll-row .yt-short-frame {
  scroll-snap-align: start;
  width: 220px;
  flex-shrink: 0;
}
.yt-scroll-row::-webkit-scrollbar {
  height: 5px;
}
.yt-scroll-row::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
}
.yt-scroll-row::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}
.gallery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.gallery-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #0b1525;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 100%;
}
.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-overlay span {
  color: var(--accent);
  font-weight: 900;
  font-size: 0.9rem;
  border: 1px solid var(--accent);
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(23, 231, 193, 0.1);
}
