:root {
  color-scheme: dark;
  --bg: #02030a;
  --charcoal: #090c14;
  --panel: rgba(14, 18, 31, 0.58);
  --panel-strong: rgba(16, 21, 36, 0.78);
  --line: rgba(145, 190, 255, 0.18);
  --text: #f6f8ff;
  --muted: #a8b0c6;
  --cyan: #46e8ff;
  --blue: #5579ff;
  --purple: #a35cff;
  --red: #ff4d6d;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a, button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  gap: 20px;
  align-content: center;
  background: radial-gradient(circle at 50% 30%, #111a35, #02030a 55%);
  transition: opacity .8s ease, visibility .8s ease;
}
.loader.loaded { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: .18em;
  text-shadow: 0 0 34px rgba(70, 232, 255, .7);
}
.loader-bar {
  width: min(360px, 70vw);
  height: 3px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}
.loader-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--red));
  animation: load 1.4s ease-in-out infinite;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 900;
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--red));
  box-shadow: 0 0 18px var(--cyan);
}

#particles, .ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#particles { z-index: -2; }
.ambient-bg {
  z-index: -3;
  background:
    radial-gradient(circle at 15% 20%, rgba(73, 103, 255, .24), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(163, 92, 255, .2), transparent 26%),
    radial-gradient(circle at 70% 70%, rgba(255, 77, 109, .14), transparent 30%),
    linear-gradient(180deg, #02030a 0%, #081022 46%, #02030a 100%);
}
.ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(4, 7, 15, .68);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #071018;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 24px rgba(70, 232, 255, .45);
}
.nav-links { display: flex; gap: 24px; color: var(--muted); font-size: .9rem; }
.nav-links a, .site-footer a { transition: color .25s ease, text-shadow .25s ease; }
.nav-links a:hover, .site-footer a:hover { color: white; text-shadow: 0 0 14px var(--cyan); }
.nav-cta {
  padding: 10px 16px;
  border: 1px solid rgba(70, 232, 255, .36);
  border-radius: var(--radius);
  background: rgba(70, 232, 255, .1);
}

