/* ═══════════════════════════════════════════════════════════════
   EWIMO.ME — pixel-art desert theme
   Palette: desert golds, sand tones, charcoal, crisp white
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #16120c;
  --bg-alt: #1d1810;
  --surface: #241d12;
  --surface-2: #2c2416;
  --line: #3a2f1c;

  --sand: #e8c37a;
  --sand-soft: #d4a959;
  --gold: #f0b429;
  --gold-bright: #ffd54a;
  --gold-deep: #b97f1d;

  --dune-far: #8a6428;
  --dune-mid: #5f4419;
  --dune-near: #3f2d10;

  --ink: #f7f1e3;
  --ink-dim: #b7a988;
  --ink-faint: #8a7c5e;

  --sky-top: #2a4a6b;
  --sky-bottom: #c98e3f;

  --font-pixel: "Pixelify Sans", monospace;
  --font-body: "Space Grotesk", system-ui, sans-serif;

  --container: 1080px;
  --radius: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* subtle scanline / grain texture over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.08) 0px,
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--gold); color: var(--bg); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 13px 26px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
  cursor: pointer;
  image-rendering: pixelated;
}

.btn--gold {
  background: var(--gold);
  color: #1a1409;
  box-shadow: 4px 4px 0 var(--gold-deep);
}
.btn--gold:hover {
  background: var(--gold-bright);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--gold-deep);
}
.btn--gold:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gold-deep); }

.btn--ghost {
  background: transparent;
  color: var(--sand);
  border-color: var(--sand-soft);
  box-shadow: 4px 4px 0 rgba(212, 169, 89, 0.25);
}
.btn--ghost:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(212, 169, 89, 0.3);
}

.btn--small { padding: 9px 18px; font-size: 0.95rem; }

.accent { color: var(--gold); }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(22, 18, 12, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.nav__logo-avatar {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 var(--dune-near);
}

.nav__logo-text {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.nav__logo-dot { color: var(--gold); }

.nav__links {
  display: flex;
  gap: 26px;
}
.nav__links a {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.12s ease;
}
.nav__links a:hover { color: var(--gold-bright); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 2px solid var(--line);
  padding: 8px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--sand);
}

.nav__mobile {
  display: none;
  flex-direction: column;
  border-top: 2px solid var(--line);
  background: var(--bg-alt);
}
.nav__mobile a {
  font-family: var(--font-pixel);
  color: var(--ink-dim);
  text-decoration: none;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.nav__mobile a:hover { color: var(--gold-bright); background: var(--surface); }
.nav__mobile.open { display: flex; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 68px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, #6b5a3a 55%, var(--sky-bottom) 100%);
}

.hero__sky { position: absolute; inset: 0; pointer-events: none; }

.pixel-sun {
  position: absolute;
  top: 14%;
  right: 12%;
  width: 72px;
  height: 72px;
  background: var(--gold-bright);
  box-shadow:
    0 0 0 8px rgba(255, 213, 74, 0.25),
    0 0 0 20px rgba(255, 213, 74, 0.1),
    0 0 60px 24px rgba(255, 213, 74, 0.35);
  clip-path: polygon(
    25% 0%, 75% 0%, 75% 12.5%, 87.5% 12.5%, 87.5% 25%, 100% 25%,
    100% 75%, 87.5% 75%, 87.5% 87.5%, 75% 87.5%, 75% 100%,
    25% 100%, 25% 87.5%, 12.5% 87.5%, 12.5% 75%, 0% 75%,
    0% 25%, 12.5% 25%, 12.5% 12.5%, 25% 12.5%
  );
  animation: sunPulse 4s ease-in-out infinite;
}
@keyframes sunPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pixel-cloud {
  position: absolute;
  height: 14px;
  background: rgba(247, 241, 227, 0.5);
  box-shadow:
    14px -10px 0 rgba(247, 241, 227, 0.5),
    42px -10px 0 rgba(247, 241, 227, 0.4),
    28px -20px 0 rgba(247, 241, 227, 0.35);
  animation: drift 40s linear infinite;
}
.pixel-cloud--1 { top: 18%; left: -80px; width: 70px; }
.pixel-cloud--2 { top: 30%; left: -200px; width: 52px; animation-duration: 55s; animation-delay: -18s; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 300px)); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 140px;
}

@keyframes blink { to { visibility: hidden; } }

.hero__title { display: flex; flex-direction: column; gap: 10px; }

.hero__name {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(3.4rem, 10vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-shadow:
    4px 4px 0 var(--gold-deep),
    8px 8px 0 rgba(0, 0, 0, 0.35);
}

.hero__role {
  font-family: var(--font-pixel);
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  font-weight: 500;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  letter-spacing: 0.08em;
}
.amp { color: var(--gold-bright); }

.hero__subtitle {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 1.12rem;
  color: #fdf6e5;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.hero__cta {
  margin-top: 36px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__cta .btn--ghost {
  color: #fff;
  border-color: #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.hero__cta .btn--ghost:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

.hero__scene {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  line-height: 0;
}
.scene-svg { width: 100%; height: clamp(90px, 16vw, 160px); display: block; }

/* ── Sections ────────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }

.section__head { margin-bottom: 52px; }

.section__kicker {
  font-family: var(--font-pixel);
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section__title {
  font-family: var(--font-pixel);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.divider { line-height: 0; background: var(--bg-alt); }
.divider svg { width: 100%; height: 24px; display: block; transform: scaleY(-1); }
.divider + .section--alt { padding-top: 72px; }

/* ── Featured project card ───────────────────────────────────── */
.project-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
  padding: 48px;
}

