:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0d1b2a;
  --surface-2: #10233a;
  --surface-3: #142b46;
  --border: rgba(143, 164, 186, 0.16);
  --border-strong: rgba(37, 200, 244, 0.34);
  --text: #f4f8ff;
  --muted: #8fa4ba;
  --accent: #25c8f4;
  --accent-soft: #80ddff;
  --blue: #4b7cff;
  --container: 1100px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(96, 143, 180, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 143, 180, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(37, 200, 244, 0.12), transparent 27rem),
    radial-gradient(circle at 4% 28%, rgba(75, 124, 255, 0.1), transparent 28rem);
  background-attachment: fixed;
  background-size: 56px 56px, 56px 56px, auto, auto;
}

body.lightbox-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(199, 225, 230, 0.07);
  background: rgba(7, 17, 31, 0.86);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.section,
.site-footer {
  width: min(calc(100% - 36px), var(--container));
  margin-inline: auto;
}

.site-header__inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header__mark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 0 15px rgba(37, 200, 244, 0.55);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-header nav a:hover {
  color: var(--text);
}

.section {
  position: relative;
  z-index: 0;
  padding-block: 72px;
}

#projects::before,
#workflow::before {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  border-block: 1px solid rgba(143, 164, 186, 0.07);
  background: linear-gradient(180deg, rgba(13, 27, 42, 0.46), rgba(9, 23, 39, 0.24));
  content: "";
}

.section--wide {
  width: min(calc(100% - 36px), 1160px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(37, 200, 244, 0.7);
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero {
  min-height: min(640px, calc(100svh - 58px));
  display: flex;
  align-items: center;
  padding-block: 52px 56px;
}

.hero::before {
  position: absolute;
  top: 9%;
  left: 33%;
  z-index: -1;
  width: min(54vw, 720px);
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 200, 244, 0.09), rgba(75, 124, 255, 0.045) 38%, transparent 70%);
  filter: blur(18px);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.hero__content {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 76px);
}

.hero__copy {
  min-width: 0;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 4.1rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.01;
  text-wrap: balance;
}

.hero h1::first-line {
  color: var(--accent-soft);
}

.hero__description {
  max-width: 590px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #031522;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button-link:hover {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.button-link--secondary {
  border-color: var(--border);
  background: rgba(15, 23, 31, 0.82);
  color: var(--text);
}

.button-link--secondary:hover {
  border-color: rgba(75, 124, 255, 0.48);
  background: var(--surface-2);
}

.button-link--disabled,
.button-link--disabled:hover {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.hero-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(11, 18, 25, 0.9);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3), 0 0 72px rgba(37, 200, 244, 0.1), 0 0 100px rgba(75, 124, 255, 0.055);
  text-decoration: none;
  transform: rotate(1.2deg);
  transition: border-color 180ms ease, transform 180ms ease;
}

.hero-preview:hover {
  border-color: rgba(75, 124, 255, 0.6);
  transform: rotate(0deg) translateY(-2px);
}

.hero-preview__bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.66rem;
}

.hero-preview__bar > span:first-child {
  display: flex;
  gap: 5px;
}

.hero-preview__bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(143, 164, 186, 0.45);
}

.hero-preview__bar i:first-child {
  background: var(--accent);
}

.hero-preview__screen {
  aspect-ratio: 16 / 10;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: clamp(20px, 3vw, 34px);
  background:
    radial-gradient(circle at 48% 45%, rgba(37, 200, 244, 0.11), transparent 52%),
    linear-gradient(145deg, #0b1b2b, #091522);
}

.hero-preview__screen img {
  width: auto;
  height: auto;
  max-width: min(100%, 475px);
  max-height: 100%;
  display: block;
  image-rendering: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.3));
}

.hero-preview__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px;
  border-top: 1px solid var(--border);
}

.hero-preview__caption strong {
  overflow: hidden;
  font-size: 0.73rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-preview__caption > span {
  flex: none;
  color: var(--accent-soft);
  font-size: 0.66rem;
}

.projects {
  display: grid;
  gap: 54px;
}

.project {
  min-width: 0;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.project__header {
  max-width: 850px;
  margin-bottom: 28px;
}

.project__header .section-kicker {
  margin-bottom: 12px;
}

.project h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3.7vw, 3rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-wrap: balance;
}

.project__summary {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.project__body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, 0.72fr);
  align-items: start;
  gap: 18px;
}

.project-media {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-gallery__item {
  min-width: 0;
  margin: 0;
}

.project-image-button {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}

.project-image-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(16, 35, 58, 0.78), rgba(9, 22, 37, 0.92));
  transition: border-color 160ms ease, background 160ms ease;
}

.project-gallery__item--featured .project-image-frame {
  aspect-ratio: 16 / 9;
  padding: clamp(20px, 3.5vw, 42px);
  border-color: var(--border-strong);
  background:
    radial-gradient(circle at 50% 45%, rgba(37, 200, 244, 0.1), transparent 50%),
    radial-gradient(circle at 78% 22%, rgba(75, 124, 255, 0.08), transparent 38%),
    #091625;
  box-shadow: 0 18px 52px rgba(2, 10, 22, 0.32), 0 0 54px rgba(37, 200, 244, 0.045);
}

.project-image-button:hover .project-image-frame {
  border-color: rgba(37, 200, 244, 0.52);
  background-color: var(--surface-2);
}

