/* ===== AS Developers portfolio — styles ===== */
:root {
  --bg: #050507;
  --panel: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2f3f7;
  --muted: #9a9fb0;
  --red: #ff2e2e;
  --orange: #ff7a45;
  --green: #35e08a;
  --font-display: "Syne", "Arial Black", sans-serif;
  --brand-size: 1rem;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 72px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; }
#heroCanvas, #dotCanvas { touch-action: pan-y; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Chrome-metal headline text */
.chrome {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  padding-bottom: 0.14em;
  background: linear-gradient(180deg, #ffffff 20%, #8d96ad 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(120, 140, 255, 0.18));
}
.big { font-size: clamp(3rem, 9vw, 7.5rem); }
.big--right { text-align: right; }

/* ===== Loader ===== */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  animation: pulse 1.1s ease-out infinite;
}
.is-hidden { display: none; }
.loader { cursor: pointer; }
.loader__logo {
  width: clamp(110px, 16vw, 170px); height: auto;
  animation: logoIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both, logoGlow 1.6s ease-in-out 0.8s infinite;
}
@keyframes logoIn { from { opacity: 0; transform: scale(0.8); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes logoGlow { 50% { filter: drop-shadow(0 0 26px rgba(120, 150, 255, 0.55)); } }
.loader__word {
  position: absolute;
  font-family: "Vladimir Script", "Great Vibes", cursive;   /* Vladimir Script if installed, else Great Vibes */
  font-weight: 400; letter-spacing: 0; line-height: 1.3;
  padding: 0.1em 0.25em;
  font-size: clamp(3.8rem, 14vw, 11rem);
  background: linear-gradient(180deg, #fff 25%, #8d96ad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.loader__full {
  position: absolute; width: min(72vw, 480px); height: auto;
  opacity: 0; transform: scale(0.9); filter: blur(8px);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.7s ease;
}
.loader__full.show { opacity: 1; transform: none; filter: blur(0); }
.loader__word.pop { animation: wordPop 0.45s ease-out both; }
@keyframes wordPop {
  from { opacity: 0; transform: scale(0.92); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}
.hero__role { opacity: 0; transition: opacity 0.9s ease 1s; }
body.is-ready .hero__role { opacity: 1; }
@keyframes pulse {
  to { box-shadow: 0 0 0 60px rgba(255, 255, 255, 0); }
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.85), rgba(5, 5, 7, 0));
  backdrop-filter: blur(6px);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: var(--brand-size); }
.nav__brand img { height: 26px; width: auto; }
.nav__links { display: flex; gap: clamp(12px, 2.4vw, 28px); font-size: 0.8rem; color: var(--muted); }
.nav__links a { transition: color 0.2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--red); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; align-items: end;
  padding: 0 clamp(16px, 4vw, 48px) clamp(48px, 10vh, 110px);
  overflow: hidden;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__text { position: relative; z-index: 2; pointer-events: none; text-align: center; }
.hero__title { font-size: clamp(2.6rem, 12vw, 12rem); white-space: nowrap; max-width: 100%; text-align: center; }
.hero__title--letters {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  filter: drop-shadow(0 6px 24px rgba(120, 140, 255, 0.22));
}
.hero__title--letters span {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 20%, #8d96ad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(70%) rotate(8deg);
  transition: opacity 0.7s ease calc(var(--i) * 0.07s), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 0.07s);
}
body.is-ready .hero__title--letters span { opacity: 1; transform: none; }
.hero__role { margin: 14px 0 0; color: var(--muted); font-size: 1rem; }
.hero__hint {
  position: absolute; right: clamp(16px, 4vw, 48px); bottom: 24px; z-index: 2;
  font-size: 0.75rem; color: var(--muted);
}

/* ===== About ===== */
.about {
  display: grid; grid-template-columns: 1fr 1.7fr; gap: clamp(24px, 4vw, 64px); align-items: start;
  padding: 120px clamp(16px, 4vw, 48px) 100px;
  position: relative;
}
.about__label { position: absolute; top: 90px; left: clamp(16px, 4vw, 48px); font-size: 0.75rem; color: var(--muted); }
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(8px);
}
.about__side { position: sticky; top: 130px; }
.about .big { font-size: clamp(3.4rem, 10vw, 9rem); }
.about__logo { display: block; width: min(100%, 320px); height: auto; margin-top: clamp(28px, 5vw, 64px); opacity: 0.92; }
.about__card { padding: clamp(24px, 3.5vw, 52px); width: 100%; max-width: none; justify-self: stretch; }
.about__card p { font-size: clamp(1.1rem, 1.65vw, 1.55rem); line-height: 1.55; color: #e4e6ee; }
.about__card p + p { margin-top: 1.1em; }
.w { opacity: 0.2; transition: opacity 0.35s ease; }
.w.lit { opacity: 1; }
.about__card strong { color: #fff; }

/* ===== Marquee ===== */
.marquee { padding: 30px 0; border-block: 1px solid var(--line); overflow: hidden; display: grid; gap: 18px; }
.marquee__row { display: flex; gap: 48px; width: max-content; animation: scroll 40s linear infinite; font-size: 0.8rem; color: var(--muted); }
.marquee__row--rev { animation-direction: reverse; animation-duration: 55s; }
.marquee__row span::before { content: "• "; color: var(--red); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===== Services ===== */
.services { padding: 100px clamp(16px, 4vw, 48px); }
.services__list { margin-top: 48px; border-top: 1px solid var(--line); }
.services__list li {
  display: grid; grid-template-columns: clamp(52px, 6vw, 90px) 1.3fr 1fr auto; align-items: center; gap: clamp(12px, 2vw, 32px);
  padding: clamp(28px, 4vw, 48px) 8px; border-bottom: 1px solid var(--line);
  transition: background 0.25s, padding 0.25s;
}
.services__list li:hover { background: rgba(255, 46, 46, 0.06); padding-left: 24px; }
.svc__no { font-family: var(--font-display); font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--muted); }
.svc__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 3.4vw, 2.7rem); line-height: 1.05; text-transform: uppercase; }
.svc__desc { font-size: clamp(0.95rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 38ch; }
.svc__arrow { color: var(--red); font-size: clamp(1.6rem, 3vw, 2.4rem); transition: transform 0.25s; }
.services__list li:hover .svc__arrow { transform: translate(4px, -4px); }

/* ===== Projects ===== */
.projects { padding: 120px clamp(16px, 4vw, 48px); }
.eyebrow { font-size: 0.75rem; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--red); border-radius: 2px; }
.project {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 72px);
  align-items: center; margin-top: 90px;
}
.project--flip { grid-template-columns: 1fr 1.1fr; }
.project--flip .project__media { order: 2; }
.project__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; }
.project__title em { font-family: var(--font-serif); font-weight: 400; display: block; margin-top: 4px; }
.project__lead { margin: 18px 0 10px; font-weight: 700; }
.project__body p:last-child { color: var(--muted); max-width: 46ch; }

