/* ═══════════════════════════════════════════════════════
   Saidxon Xaydarov — portfolio
   Swiss / neo-brutalist grid. Hairline rules, no shadows.
   ═══════════════════════════════════════════════════════ */

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --blue: #1f3bb3;
  --blue-deep: #16298a;
  --muted: #5b5b60;
  --rule: #0a0a0a;
  --hair: 1px;
  --pad: 40px;
  --backdrop: #080c1c;

  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--backdrop);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--blue); color: #fff; }

/* ── page frame ─────────────────────────────────────── */
.frame {
  max-width: 1320px;
  margin: 28px auto;
  background: var(--paper);
  border: var(--hair) solid var(--rule);
}

/* ── shared type ────────────────────────────────────── */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(44px, 8.2vw, 108px);
  line-height: .92;
  letter-spacing: -.035em;
  text-transform: lowercase;
}
.display.sm { font-size: clamp(36px, 5.4vw, 72px); }
.display .paren { color: var(--ink); font-weight: 400; }

.h-lg {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.02;
  letter-spacing: -.03em;
  text-transform: lowercase;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  color: var(--blue);
  text-transform: uppercase;
}

.lead { color: var(--muted); font-size: 15.5px; max-width: 56ch; }

.arrow {
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1;
  transition: transform .25s ease;
}

/* ── header ─────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px var(--pad);
  border-bottom: var(--hair) solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
}

.logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -.06em;
  line-height: 1;
}
.logo span { border-bottom: 3px solid var(--blue); padding-bottom: 2px; }

.nav { display: flex; gap: 26px; margin-left: 22px; }
.nav a {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }

.header-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.lang { display: flex; border: var(--hair) solid var(--rule); }
.lang button {
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  border-right: var(--hair) solid var(--rule);
  transition: background .18s, color .18s;
}
.lang button:last-child { border-right: 0; }
.lang button:hover { background: #f0f2f8; }
.lang button.is-active { background: var(--ink); color: var(--paper); }

.btn-ghost {
  border: var(--hair) solid var(--rule);
  padding: 12px 30px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.burger.is-open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ── hero ───────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--hair) solid var(--rule);
}

.hero-left {
  padding: 64px var(--pad) 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  border-right: var(--hair) solid var(--rule);
}

.hero-sub { color: var(--muted); max-width: 44ch; font-size: 15.5px; }

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

.btn-solid {
  background: var(--blue);
  color: #fff;
  padding: 16px 40px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 500;
  border: var(--hair) solid var(--blue);
  transition: background .2s, border-color .2s;
}
.btn-solid:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

.btn-line {
  border: var(--hair) solid var(--rule);
  padding: 16px 34px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.btn-line:hover { background: var(--ink); color: var(--paper); }

.hero-right { position: relative; display: flex; padding: var(--pad); }

.visual { flex: 1; overflow: hidden; border: var(--hair) solid var(--rule); min-height: 380px; }
.visual svg { width: 100%; height: 100%; }

.iso { transform-origin: center; animation: float 9s ease-in-out infinite; }
.iso-2 { animation-duration: 11s; animation-delay: -2s; }
.iso-3 { animation-duration: 8s;  animation-delay: -4s; }
.iso-4 { animation-duration: 12s; animation-delay: -1s; }
.iso-5 { animation-duration: 14s; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.socials {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  display: flex;
  border: var(--hair) solid var(--rule);
  background: var(--paper);
}
.socials a {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-right: var(--hair) solid var(--rule);
  transition: background .2s, color .2s;
}
.socials a:last-child { border-right: 0; }
.socials a:hover { background: var(--ink); color: var(--paper); }
.socials svg { width: 24px; height: 24px; }

/* ── about ──────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 1fr .78fr 1fr;
  border-bottom: var(--hair) solid var(--rule);
}

.about-text {
  padding: 56px var(--pad);
  border-right: var(--hair) solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.numbered { display: flex; flex-direction: column; gap: 22px; counter-reset: n; margin-top: 6px; }
.numbered li { counter-increment: n; }
.numbered h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 5px;
}
.numbered h3::before {
  content: counter(n) ". ";
  color: var(--blue);
}
.numbered p { color: var(--muted); font-size: 14.5px; }

.about-visual { border-right: var(--hair) solid var(--rule); overflow: hidden; }
.portrait { height: 100%; min-height: 460px; }
.portrait svg { width: 100%; height: 100%; }

.about-side { display: flex; flex-direction: column; }

.stats { border-bottom: var(--hair) solid var(--rule); }
.stat {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px var(--pad);
  border-bottom: var(--hair) solid var(--rule);
}
.stat:last-child { border-bottom: 0; }
.stat .num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 34px;
  color: var(--blue);
  letter-spacing: -.04em;
}
.stat p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.teaser {
  padding: 26px var(--pad);
  border-bottom: var(--hair) solid var(--rule);
  display: block;
  transition: background .2s;
}
.teaser:last-child { border-bottom: 0; }
.teaser:hover { background: #f4f6fc; }
.teaser:hover .arrow { transform: translate(4px, -4px); }
.teaser-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.teaser h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -.03em;
  text-transform: lowercase;
}
.teaser p { color: var(--muted); font-size: 14px; }

/* ── section head ───────────────────────────────────── */
.section-head {
  padding: 48px var(--pad) 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.section-head p { color: var(--muted); font-size: 14.5px; max-width: 46ch; }

/* ── services ───────────────────────────────────────── */
.services { border-bottom: var(--hair) solid var(--rule); }

.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--hair) solid var(--rule);
}
.card {
  padding: 32px var(--pad);
  border-right: var(--hair) solid var(--rule);
  border-bottom: var(--hair) solid var(--rule);
  transition: background .2s;
}
.card:nth-child(3n) { border-right: 0; }
.card:nth-last-child(-n+3) { border-bottom: 0; }
.card:hover { background: #f4f6fc; }
.card .idx {
  display: block;
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 22px;
}
.card h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.025em;
  text-transform: lowercase;
  margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 14px; }