.section {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 112px 0;
}
.hero {
  min-height: 100vh;
  width: 100%;
  padding: 126px max(16px, calc((100vw - 1180px) / 2)) 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, .64fr);
  align-items: center;
  gap: 54px;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 90px 90px;
  transform: perspective(800px) rotateX(62deg) translateY(10%);
  transform-origin: bottom;
  opacity: .3;
}
.hero-light {
  position: absolute;
  width: 52vw;
  height: 16vh;
  filter: blur(26px);
  opacity: .55;
  transform: rotate(-14deg);
  animation: streak 7s ease-in-out infinite alternate;
}
.hero-light-one { top: 20%; left: -18%; background: linear-gradient(90deg, transparent, rgba(70,232,255,.8), transparent); }
.hero-light-two { right: -18%; bottom: 22%; background: linear-gradient(90deg, transparent, rgba(255,77,109,.55), transparent); animation-delay: -2s; }
.hero-content, .portrait-stage { position: relative; z-index: 2; }
.eyebrow, .section-kicker {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  font-weight: 800;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: .95;
  letter-spacing: 0;
}
h1 {
  max-width: 860px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  text-transform: uppercase;
}
h2 { font-size: clamp(2.25rem, 5vw, 5rem); }
.hero-copy, .section-heading p {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  line-height: 1.7;
}
.type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  margin: 18px 0 26px;
}
.type-row strong {
  color: white;
  text-shadow: 0 0 16px var(--cyan);
}
.type-row strong::after {
  content: "|";
  color: var(--cyan);
  animation: blink .7s step-end infinite;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.button-primary {
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), #a4f1ff);
  box-shadow: 0 0 36px rgba(70, 232, 255, .32);
}
.button-ghost {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}
.button-red {
  border: 1px solid rgba(255,77,109,.42);
  background: rgba(255,77,109,.1);
  color: #ffd9df;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(70, 232, 255, .2); }

.portrait-stage { min-height: 560px; display: grid; place-items: center; }
.portrait-card { position: relative; width: min(410px, 86vw); aspect-ratio: 1; display: grid; place-items: center; }
.portrait-glow, .orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.portrait-glow {
  background: conic-gradient(from 0deg, var(--cyan), var(--purple), var(--red), var(--cyan));
  filter: blur(18px);
  opacity: .65;
  animation: spin 8s linear infinite;
}
.portrait-frame {
  position: relative;
  width: 82%;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.03));
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  border-radius: 50%;
  filter: contrast(1.04) saturate(1.02);
  box-shadow: inset 0 -30px 70px rgba(0,0,0,.55);
}
.orbit { border: 1px solid rgba(70,232,255,.22); animation: spin 14s linear infinite; }
.orbit-two { inset: 42px; border-color: rgba(255,77,109,.22); animation-direction: reverse; }
.section-heading { margin-bottom: 42px; }
.section-heading h2 { max-width: 950px; margin-bottom: 18px; }
.glass-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.about-layout {
  display: grid;
  grid-template-columns: .82fr 1fr;
  gap: 38px;
  align-items: start;
}
.about-copy { padding: 30px; color: #dfe6ff; line-height: 1.8; font-size: 1.05rem; }
.about-tags, .tool-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.about-tags span, .tool-cloud span {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  color: #dbe6ff;
  background: rgba(255,255,255,.05);
}

.skills-grid, .services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.skill-card, .service-card, .project-card, .testimonial-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 25, 43, .72), rgba(5, 8, 18, .62));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.skill-card::before, .service-card::before, .project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, transparent, rgba(70,232,255,.28), transparent, rgba(255,77,109,.18));
  opacity: 0;
  transition: opacity .3s ease;
}
.skill-card:hover::before, .service-card:hover::before, .project-card:hover::before { opacity: 1; }
.skill-card {
  min-height: 150px;
  padding: 22px;
}
.skill-card > *, .service-card > *, .project-info { position: relative; z-index: 1; }
.skill-card svg, .service-card svg { color: var(--cyan); filter: drop-shadow(0 0 10px rgba(70,232,255,.5)); }
.skill-card h3 { margin: 18px 0 18px; font-size: 1rem; }
.skill-card span {
  display: block;
  height: 5px;
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.skill-card span::after {
  content: "";
  display: block;
  width: var(--level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 16px var(--cyan);
}
.tool-cloud {
  justify-content: center;
  margin-top: 34px;
}
.tool-cloud span { animation: float 5s ease-in-out infinite; }
.tool-cloud span:nth-child(even) { animation-delay: -1.8s; }

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.filter-tabs button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255,255,255,.05);
  transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}
.filter-tabs button.active, .filter-tabs button:hover {
  color: #061018;
  background: var(--cyan);
  box-shadow: 0 0 26px rgba(70, 232, 255, .3);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.portfolio-empty {
  grid-column: 1 / -1;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 25, 43, .72), rgba(5, 8, 18, .62));
  box-shadow: var(--shadow);
}
.portfolio-empty svg {
  width: 48px;
  height: 48px;
  color: var(--cyan);
  filter: drop-shadow(0 0 14px rgba(70,232,255,.5));
}
.portfolio-empty h3 {
  margin: 0;
  font-size: 1.5rem;
}
.portfolio-empty p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.project-card {
  min-height: 430px;
  transition: transform .35s ease, opacity .35s ease;
}
.project-card.hidden {
  display: none;
}
.project-card:hover { transform: translateY(-8px); }
.video-thumb {
  position: relative;
  height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(70,232,255,.18), rgba(163,92,255,.16), rgba(255,77,109,.14));
}
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 18%, rgba(0,0,0,.35) 19%),
    linear-gradient(180deg, transparent, rgba(0,0,0,.58));
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04) brightness(.76);
  transform: scale(1.02);
  transition: filter .35s ease, transform .35s ease;
}
.project-card:hover .video-thumb img {
  filter: saturate(1.16) contrast(1.08) brightness(.96);
  transform: scale(1.08);
}
.video-thumb svg {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  padding: 15px;
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(70,232,255,.45);
  transition: transform .3s ease;
}
.project-card:hover .video-thumb svg { transform: scale(1.12); }
.scanline {
  position: absolute;
  inset: -30% 0 auto;
  height: 28%;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.22), transparent);
  animation: scan 3.4s linear infinite;
}
.project-info { padding: 22px; }
.project-info p {
  color: var(--cyan);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}
