/* =========================================================
   GuyZ3R0 — shared styles
   Palette tokens are defined here. Adjust in :root only.
   ========================================================= */

:root {
  /* Backgrounds */
  --bg-0: #0B030E;        /* near-black base */
  --bg-1: #1A113E;        /* deep indigo */
  --bg-2: #2A1452;        /* violet surface */

  /* Primary */
  --blue: #0559CD;
  --blue-deep: #0C41B3;

  /* Accents */
  --green: #0DD16F;
  --lime: #9DF223;
  --cyan: #A3F2F9;
  --coral: #F46E4B;
  --gold: #FFCD38;

  /* Text */
  --text: #FCF7FE;
  --text-mute: #A4C3F9;
  --text-dim: rgba(252, 247, 254, 0.55);

  /* Surfaces & lines */
  --line: rgba(164, 195, 249, 0.12);
  --line-strong: rgba(164, 195, 249, 0.25);

  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 56px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

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

img { display: block; max-width: 100%; }

::selection {
  background: var(--green);
  color: var(--bg-0);
}

/* ---------- Type ---------- */
.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--text-mute);
  opacity: 0.6;
}

.mono { font-family: var(--font-mono); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

section {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0;
}

/* Section divider line */
section + section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: linear-gradient(to bottom, rgba(11,3,14,0.75), rgba(11,3,14,0.45));
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav-brand .logo-zero {
  width: 26px; height: 26px;
}
.nav-brand .wordmark {
  font-size: 16px;
}
.nav-brand .wordmark em {
  font-style: normal;
  color: var(--green);
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  color: var(--text-mute);
  border-radius: 6px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(164,195,249,0.06); }
.nav-links a.cta {
  color: var(--bg-0);
  background: var(--green);
  margin-left: 8px;
}
.nav-links a.cta:hover { background: var(--lime); color: var(--bg-0); }

.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-0);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 20px;
    gap: 4px;
  }
  .nav-links.open a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero::after {
  /* legibility veil */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(11,3,14,0.35) 0%, rgba(11,3,14,0.78) 70%, rgba(11,3,14,0.95) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  gap: 28px;
  padding: 120px 0 80px;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-meta .blink {
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-meta .blink::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 1.8s infinite ease-in-out;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-zero {
  display: inline-grid;
  place-items: center;
  width: 84px; height: 84px;
  margin-bottom: 8px;
}
.hero-zero svg { width: 100%; height: 100%; }

.hero-title {
  font-size: clamp(56px, 12vw, 168px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin: 0;
}
.hero-title em {
  font-style: normal;
  color: var(--green);
  text-shadow: 0 0 30px rgba(13, 209, 111, 0.5);
}

.hero-tag {
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--text-mute);
  max-width: 640px;
  margin: 0;
  line-height: 1.4;
}
.hero-tag .pipe {
  color: var(--cyan);
  margin: 0 8px;
  opacity: 0.7;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  user-select: none;
}
.btn .arr {
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  background: var(--blue);
  color: var(--text);
  box-shadow: 0 0 0 0 rgba(5, 89, 205, 0.4);
}
.btn-primary:hover {
  background: var(--blue-deep);
  box-shadow: 0 0 30px rgba(5, 89, 205, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 24px rgba(13, 209, 111, 0.18);
}

/* ---------- Section heading ---------- */
.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 56px;
}
.sec-head h2 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 12px 0 0;
}
.sec-head h2 em {
  font-style: normal;
  color: var(--green);
}
.sec-head .sec-lede {
  color: var(--text-mute);
  max-width: 380px;
  font-size: 15px;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .sec-head { grid-template-columns: 1fr; }
  .sec-head .sec-lede { max-width: none; }
}

/* ---------- Services ---------- */
#services {
  background: var(--bg-1);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.service {
  background: var(--bg-1);
  padding: 36px 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
  position: relative;
  transition: background .25s ease;
}
.service:hover {
  background: var(--bg-2);
}
.service .ico {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--cyan);
  transition: color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.service:hover .ico {
  color: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(13, 209, 111, 0.25);
}
.service .num {
  position: absolute;
  top: 22px; right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
}
.service h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}
.service p {
  color: var(--text-mute);
  margin: 0;
  font-size: 15px;
}
.service .tags {
  margin-top: auto;
  display: flex; gap: 6px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.service .tags span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

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

/* ---------- Work previews ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
}
.work-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-1);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 18px 40px -20px rgba(13, 209, 111, 0.35);
}
.work-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      rgba(164,195,249,0.04) 0 10px,
      transparent 10px 20px),
    var(--bg-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.work-thumb .ph-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}
.work-thumb .corner {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-transform: uppercase;
}
.work-meta {
  padding: 20px 22px 22px;
  display: grid;
  gap: 8px;
}
.work-meta .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.work-meta h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.work-meta p {
  color: var(--text-mute);
  font-size: 14px;
  margin: 0;
}

/* ---------- About ---------- */
#about { background: var(--bg-1); }
.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.mascot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 40%, rgba(13,209,111,0.18), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.mascot::before {
  content: "// mascot placeholder";
  position: absolute;
  top: 14px; left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.mascot svg { width: 70%; height: 70%; }
.about-copy h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 14px 0 18px;
}
.about-copy p {
  color: var(--text-mute);
  font-size: 17px;
  max-width: 56ch;
}
.about-copy p strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Social cards ---------- */
.socials {
  margin-top: 48px;
}
.socials-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.socials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .socials-grid { grid-template-columns: repeat(2, 1fr); }
}
.social-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 14px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.social-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(13, 209, 111, 0.18);
  transform: translateY(-2px);
}
.social-card .s-ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(164,195,249,0.06);
  display: grid; place-items: center;
  color: var(--cyan);
}
.social-card:hover .s-ico { color: var(--green); }
.social-card .s-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.social-card .s-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.social-card .s-action {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.social-card.copied .s-action {
  color: var(--green);
}
.social-card.copied {
  border-color: var(--green);
}

/* ---------- Contact ---------- */
.contact-inner {
  text-align: center;
  display: grid;
  gap: 28px;
  justify-items: center;
}
.contact-inner h2 {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 12px 0 0;
  max-width: 14ch;
}
.contact-inner h2 em {
  font-style: normal;
  color: var(--green);
  text-shadow: 0 0 40px rgba(13,209,111,0.4);
}
.contact-inner .sec-lede {
  color: var(--text-mute);
  max-width: 480px;
}
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 560px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-inner .nav-brand .wordmark { font-size: 15px; }
.footer-links {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer-links a:hover { color: var(--green); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ---------- Portfolio page ---------- */
.page-hero {
  padding: 160px 0 60px;
  background:
    radial-gradient(ellipse at top, rgba(13,209,111,0.08), transparent 50%),
    var(--bg-0);
  border-bottom: 1px solid var(--line);
}
.page-hero .crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.page-hero .crumb a:hover { color: var(--green); }
.page-hero h1 {
  font-size: clamp(56px, 10vw, 128px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin: 18px 0 14px;
}
.page-hero p {
  color: var(--text-mute);
  font-size: 18px;
  max-width: 560px;
  margin: 0;
}

.category {
  padding: clamp(64px, 9vw, 110px) 0;
}
.category + .category { border-top: 1px solid var(--line); }
.category:nth-child(odd) { background: var(--bg-0); }
.category:nth-child(even) { background: var(--bg-1); }

.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.cat-head h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 6px 0 0;
}
.cat-head .cat-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.cat-head .cat-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: 1fr; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