/* ── work ───────────────────────────────────────────── */
.work { border-bottom: var(--hair) solid var(--rule); }

.project { display: block; transition: background .2s; }
.project:hover .arrow { transform: translate(4px, -4px); }

.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: var(--hair) solid var(--rule);
  border-bottom: var(--hair) solid var(--rule);
}
.project-media { overflow: hidden; border-right: var(--hair) solid var(--rule); min-height: 340px; }
.project-media svg { width: 100%; height: 100%; }
.project-body { padding: 38px var(--pad); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.featured:hover { background: #f4f6fc; }

.project-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--blue);
  border: var(--hair) solid var(--blue);
  padding: 4px 10px;
}
.project h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 46px);
  letter-spacing: -.04em;
}
.project p { color: var(--muted); font-size: 14.5px; max-width: 48ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips li {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  border: var(--hair) solid var(--rule);
  padding: 5px 11px;
}

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.project.small {
  padding: 30px 26px;
  border-right: var(--hair) solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project.small:last-child { border-right: 0; }
.project.small:hover { background: #f4f6fc; }
.project.small h3 { font-size: 24px; }
.project.small p { font-size: 13.5px; }
.project.small .chips li { font-size: 10.5px; padding: 4px 8px; }

/* ── stack ──────────────────────────────────────────── */
.stack { border-bottom: var(--hair) solid var(--rule); }

.marquee {
  display: flex;
  gap: 0;
  overflow: hidden;
  border-top: var(--hair) solid var(--rule);
  border-bottom: var(--hair) solid var(--rule);
  background: var(--ink);
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  gap: 44px;
  padding-right: 44px;
  flex: 0 0 auto;
  animation: slide 34s linear infinite;
}
.marquee span {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--paper);
  white-space: nowrap;
  letter-spacing: -.02em;
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.stack-cols { display: grid; grid-template-columns: repeat(4, 1fr); }
.stack-col {
  padding: 32px var(--pad);
  border-right: var(--hair) solid var(--rule);
}
.stack-col:last-child { border-right: 0; }
.stack-col h3 {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  text-transform: lowercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: var(--hair) solid var(--rule);
}
.stack-col li { color: var(--muted); font-size: 13.5px; padding: 5px 0; }

/* ── contact ────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--hair) solid var(--rule);
}
.contact-left {
  padding: 56px var(--pad);
  border-right: var(--hair) solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
}
.contact-right { display: flex; flex-direction: column; }

.contact-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 26px var(--pad);
  border-bottom: var(--hair) solid var(--rule);
  flex: 1;
  transition: background .2s;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row:not(.static):hover { background: var(--ink); color: var(--paper); }
.contact-row:hover .arrow { transform: translate(4px, -4px); }
.c-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .55; }
.c-val { font-family: var(--f-display); font-size: clamp(15px, 1.5vw, 19px); font-weight: 500; letter-spacing: -.02em; word-break: break-word; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ── footer ─────────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px var(--pad);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}
.footer a:hover { color: var(--blue); }

/* ── reveal on scroll ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.22,.8,.3,1); }

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 1080px) {
  .about { grid-template-columns: 1fr 1fr; }
  .about-visual { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .project.small:nth-child(2n) { border-right: 0; }
  .project.small:nth-child(-n+2) { border-bottom: var(--hair) solid var(--rule); }
  .stack-cols { grid-template-columns: repeat(2, 1fr); }
  .stack-col:nth-child(2n) { border-right: 0; }
  .stack-col:nth-child(-n+2) { border-bottom: var(--hair) solid var(--rule); }
}

@media (max-width: 860px) {
  :root { --pad: 22px; }
  .frame { margin: 0; border-left: 0; border-right: 0; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--paper);
    border-bottom: var(--hair) solid var(--rule);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px var(--pad); border-bottom: var(--hair) solid #e6e6ea; }
  .header { position: sticky; }
  .burger { display: flex; }
  .btn-ghost { display: none; }

  .hero { grid-template-columns: 1fr; }
  .hero-left { border-right: 0; border-bottom: var(--hair) solid var(--rule); padding: 44px var(--pad); }
  .visual { min-height: 300px; }
  .socials { right: var(--pad); bottom: var(--pad); }
  .socials a { width: 52px; height: 52px; }

  .about { grid-template-columns: 1fr; }
  .about-text { border-right: 0; border-bottom: var(--hair) solid var(--rule); }

  .grid-6 { grid-template-columns: 1fr; }
  .card { border-right: 0; border-bottom: var(--hair) solid var(--rule); }
  .card:last-child { border-bottom: 0; }

  .featured { grid-template-columns: 1fr; }
  .project-media { border-right: 0; border-bottom: var(--hair) solid var(--rule); min-height: 240px; }
  .grid-4 { grid-template-columns: 1fr; }
  .project.small { border-right: 0; border-bottom: var(--hair) solid var(--rule); }
  .project.small:last-child { border-bottom: 0; }

  .stack-cols { grid-template-columns: 1fr; }
  .stack-col { border-right: 0; border-bottom: var(--hair) solid var(--rule); }
  .stack-col:last-child { border-bottom: 0; }

  .contact { grid-template-columns: 1fr; }
  .contact-left { border-right: 0; border-bottom: var(--hair) solid var(--rule); }
  .contact-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .c-label { grid-column: 1 / -1; }

  .footer { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