.project-info h3 { font-size: 1.35rem; }
.project-info span { display: block; color: var(--muted); line-height: 1.55; }
.project-info small { display: block; margin-top: 18px; color: #e5eaff; }

.services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-card { min-height: 190px; padding: 26px; transition: transform .3s ease; }
.service-card:hover { transform: translateY(-7px); }
.service-card h3 { margin: 22px 0 10px; }
.service-card p { color: var(--muted); line-height: 1.55; margin-bottom: 0; }

.testimonial-shell {
  display: grid;
  grid-template-columns: 52px minmax(0, 780px) 52px;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.testimonial-card { padding: 42px; text-align: center; }
.testimonial-card > svg { color: var(--purple); width: 42px; height: 42px; }
.testimonial-card p { color: #e9edff; font-size: clamp(1.15rem, 2vw, 1.7rem); line-height: 1.6; }
.testimonial-card strong { display: block; }
.testimonial-card span { color: var(--muted); }
.carousel-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}

.contact-layout {
  display: grid;
  grid-template-columns: .9fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-details { display: grid; gap: 12px; color: var(--muted); margin-top: 28px; }
.contact-details a { color: white; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.socials a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  transition: transform .25s ease, color .25s ease, box-shadow .25s ease;
}
.socials a:hover {
  color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(70,232,255,.28);
}
.contact-form { padding: 26px; display: grid; gap: 16px; }
.contact-form label {
  display: grid;
  gap: 8px;
  color: #dfe6ff;
  font-weight: 700;
}
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(0,0,0,.24);
  color: white;
  padding: 14px;
  outline: 0;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(70,232,255,.1);
}
.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--cyan);
  line-height: 1.5;
}
.form-status.error {
  color: #ff9aad;
}

.site-footer {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer p { margin: 0; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.video-modal.open {
  opacity: 1;
  visibility: visible;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(16px);
}
.video-modal-panel {
  position: relative;
  width: min(980px, 100%);
  border: 1px solid rgba(70,232,255,.28);
  border-radius: var(--radius);
  background: rgba(5, 8, 18, .92);
  box-shadow: 0 0 70px rgba(70,232,255,.22), var(--shadow);
  overflow: hidden;
}
.video-modal-panel iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  border: 0;
  background: black;
}
.video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(10px);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes streak { to { transform: rotate(-14deg) translateX(16%); opacity: .8; } }
@keyframes gradientMove { 50% { background-position: 100% 50%; } }
@keyframes scan { to { transform: translateY(520%); } }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .portrait-stage { min-height: 440px; }
  .about-layout, .contact-layout { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-grid, .services-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .section { padding: 82px 0; }
  .site-header { top: 10px; width: calc(100% - 20px); }
  .nav-cta { display: none; }
  .hero { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
  .hero-actions .button { width: 100%; }
  .portrait-stage { min-height: 360px; }
  .skills-grid, .portfolio-grid, .services-grid { grid-template-columns: 1fr; }
  .video-thumb { height: 230px; }
  .testimonial-shell { grid-template-columns: 1fr; }
  .carousel-btn { margin: auto; }
  .testimonial-card { padding: 28px 18px; }
  .contact-form { padding: 18px; }
}

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