/* CSS-only device mock-ups (swap for real screenshots later) */
.device {
  border-radius: 22px; padding: 10px;
  background: linear-gradient(145deg, #1b1e27, #0b0c10);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(60, 90, 255, 0.12);
  transition: transform 0.4s ease;
}
.device:hover { transform: perspective(900px) rotateY(-4deg) rotateX(2deg) scale(1.02); }
.device__bar { display: flex; gap: 6px; padding: 4px 6px 10px; }
.device__bar i { width: 8px; height: 8px; border-radius: 50%; background: #2c303b; }
.device__screen {
  aspect-ratio: 16 / 10; border-radius: 12px; padding: 14px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start;
}
.device__screen b { height: 56px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); }
.device__screen b:nth-child(1) { grid-column: span 3; height: 48px; background: rgba(255, 255, 255, 0.14); }
.device__screen--shop { background: linear-gradient(135deg, #0f2a5c, #08111f); }
.device__screen--app  { background: linear-gradient(135deg, #0b3d33, #07130f); }
.device__screen--ai   { background: linear-gradient(135deg, #4a0f1a, #12070a); }

/* ===== Play ===== */
.play { padding: 120px clamp(16px, 4vw, 48px); text-align: center; border-top: 1px solid var(--red); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 0.75rem;
  border: 1px solid rgba(255, 46, 46, 0.5); background: rgba(255, 46, 46, 0.12); color: #ffb3b3;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.pill--green { border-color: rgba(53, 224, 138, 0.4); background: rgba(53, 224, 138, 0.1); color: #b8f5d6; }
.pill--green::before { background: var(--green); }
#dotCanvas { display: block; width: min(100%, 1000px); height: 300px; margin: 30px auto 10px; cursor: crosshair; }
.play__bar {
  display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
  padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
}
.play__bar input {
  background: transparent; border: 0; color: var(--text); font: inherit;
  padding: 8px 12px; min-width: 220px;
}
.play__bar input:focus { outline: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  padding: 13px 24px; border-radius: 999px;
  font: 700 0.9rem var(--font-body); color: #1a0a05;
  background: linear-gradient(180deg, var(--orange), #ff5a2e);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 90, 46, 0.35); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { box-shadow: none; border-color: #fff; }
.btn--small { padding: 9px 18px; font-size: 0.8rem; }

/* ===== Contact ===== */
.contact {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  padding: 140px clamp(16px, 4vw, 48px) 100px;
}
.contact__title {
  font-family: var(--font-display); font-weight: 800; line-height: 0.95;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem); margin: 22px 0;
}
.contact__title em {
  font-family: var(--font-serif); font-weight: 400; font-size: 1.1em;
  background: linear-gradient(180deg, #ffd27a, #ff6a2e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact__text { color: var(--muted); max-width: 44ch; margin-bottom: 28px; }
.contact__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact__card { padding: 8px 26px; }
.contact__card div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__card div:last-child { border-bottom: 0; }
.contact__card dt { font-size: 0.72rem; color: var(--muted); }
.contact__card dd { font-weight: 700; }
.socials { display: flex; gap: 10px; margin-top: 6px; }
.socials a {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(255, 255, 255, 0.07); font-size: 0.8rem; transition: background 0.2s;
}
.socials a:hover { background: var(--red); }

/* ===== Footer ===== */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 24px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line);
  font-size: 0.78rem; color: var(--muted);
}
.footer a:hover { color: var(--red); }

.nav__toggle { display: none; }

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .nav { backdrop-filter: none; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .nav__toggle {
    display: grid; gap: 6px; place-content: center; width: 44px; height: 44px;
    background: transparent; border: 0; cursor: pointer; position: relative; z-index: 61;
  }
  .nav__toggle span { display: block; width: 24px; height: 2px; background: #fff; transition: transform 0.3s, opacity 0.3s; }
  .nav__toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: fixed; z-index: 60;
    top: calc(64px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px;
    display: flex; flex-direction: column; padding: 8px;
    background: rgba(10, 10, 14, 0.97); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    font-family: var(--font-display); font-weight: 700; font-size: var(--brand-size); color: var(--text);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .nav__links a { padding: 15px 14px; color: var(--text); }
  .nav__links a + a { border-top: 1px solid var(--line); }
  .nav__links a.is-active { color: var(--red); }
  .nav__links.open { opacity: 1; visibility: visible; transform: none; }
  .nav__brand { position: relative; z-index: 61; }
  .hero__title { font-size: 13.5vw; }
  .hero__title--letters { filter: none; }
  .js [data-reveal] { transform: translateY(24px); }
  .play__bar input { font-size: 16px; }
  .hero { padding-bottom: 72px; }
  .glass { backdrop-filter: none; background: rgba(255, 255, 255, 0.07); }
  .about { padding-top: 100px; }
  .services, .projects { padding-top: 70px; padding-bottom: 70px; }
  .project { margin-top: 56px; }
  #dotCanvas { height: 240px; }
  .play { padding: 80px 16px; }
  .play__bar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .play__bar input { grid-column: 1 / -1; min-width: 0; text-align: center; }
  .contact { padding-top: 90px; }
  .contact__actions .btn { flex: 1 1 100%; text-align: center; }
  .btn { padding: 15px 24px; }
  .footer { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .about, .project, .project--flip, .contact { grid-template-columns: 1fr; }
  .about__side { position: static; }
  .about__logo { width: min(70%, 240px); }
  .project--flip .project__media { order: 0; }
  .about__card { justify-self: start; }
  .services__list li { grid-template-columns: 44px 1fr auto; }
  .svc__desc { display: none; }
  #dotCanvas { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ===== Project tags & links ===== */
.tag { display: inline-block; margin-bottom: 14px; font-size: 0.75rem; color: var(--muted); }
.tag--live { color: var(--green); }
.tag--soon { color: var(--orange); }
.project__link {
  display: inline-block; margin-top: 18px; font-weight: 700; font-size: 0.9rem;
  color: var(--red); border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.project__link--off { color: var(--muted); border-bottom: 1px dashed var(--line); cursor: default; }
.contact__card dd a:hover { color: var(--red); }

/* ===== Scroll reveal ===== */
.js [data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease var(--d, 0s), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="wipe"] {
  opacity: 0; transform: translateY(60px) skewY(3deg); transform-origin: left bottom;
  transition: opacity 0.9s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js [data-reveal="wipe"].in { opacity: 1; transform: none; }

.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand img { height: 20px; width: auto; }

/* ===== Project screenshots ===== */
.project__media { display: flex; justify-content: center; }
.shot {
  display: block; width: 100%; padding: 0; cursor: zoom-in;
  background: #0b0c10; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(60, 90, 255, 0.12);
  transition: transform 0.4s ease;
}
.shot img { display: block; width: 100%; height: auto; }
.shot--tall { width: auto; max-width: 100%; }
.shot--tall img { width: auto; max-width: 100%; max-height: min(78vh, 680px); }
@media (hover: hover) { .shot:hover { transform: scale(1.015); } }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 16px; background: rgba(0, 0, 0, 0.93); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); border-radius: 12px; }
body.no-scroll { overflow: hidden; }