.project-image-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  image-rendering: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.24));
}

.project-gallery__item--featured .project-image-frame img {
  max-width: min(100%, 475px);
}

.project-image-button__hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 16, 29, 0.88);
  color: var(--text);
  font-size: 0.62rem;
  opacity: 0;
  transition: opacity 160ms ease;
}

.project-image-button:hover .project-image-button__hint,
.project-image-button:focus-visible .project-image-button__hint {
  opacity: 1;
}

.project-gallery figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
}

.project-gallery__item--featured figcaption {
  color: var(--text);
  font-size: 0.76rem;
}

.project__brief {
  display: grid;
  gap: 10px;
}

.project-detail {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13, 27, 42, 0.78);
}

.project-detail h4,
.project-result h4 {
  margin: 0 0 9px;
  color: var(--accent-soft);
  font-size: 0.67rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(37, 200, 244, 0.09);
  color: var(--accent-soft);
  font-size: 0.68rem;
}

.project-result {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13, 27, 42, 0.58);
}

.project-result ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-result li {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 0.76rem;
}

.project-result li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.card {
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(13, 27, 42, 0.84), rgba(10, 24, 40, 0.76));
  transition: border-color 160ms ease, background 160ms ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.card h3,
.step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.card p,
.step p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13, 27, 42, 0.64);
}

.step__number {
  width: 28px;
  height: 22px;
  display: grid;
  margin: 0 0 24px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--accent-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  place-items: center;
}

.about {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1.3fr);
  align-items: start;
  gap: clamp(38px, 7vw, 90px);
}

.about .section-heading {
  margin: 0;
}

.about__content,
.about__copy {
  min-width: 0;
}

.about__copy {
  max-width: 720px;
}

.about__copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.about__copy p:first-child {
  color: var(--text);
  font-size: 1.12rem;
}

.final-cta {
  width: min(calc(100% - 36px), 980px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 58px;
  padding: 32px 36px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 200, 244, 0.16), transparent 42%),
    radial-gradient(circle at 0 100%, rgba(75, 124, 255, 0.12), transparent 44%),
    rgba(13, 27, 42, 0.94);
}

.final-cta .section-kicker {
  margin-bottom: 10px;
}

.final-cta h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.final-cta > div > p:not(.section-kicker) {
  max-width: 520px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.final-cta .actions {
  flex: none;
  margin: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  padding: 26px;
  background: rgba(3, 10, 20, 0.96);
  backdrop-filter: blur(18px);
}

.lightbox__content {
  min-width: 0;
  height: calc(100svh - 80px);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}

.lightbox__image {
  width: auto;
  height: auto;
  max-width: min(100%, 1300px);
  max-height: calc(100svh - 140px);
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

.lightbox__meta {
  width: min(100%, 900px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.78rem;
}

.lightbox__caption,
.lightbox__counter {
  margin: 0;
}

.lightbox__close,
.lightbox__nav {
  width: 44px;
  height: 44px;
  display: grid;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(13, 27, 42, 0.9);
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  place-items: center;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  border-color: var(--accent);
  background: #123557;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox__nav {
  justify-self: center;
}

.status-message {
  width: min(calc(100% - 36px), var(--container));
  margin: 54px auto;
  color: var(--muted);
}

@media (max-width: 940px) {
  .section {
    padding-block: 60px;
  }

  .hero {
    min-height: auto;
  }

  .hero__content {
    grid-template-columns: 1fr 0.82fr;
    gap: 30px;
  }

  .project__body {
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.72fr);
  }

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

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

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

@media (max-width: 720px) {
  .site-header__inner,
  .section,
  .section--wide,
  .site-footer,
  .final-cta {
    width: min(calc(100% - 28px), var(--container));
  }

  .site-header nav {
    gap: 16px;
  }

  .site-header nav a:nth-child(3),
  .site-header nav a:nth-child(4) {
    display: none;
  }

  .section {
    padding-block: 52px;
  }

  .hero {
    padding-block: 52px 58px;
  }

  .hero__content,
  .project__body,
  .about {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 620px;
  }

  .hero-preview {
    width: min(100%, 500px);
    transform: none;
  }

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

  .about {
    gap: 24px;
  }

  .final-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding: 28px;
  }

  .lightbox {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    padding: 16px 6px;
  }
}

@media (max-width: 520px) {
  .section {
    padding-block: 44px;
  }

  .hero {
    padding-block: 44px 50px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.25rem);
  }

  .actions {
    width: 100%;
    flex-direction: column;
  }

  .button-link {
    width: 100%;
  }

  .project-gallery,
  .project-result ul,
  .cards,
  .steps {
    grid-template-columns: 1fr;
  }

  .project-gallery__item--featured .project-image-frame,
  .project-image-frame {
    aspect-ratio: 4 / 3;
    padding: 10px;
  }

  .card {
    min-height: 0;
  }

  .final-cta {
    margin-bottom: 38px;
    padding: 24px 20px;
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    align-content: center;
    gap: 10px;
  }

  .lightbox__content {
    grid-column: 1 / -1;
    grid-row: 1;
    height: calc(100svh - 110px);
  }

  .lightbox__image {
    max-height: calc(100svh - 175px);
  }

  .lightbox__nav {
    grid-row: 2;
  }

  .lightbox__nav--previous {
    justify-self: end;
  }

  .lightbox__nav--next {
    justify-self: start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
