:root {
  --bg: #05070d;
  --bg-soft: #0c111b;
  --text: #e6edf8;
  --muted: #9eacc4;
  --line: rgba(130, 164, 215, 0.24);
  --accent: #11d3c5;
  --accent-2: #f4a261;
  --card: rgba(10, 16, 29, 0.72);
  --danger: #ff6b7a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -20%, rgba(17, 211, 197, 0.16), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(244, 162, 97, 0.1), transparent 24%),
    linear-gradient(170deg, #04060c 0%, #060913 30%, #0a1020 100%);
  min-height: 100vh;
  overflow-x: clip;
}

::selection {
  background: rgba(17, 211, 197, 0.25);
  color: #f4fbff;
}

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

#tech-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.6;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 96%);
}

.preloader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #060913;
  z-index: 999;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-mark {
  width: 86px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.5rem;
  box-shadow: 0 0 40px rgba(17, 211, 197, 0.2);
  animation: pulse 1.2s ease-in-out infinite alternate;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  width: min(1200px, calc(100% - 2rem));
  padding: 1rem 1.1rem;
  background: rgba(6, 9, 19, 0.64);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 0 0 18px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.89rem;
  padding: 0.52rem 0.75rem;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.26s ease, background-color 0.26s ease, transform 0.26s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(17, 211, 197, 0.15);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 100;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: grow linear both;
    animation-timeline: scroll();
  }
}

main {
  width: min(1200px, calc(100% - 2rem));
  margin: 1.4rem auto 0;
}

.section {
  padding: clamp(3.2rem, 8vw, 7rem) 0;
  border-bottom: 1px solid rgba(130, 164, 215, 0.18);
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.74rem;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-family: "Chakra Petch", sans-serif;
}

h2 {
  font-size: clamp(1.7rem, 5vw, 3.2rem);
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero {
  min-height: calc(100svh - 90px);
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(1.2rem, 3vw, 2rem);
}

.hero h1 {
  font-size: clamp(2.2rem, 7vw, 5rem);
  margin-bottom: 1rem;
}

.gradient {
  background: linear-gradient(96deg, var(--accent) 0%, #8affd4 40%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 66ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.35rem 0 1.1rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(90deg, var(--accent), #6df7ed);
  color: #06131b;
  font-weight: 700;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(17, 211, 197, 0.24);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.hero-tags {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-panel,
.glass,
.project-card,
.testimonial,
.time-card,
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.glass::after,
.project-card::after,
.testimonial::after,
.time-card::after,
.stat::after {
  content: "";
  position: absolute;
  inset: auto -40% -160% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(17, 211, 197, 0.14), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.glass:hover::after,
.project-card:hover::after,
.testimonial:hover::after,
.time-card:hover::after,
.stat:hover::after {
  opacity: 1;
}

.hero-panel {
  padding: 1.3rem;
  position: relative;
  overflow: hidden;
}

.hero-panel h2 {
  font-size: 1.15rem;
}

.hero-panel ul {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.hero-panel li {
  padding: 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 56px;
  bottom: -56px;
  background: linear-gradient(180deg, transparent, rgba(17, 211, 197, 0.22), transparent);
  animation: scan 6s linear infinite;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.glass {
  padding: 1.2rem;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed rgba(158, 172, 196, 0.18);
}

.meta-list span {
  color: var(--muted);
}

.meta-list strong {
  font-size: 0.9rem;
  text-align: right;
}

.stats-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat {
  padding: 1.2rem;
}

.stat-number {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-family: "Chakra Petch", sans-serif;
  color: var(--accent);
}

.stat-label {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
}

.timeline {
  display: grid;
  gap: 0.9rem;
}

.time-card {
  padding: 1.25rem;
}

.time {
  margin: 0 0 0.5rem;
  color: var(--accent-2);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.company {
  margin: 0.3rem 0 0.7rem;
}

.time-card ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.project-grid,
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.medium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.medium-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem;
  display: grid;
  gap: 0.7rem;
  transition: border-color 0.28s ease, transform 0.28s ease;
}

.medium-item:hover {
  border-color: rgba(17, 211, 197, 0.52);
  transform: translateY(-3px);
}

.medium-item h3 {
  font-size: 1rem;
  margin: 0;
}

.medium-item p {
  margin: 0;
  font-size: 0.9rem;
}

.medium-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(158, 172, 196, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.medium-title a {
  color: #f1f7ff;
}

.medium-title a:hover {
  color: var(--accent);
}

.medium-read {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--accent);
}

.medium-meta {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.medium-loading {
  margin: 0;
  color: var(--muted);
}

.project-card,
.testimonial {
  padding: 1.1rem;
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.project-card h3,
.time-card h3 {
  color: #f2f8ff;
}

.project-card:hover,
.testimonial:hover {
  transform: translateY(-5px);
  border-color: rgba(17, 211, 197, 0.6);
}

.inline-link {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--accent);
}

.form-row {
  display: grid;
  gap: 0.42rem;
  margin-bottom: 0.75rem;
}

label {
  font-size: 0.86rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 7, 16, 0.62);
  color: var(--text);
  font: inherit;
  padding: 0.78rem;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(17, 211, 197, 0.5);
  border-color: rgba(17, 211, 197, 0.5);
}

.php-email-form .loading,
.php-email-form .error-message,
.php-email-form .sent-message {
  display: none;
  margin: 0.65rem 0;
  font-size: 0.88rem;
}

.php-email-form .loading {
  color: var(--muted);
}

.php-email-form .error-message {
  color: var(--danger);
}

.php-email-form .sent-message {
  color: var(--accent);
}

.d-block {
  display: block !important;
}

.contact-note {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.87rem;
  color: var(--muted);
  border: 1px dashed rgba(158, 172, 196, 0.28);
  border-radius: 10px;
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.02);
}

.contact-note.is-success {
  color: var(--accent);
  border-color: rgba(17, 211, 197, 0.42);
}

.command-panel {
  display: grid;
  gap: 0.9rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.quick-actions .btn {
  width: 100%;
}

.map-card {
  grid-column: 1 / -1;
}

.map-card iframe {
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 7, 16, 0.62);
}

.site-footer {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(6, 9, 19, 0.74);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.socials a {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-stagger].is-visible > *:nth-child(2) {
  transition-delay: 0.08s;
}

.reveal[data-stagger].is-visible > *:nth-child(3) {
  transition-delay: 0.14s;
}

.reveal[data-stagger].is-visible > *:nth-child(4) {
  transition-delay: 0.2s;
}

.reveal[data-stagger].is-visible > *:nth-child(5) {
  transition-delay: 0.26s;
}

@media (max-width: 1024px) {
  .hero-grid,
  .stats-grid,
  .project-grid,
  .medium-grid,
  .testimonial-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: fixed;
    top: 70px;
    left: 1rem;
    right: 1rem;
    z-index: 70;
    background: rgba(4, 7, 14, 0.95);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .mobile-toggle {
    display: inline-block;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    border-radius: 0 0 12px 12px;
  }

  .btn {
    width: 100%;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal[data-stagger] > * {
    opacity: 1;
    transform: none;
  }

  #tech-canvas,
  .ambient {
    display: none;
  }
}

@keyframes pulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.07);
  }
}

@keyframes scan {
  to {
    transform: translateY(-280px);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}
