:root {
  --bg: #07111f;
  --bg-soft: #0c1a2e;
  --surface: rgba(11, 24, 44, 0.72);
  --surface-strong: rgba(13, 27, 49, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #edf4ff;
  --text-soft: #b7c7dc;
  --title: #ffffff;
  --primary: #3dd9c4;
  --primary-strong: #1bb5ff;
  --secondary: #8b5cf6;
  --shadow: 0 20px 60px rgba(2, 8, 22, 0.35);
  --radius: 24px;
  --container: min(1180px, calc(100% - 2rem));
  --header-height: 88px;
  --transition: 240ms ease;
}

body.light-mode {
  --bg: #eef5ff;
  --bg-soft: #dfeafa;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --card-border: rgba(14, 23, 43, 0.08);
  --text: #20304a;
  --text-soft: #54657e;
  --title: #0c1a2e;
  --shadow: 0 20px 45px rgba(86, 106, 145, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(27, 181, 255, 0.18), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(139, 92, 246, 0.22), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, #091425 45%, var(--bg-soft) 100%);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  position: relative;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(5, 11, 22, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-mode .site-header {
  background: rgba(239, 246, 255, 0.88);
  border-bottom-color: rgba(14, 23, 43, 0.08);
}

.navbar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.brand-text {
  display: grid;
  gap: 0.12rem;
}

.brand-text strong {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  color: var(--title);
}

.brand-text small {
  color: var(--text-soft);
  font-size: 0.82rem;
}

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

.site-nav a,
.theme-toggle {
  color: var(--text-soft);
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.site-nav a {
  padding: 0.85rem 0.25rem;
  position: relative;
  font-weight: 600;
  font-size: 0.96rem;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.45rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: transform var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--title);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle,
.theme-toggle,
.back-to-top {
  border: 0;
  cursor: pointer;
}

.theme-toggle,
.nav-toggle,
.back-to-top {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--title);
}

body.light-mode .theme-toggle,
body.light-mode .nav-toggle,
body.light-mode .back-to-top {
  background: rgba(14, 23, 43, 0.06);
}

.theme-toggle:hover,
.nav-toggle:hover,
.back-to-top:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
}

.hero {
  padding: clamp(3.5rem, 7vw, 6rem) 0 3rem;
}

.hero-grid,
.about-grid,
.contact-grid,
.two-column {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-grid {
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(100vh - var(--header-height) - 1rem);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(61, 217, 196, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.hero-copy h1,
.section-heading h2,
.about-copy h2,
.enterprise-panel h2,
.contact-copy h2 {
  font-family: 'Sora', sans-serif;
  color: var(--title);
  line-height: 1.08;
  margin: 1rem 0 1rem;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  max-width: 12ch;
}

.hero-copy h1 span {
  background: linear-gradient(90deg, var(--primary), var(--primary-strong), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description,
.section-heading p,
.about-copy p,
.enterprise-panel p,
.contact-copy p,
.service-card p,
.project-card p,
.timeline-item p,
.footer-grid p,
.form-note {
  color: var(--text-soft);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.hero-highlights div {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
}

.hero-highlights i,
.section-kicker,
.service-icon,
.floating-icon,
.feature-item i,
.contact-card i,
.timeline-year {
  color: var(--primary);
}

.hero-actions,
.enterprise-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.3rem;
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--title);
  border-color: rgba(255, 255, 255, 0.14);
}

body.light-mode .btn-secondary {
  border-color: rgba(14, 23, 43, 0.12);
}

.btn-full {
  width: 100%;
}

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

.stat-card,
.glass-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-card {
  border-radius: 22px;
  padding: 1.2rem;
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  color: var(--title);
}

.stat-card span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.hero-visual {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
}

.portrait-card {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  padding: 1.2rem;
  overflow: hidden;
}

.portrait-ring {
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(61, 217, 196, 0.16), rgba(139, 92, 246, 0.18));
}

.portrait-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.floating-card {
  position: absolute;
  max-width: 250px;
  padding: 1rem;
  border-radius: 22px;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.floating-card strong {
  color: var(--title);
  display: block;
  margin-bottom: 0.25rem;
}

.floating-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.floating-card-top {
  top: 8%;
  left: 0;
}

.floating-card-bottom {
  right: 0;
  bottom: 10%;
}

.floating-icon,
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  background: rgba(61, 217, 196, 0.14);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.section {
  padding: 5.5rem 0;
}

.section-dark {
  position: relative;
}

.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading h2,
.about-copy h2,
.enterprise-panel h2,
.contact-copy h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.service-grid,
.project-grid,
.footer-grid,
.contact-list {
  display: grid;
  gap: 1.2rem;
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.project-card,
.timeline-item,
.skills-panel,
.enterprise-panel,
.form-panel,
.image-panel {
  border-radius: var(--radius);
}

.service-card,
.project-card,
.timeline-item,
.skills-panel,
.form-panel,
.enterprise-panel {
  padding: 1.5rem;
}

.service-card h3,
.project-card h3,
.timeline-item h3,
.footer-grid h3 {
  color: var(--title);
}

.service-card h3,
.project-card h3 {
  margin: 1rem 0 0.65rem;
}

.two-column {
  grid-template-columns: 0.9fr 1.1fr;
}

.skills-panel {
  display: grid;
  gap: 1.15rem;
}

.skill-item {
  display: grid;
  gap: 0.55rem;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  color: var(--title);
}

.skill-bar {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

body.light-mode .skill-bar {
  background: rgba(14, 23, 43, 0.08);
}

.skill-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong), var(--secondary));
  transition: width 1.2s ease;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-badge {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(61, 217, 196, 0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
}

.project-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1rem 0 1.2rem;
  list-style: none;
}

.project-card li {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  border: 1px solid var(--card-border);
  font-size: 0.9rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--title);
  font-weight: 700;
}

.about-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.image-panel {
  padding: 1rem;
  overflow: hidden;
}

.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  min-height: 460px;
}

.feature-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
}

.enterprise-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

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

.timeline-item {
  position: relative;
  overflow: hidden;
}

.timeline-year {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(61, 217, 196, 0.1);
  font-weight: 800;
}

.contact-grid {
  grid-template-columns: 0.96fr 1.04fr;
}

.contact-list {
  margin-top: 1.5rem;
}

.contact-card {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition), border-color var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
}

.contact-card strong {
  display: block;
  color: var(--title);
  margin-bottom: 0.2rem;
}

.contact-card span {
  color: var(--text-soft);
  word-break: break-word;
}

.static-card {
  cursor: default;
}

.form-panel form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.45rem;
}

