:root {
  --bg: #0a0d12;
  --bg-raised: #10141b;
  --bg-card: #151a23;
  --border: #232a36;
  --border-soft: #1b212b;
  --text-primary: #eef1f6;
  --text-secondary: #9aa5b4;
  --text-tertiary: #626d7d;
  --accent: #f5a524;
  --accent-strong: #ffb648;
  --accent-soft: rgba(245, 165, 36, 0.14);
  --violet: #8b6bf0;
  --violet-soft: rgba(139, 107, 240, 0.14);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --font-heading: "Sora", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --container-width: 1160px;
  --container-width-narrow: 740px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--container-width-narrow);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  color: var(--text-primary);
}

.nav__brand-dot { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 30px;
}

.nav__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav__links a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn--primary {
  background: var(--accent);
  color: #1a1204;
  box-shadow: 0 10px 24px -8px rgba(245, 165, 36, 0.55);
}
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }

.btn--lg { padding: 15px 30px; font-size: 16px; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 88px;
  background:
    radial-gradient(50% 65% at 85% 8%, rgba(139, 107, 240, 0.16), transparent),
    radial-gradient(45% 50% at 8% 25%, rgba(245, 165, 36, 0.10), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border-soft);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 18px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  margin: 0 0 22px;
  line-height: 1.08;
}

.hero__lede {
  max-width: 560px;
  margin: 0 0 18px;
  font-size: 17px;
  color: var(--text-secondary);
}

.hero__role {
  max-width: 560px;
  margin: 0 0 30px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
}

.tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero__live-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero__live-link:hover,
.hero__live-link:focus-visible {
  color: var(--accent);
}

.hero__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Hero visual: stylized weekly calendar mock (not a screenshot) */
.hero__visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.calendar-mock__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-mock__head span:first-child {
  font-weight: 700;
  font-size: 14px;
}

.calendar-mock__head span:last-child {
  font-size: 12px;
  color: var(--text-tertiary);
}

.calendar-mock__grid {
  display: grid;
  grid-template-columns: 36px repeat(5, 1fr);
  gap: 6px;
}

.calendar-mock__time {
  font-size: 10px;
  color: var(--text-tertiary);
  padding-top: 4px;
}

.calendar-mock__day-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  padding-bottom: 6px;
}

.calendar-mock__cell {
  height: 30px;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
}

.calendar-mock__cell.is-busy-a { background: var(--accent-soft); border-color: rgba(245, 165, 36, 0.35); }
.calendar-mock__cell.is-busy-b { background: var(--violet-soft); border-color: rgba(139, 107, 240, 0.35); }

.calendar-mock__legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.calendar-mock__legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot--a { background: var(--accent); }
.legend-dot--b { background: var(--violet); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-raised); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.section__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 12px;
}

.section__title {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 18px;
}

.section__intro {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 36px;
  max-width: 680px;
}

.list { padding-left: 20px; color: var(--text-secondary); }
.list li { margin-bottom: 10px; }

/* ---------- Gallery ---------- */
.gallery-group { margin-bottom: 48px; }
.gallery-group:last-child { margin-bottom: 0; }

.gallery-group__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 18px;
}

.gallery-group__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bento .shot--lg { grid-column: span 2; }
.bento .shot--sm { grid-column: span 1; }

.bento--thirds { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .bento .shot--lg, .bento .shot--sm { grid-column: span 1; }
}

.shot {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.shot--placeholder {
  border: 1.5px dashed var(--border);
  background: linear-gradient(160deg, #14181f, #0d1015);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot--placeholder .shot__placeholder-text {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.shot:not(.shot--placeholder) img:hover,
.shot:not(.shot--placeholder) img:focus-visible {
  transform: scale(1.04);
}

.shot img:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.shot figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #f4f6f9;
  background: linear-gradient(180deg, rgba(10,13,18,0) 0%, rgba(10,13,18,0.9) 75%);
}

.shot--placeholder figcaption {
  position: static;
  background: none;
  color: var(--text-tertiary);
}

/* ---------- Solution ---------- */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 30px 0;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.solution-card h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--accent-strong);
}

.solution-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 800px) {
  .solution-grid { grid-template-columns: 1fr; }
}

/* ---------- Scope of responsibility (timeline) ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 30px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-verb {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-strong);
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-number {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: var(--violet);
  margin-bottom: 14px;
}

.feature-card h3 { margin: 0 0 10px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--text-secondary); font-size: 14px; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- Architecture (custom CSS diagram) ---------- */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-node {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  text-align: center;
  font-weight: 600;
  font-size: 14.5px;
}

.arch-node small {
  display: block;
  font-weight: 500;
  color: var(--text-tertiary);
  font-size: 12px;
  margin-top: 4px;
}

.arch-node--accent { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(245, 165, 36, 0.25); }

.arch-arrow {
  width: 2px;
  height: 26px;
  background: linear-gradient(var(--border), var(--accent));
  position: relative;
}
.arch-arrow::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--accent);
}

.arch-branch {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 640px;
  justify-content: center;
  margin-top: 26px;
}

.arch-branch .arch-node { max-width: 300px; }

@media (max-width: 640px) {
  .arch-branch { flex-direction: column; align-items: center; }
}

/* ---------- Challenges ---------- */
.challenge-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.challenge-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.challenge-card__index {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--border);
}

.challenge-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--text-primary); }
.challenge-card p { margin: 0; color: var(--text-secondary); font-size: 14.5px; }
.challenge-card code {
  background: var(--bg-raised);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent-strong);
}

@media (max-width: 600px) {
  .challenge-card { grid-template-columns: 1fr; }
  .challenge-card__index { display: none; }
}

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
}

.stat__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-strong), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 12px;
}

.stat__label a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
}

.stat__label a:hover,
.stat__label a:focus-visible {
  border-bottom-color: var(--accent);
}

.stat__label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat--wide { grid-column: span 3; }

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat--wide { grid-column: span 2; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat--wide { grid-column: span 1; }
}

/* ---------- Technologies (badge groups) ---------- */
.tech-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 700px) {
  .tech-groups { grid-template-columns: 1fr; }
}

.tech-group__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
  margin: 0 0 14px;
}

.tech-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}

.tech-item:last-child { border-bottom: none; }

.tech-item__name { font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.tech-item__role { color: var(--text-secondary); text-align: right; }

/* ---------- CTA ---------- */
.cta {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(150deg, #1a1204 0%, #241a08 40%, #201430 100%);
  border-top: 1px solid var(--border-soft);
}

.cta h2 { font-size: 32px; margin: 0 0 10px; font-weight: 700; }
.cta p { font-size: 17px; margin: 0 0 34px; color: var(--text-secondary); }

/* ---------- Footer ---------- */
.footer {
  padding: 44px 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

.footer__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 5, 8, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  margin: 0;
  width: 92vw;
  height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

/* Portrait screenshots: cap width so it doesn't stretch unnaturally wide */
.lightbox.is-portrait .lightbox__figure {
  width: min(92vw, 62vh);
}

.lightbox.is-open .lightbox__img { transform: scale(1); }

.lightbox__caption {
  margin-top: 18px;
  color: #f4f6f9;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f6f9;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(245, 165, 36, 0.28); }

.lightbox__close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 30px;
  transform: translateY(-50%);
}

.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

@media (max-width: 640px) {
  .lightbox { padding: 24px; }
  .lightbox__nav { width: 42px; height: 42px; font-size: 24px; }
  .lightbox__close { width: 38px; height: 38px; font-size: 22px; top: 12px; right: 12px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}