.project-card__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  background:
    linear-gradient(180deg, var(--surface-2) 0%, var(--dune-near) 100%);
  border: 2px solid var(--line);
}

/* pixel robot mascot */
.pixel-bot { position: relative; }
.pixel-bot__antenna {
  width: 6px; height: 18px;
  margin: 0 auto;
  background: var(--sand-soft);
  position: relative;
}
.pixel-bot__antenna::before {
  content: "";
  position: absolute;
  top: -10px; left: -4px;
  width: 14px; height: 10px;
  background: var(--gold-bright);
  animation: blink 1.6s steps(2, start) infinite;
}
.pixel-bot__head {
  width: 84px; height: 56px;
  background: var(--sand);
  border: 3px solid var(--dune-near);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.pixel-bot__eye {
  width: 12px; height: 12px;
  background: var(--bg);
  animation: botEyes 5s steps(1) infinite;
}
@keyframes botEyes {
  0%, 88%, 100% { height: 12px; }
  92%, 96% { height: 3px; }
}
.pixel-bot__body {
  width: 100px; height: 64px;
  margin: 6px auto 0;
  background: var(--gold);
  border: 3px solid var(--dune-near);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pixel-bot__light {
  width: 16px; height: 16px;
  background: var(--bg);
  box-shadow: inset 0 0 0 4px var(--gold-bright);
  animation: sunPulse 2s ease-in-out infinite;
}

.project-card__signal {
  position: absolute;
  top: 18px; right: 18px;
  display: flex;
  gap: 4px;
  align-items: flex-end;
}
.project-card__signal span {
  width: 6px;
  background: var(--gold);
  animation: signal 1.2s ease-in-out infinite;
}
.project-card__signal span:nth-child(1) { height: 8px; }
.project-card__signal span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.project-card__signal span:nth-child(3) { height: 20px; animation-delay: 0.3s; }
@keyframes signal {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.project-card__tag {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 10px;
}

.project-card__name {
  font-family: var(--font-pixel);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.project-card__desc {
  color: var(--ink-dim);
  margin-bottom: 20px;
  max-width: 54ch;
}

.project-card__features {
  list-style: none;
  margin-bottom: 28px;
  display: grid;
  gap: 10px;
}
.project-card__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 0.98rem;
}
.px {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--gold-deep);
}

/* ── Expertise ───────────────────────────────────────────────── */
.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.expertise-card {
  background: var(--surface);
  border: 2px solid var(--line);
  padding: 36px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.expertise-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 rgba(0, 0, 0, 0.4);
  border-color: var(--gold-deep);
}

.expertise-card__icon {
  width: 56px; height: 56px;
  color: var(--gold);
  background: var(--surface-2);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.expertise-card__icon svg { width: 32px; height: 32px; }

.expertise-card h3 {
  font-family: var(--font-pixel);
  font-size: 1.45rem;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}

.expertise-card p { color: var(--ink-dim); margin-bottom: 18px; }

.expertise-card__points {
  list-style: none;
  display: grid;
  gap: 9px;
}
.expertise-card__points li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 0.96rem;
}
.expertise-card__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 9px; height: 9px;
  background: var(--gold);
}

/* ── Services ────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--line);
  padding: 28px 26px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: var(--surface-2);
}
.service-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0 10px,
    transparent 10px 20px
  );
  opacity: 0;
  transition: opacity 0.15s ease;
}
.service-card:hover::after { opacity: 1; }

.service-card__num {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--gold-deep);
  letter-spacing: 0.12em;
}

.service-card h3 {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  margin: 10px 0 10px;
  letter-spacing: 0.02em;
}

.service-card p { color: var(--ink-dim); font-size: 0.95rem; }

/* ── Stack ───────────────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stack-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  background: var(--surface);
  border: 2px solid var(--line);
  padding: 18px 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.stack-tile:hover { border-color: var(--gold); transform: translateY(-3px); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: linear-gradient(180deg, var(--bg-alt) 0%, #0f0c07 100%);
  border-top: 2px solid var(--line);
  position: relative;
}
.footer__scene { line-height: 0; opacity: 0.6; }
.footer__scene svg { width: 100%; height: 40px; display: block; }

.footer__inner { text-align: center; padding: 56px 24px 44px; }

.footer__title {
  font-family: var(--font-pixel);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin-bottom: 12px;
}

.footer__text { color: var(--ink-dim); max-width: 480px; margin: 0 auto 30px; }

.footer__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.footer__pixel-sig {
  font-family: var(--font-pixel);
  letter-spacing: 0.15em;
  color: var(--gold-deep);
}

/* ── Reveal on scroll ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pixel-cloud, .pixel-sun, .blink, .pixel-bot__antenna::before { animation: none; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .project-card { grid-template-columns: 1fr; padding: 32px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav__links, .nav__inner > .btn { display: none; }
  .nav__burger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .project-card { padding: 24px; gap: 28px; }
  .hero__content { padding-bottom: 110px; }
}