.form-row label {
  color: var(--title);
  font-weight: 700;
}

.form-row input,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--title);
  border-radius: 16px;
  padding: 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

body.light-mode .form-row input,
body.light-mode .form-row textarea {
  background: rgba(14, 23, 43, 0.03);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-soft);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: rgba(61, 217, 196, 0.55);
  box-shadow: 0 0 0 4px rgba(61, 217, 196, 0.12);
}

.site-footer {
  padding: 2.2rem 0 1.2rem;
  border-top: 1px solid var(--card-border);
  background: rgba(4, 10, 20, 0.55);
}

body.light-mode .site-footer {
  background: rgba(255, 255, 255, 0.35);
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: start;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-links a,
.social-links a {
  color: var(--text-soft);
  transition: color var(--transition), transform var(--transition);
}

.footer-links a:hover,
.social-links a:hover {
  color: var(--title);
  transform: translateX(2px);
}

.social-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

body.light-mode .social-links a {
  background: rgba(14, 23, 43, 0.06);
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-soft);
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 45;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

@media (max-width: 1100px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .two-column,
  .footer-grid,
  .enterprise-panel {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-visual {
    min-height: 540px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 78px;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 1rem auto 1rem;
    padding: 1rem;
    border-radius: 24px;
    background: var(--surface-strong);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.35rem;
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav a,
  .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 14px;
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav a:hover,
  .site-nav a.active,
  .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  body.light-mode .site-nav a:hover,
  body.light-mode .site-nav a.active,
  body.light-mode .theme-toggle:hover {
    background: rgba(14, 23, 43, 0.05);
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-grid {
    min-height: auto;
  }

  .floating-card {
    position: static;
    margin-top: 1rem;
    max-width: none;
  }

  .hero-visual {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .service-grid,
  .hero-stats,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .hero-highlights,
  .hero-actions,
  .enterprise-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: 4.4rem 0;
  }

  .portrait-card {
    aspect-ratio: 4 / 4.8;
  }

  .image-panel img {
    min-height: 320px;
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
