:root {
  --bg: #0a1633;
  --panel: rgba(248, 250, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #0d1830;
  --muted: #52627c;
  --line: rgba(154, 177, 230, 0.22);
  --accent: #2b5cff;
  --accent-soft: rgba(43, 92, 255, 0.14);
  --accent-warm: #f08a12;
  --accent-warm-soft: rgba(240, 138, 18, 0.14);
  --shadow: 0 24px 70px rgba(3, 8, 22, 0.28);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(46, 92, 255, 0.18), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(240, 138, 18, 0.12), transparent 14%),
    linear-gradient(180deg, #0b1736 0%, #091224 100%);
}

body.lightbox-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(130, 160, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 160, 230, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

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

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
  position: relative;
  z-index: 1;
}

.site-header {
  position: relative;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 28, 61, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  position: relative;
  color: #f6f8ff;
}

.brand-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.brand-avatar-zoom {
  position: absolute;
  left: -6px;
  top: calc(100% + 12px);
  width: 150px;
  height: 150px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel-strong);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  z-index: 30;
  transition: opacity 180ms ease, transform 180ms ease;
}

.brand-avatar-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.brand:hover .brand-avatar-zoom,
.brand:focus-visible .brand-avatar-zoom {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.94rem;
}

.main-nav a {
  color: rgba(234, 239, 255, 0.78);
  padding: 8px 0;
}

.main-nav a.is-active,
.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffffff;
}

.lang-toggle,
.button {
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.lang-toggle {
  min-width: 58px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f6f8ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-toggle:hover,
.button:hover {
  transform: translateY(-1px);
}

.home-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 20px;
  align-items: stretch;
  min-height: calc(100vh - 140px);
}

.home-side {
  display: grid;
  gap: 18px;
  align-content: stretch;
}

.hero-panel,
.info-card,
.page-intro {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero-panel,
.page-intro,
.info-card {
  padding: 32px;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-card {
  min-height: 0;
}

.home-card-primary {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
.info-card h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(2.9rem, 5vw, 4.8rem);
  line-height: 1;
}

.hero-text,
.info-card p {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.hero-meta span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-meta span:last-child {
  border-color: rgba(240, 138, 18, 0.24);
  background: var(--accent-warm-soft);
  color: #9a4f00;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(135deg, #0a2a78, #1144bc 72%, #f08a12 130%);
  color: #fff;
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.button-tertiary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.inner-layout {
  display: grid;
  gap: 18px;
}

.page-intro h1 {
  max-width: 16ch;
  margin-bottom: 0;
  font-size: clamp(2.6rem, 4vw, 4.2rem);
}

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

.card-index {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.home-card:nth-child(2) .card-index,
.home-card:nth-child(3) .card-index {
  color: var(--accent-warm);
}

.info-card h2 {
  margin-bottom: 10px;
  font-size: 1.9rem;
  line-height: 1.02;
}

.skills-card {
  margin-top: 2px;
}

.project-nav-grid {
  align-items: stretch;
}

.project-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(43, 92, 255, 0.34);
  background:
    radial-gradient(circle at top right, rgba(43, 92, 255, 0.1), transparent 34%),
    var(--panel-strong);
}

.project-card:focus-visible {
  outline: 3px solid rgba(167, 139, 250, 0.45);
  outline-offset: 4px;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 22px;
  padding: 10px 14px;
  border: 1px solid rgba(43, 92, 255, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}

body[data-page="projects"] .classti-showcase {
  display: none;
}

body[data-page="projects"] .classti-showcase:target {
  display: grid;
}

body[data-page="projects"]:has(.classti-showcase:target) .project-nav-grid {
  display: none;
}

body[data-page="projects"]:has(.classti-showcase:target) .page-intro h1 {
  max-width: 20ch;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 22px;
  padding: 10px 14px;
  border: 1px solid rgba(202, 210, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f5f3ff;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.project-back-link:hover,
.project-back-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.project-detail-footer {
  display: grid;
  gap: 18px;
}

.project-demo-card {
  padding: 28px;
  border: 1px solid rgba(154, 177, 230, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(43, 92, 255, 0.12), transparent 28%),
    rgba(248, 250, 255, 0.92);
  box-shadow: var(--shadow);
}

.project-demo-label {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-demo-card h3 {
  margin-bottom: 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.project-demo-card p {
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.75;
}

.project-demo-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 11px 16px;
  border: 1px solid rgba(43, 92, 255, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
}

.project-demo-link.is-disabled {
  border-color: rgba(82, 98, 124, 0.2);
  background: rgba(82, 98, 124, 0.08);
  color: var(--muted);
}

.classti-showcase {
  display: grid;
  gap: 18px;
  scroll-margin-top: 24px;
}

.classti-overview {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(120, 88, 255, 0.2), transparent 28%),
    radial-gradient(circle at left bottom, rgba(94, 50, 204, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(15, 22, 47, 0.96), rgba(11, 17, 36, 0.98));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  color: #f5f3ff;
}

.classti-copy {
  display: grid;
  align-content: start;
}

.classti-overview h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.classti-summary {
  align-self: end;
  padding: 22px;
  border: 1px solid rgba(185, 169, 255, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.05);
}

.classti-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.classti-text {
  margin: 16px 0 0;
  max-width: 70ch;
  color: rgba(230, 228, 255, 0.82);
  font-size: 1rem;
  line-height: 1.8;
}

.classti-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.classti-meta span {
  padding: 10px 14px;
  border: 1px solid rgba(185, 169, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ede9fe;
  font-size: 0.92rem;
}

.classti-summary p {
  margin: 14px 0 0;
  color: rgba(230, 228, 255, 0.78);
  line-height: 1.75;
}

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

.classti-shot {
  padding: 18px;
  border: 1px solid rgba(154, 177, 230, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(21, 28, 56, 0.95), rgba(12, 18, 38, 0.98));
  box-shadow: var(--shadow);
}

.classti-shot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.classti-shot-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(185, 169, 255, 0.16);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: #d8ccff;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.classti-device {
  overflow: hidden;
  border: 1px solid rgba(202, 210, 255, 0.18);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(8, 10, 24, 0.8), rgba(18, 22, 41, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 36px rgba(3, 8, 22, 0.3);
}

.screenshot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.screenshot-trigger img {
  transition: transform 220ms ease, filter 220ms ease;
}

.screenshot-trigger:hover img,
.screenshot-trigger:focus-visible img {
  transform: scale(1.025);
  filter: brightness(1.08);
}

.screenshot-trigger:focus-visible {
  outline: 3px solid rgba(167, 139, 250, 0.55);
  outline-offset: 4px;
  border-radius: inherit;
}

.classti-device img {
  aspect-ratio: 9 / 19.5;
  object-fit: contain;
  background: #090d1b;
}

.classti-shot figcaption {
  display: grid;
  gap: 8px;
  padding: 14px 4px 2px;
}

.classti-shot figcaption strong {
  color: #f5f3ff;
  font-size: 1rem;
}

.classti-shot figcaption span {
  color: rgba(224, 231, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.65;
}

.desktop-showcase .classti-overview {
  background:
    radial-gradient(circle at top right, rgba(240, 138, 18, 0.14), transparent 24%),
    radial-gradient(circle at left bottom, rgba(43, 92, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(13, 24, 48, 0.96), rgba(8, 16, 34, 0.98));
}

.studioflow-showcase .classti-overview {
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 24%),
    radial-gradient(circle at left bottom, rgba(43, 92, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(10, 27, 44, 0.96), rgba(7, 18, 34, 0.98));
}

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

.crm-showcase .classti-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.desktop-showcase .classti-device {
  border-radius: 24px;
}

.desktop-showcase .classti-device img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background:
    linear-gradient(180deg, rgba(8, 12, 24, 0.96), rgba(13, 18, 34, 0.98));
}

.crm-long-shot .classti-device img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.screenshot-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.screenshot-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(99, 102, 241, 0.2), transparent 34%),
    rgba(3, 8, 22, 0.86);
  backdrop-filter: blur(18px);
}

.screenshot-lightbox-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(1280px, 100%);
  max-height: calc(100vh - 48px);
  padding: 78px 22px 22px;
  border: 1px solid rgba(202, 210, 255, 0.22);
  border-radius: 34px;
  background: rgba(9, 14, 30, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.screenshot-lightbox-content {
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow: auto;
  margin: 0;
  max-height: calc(100vh - 120px);
  overscroll-behavior: contain;
}

.screenshot-lightbox-content img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid rgba(202, 210, 255, 0.16);
  border-radius: 24px;
  background: #050816;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  cursor: zoom-in;
}

.screenshot-lightbox-content.is-zoomed {
  display: block;
  padding: 0 0 14px;
}

.screenshot-lightbox-content.is-zoomed img {
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  cursor: zoom-out;
}

.screenshot-lightbox-content.is-zoomed figcaption {
  position: sticky;
  left: 0;
  bottom: 0;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(202, 210, 255, 0.16);
  border-radius: 999px;
  background: rgba(9, 14, 30, 0.84);
  backdrop-filter: blur(16px);
}

.screenshot-lightbox-content figcaption {
  color: #f5f3ff;
  text-align: center;
  font-weight: 800;
}

.screenshot-lightbox-close,
.screenshot-lightbox-nav {
  border: 1px solid rgba(202, 210, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f5f3ff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.screenshot-lightbox-close:hover,
.screenshot-lightbox-nav:hover,
.screenshot-lightbox-close:focus-visible,
.screenshot-lightbox-nav:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.screenshot-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  min-height: 36px;
  padding: 0 14px;
}

.screenshot-zoom-control {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 134px;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(202, 210, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f5f3ff;
  font-size: 0.88rem;
  font-weight: 800;
}

.screenshot-zoom-range {
  width: 100%;
  accent-color: #a78bfa;
  cursor: pointer;
}

.screenshot-zoom-value {
  min-width: 44px;
  color: rgba(245, 243, 255, 0.78);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.screenshot-lightbox-nav {
  width: 46px;
  height: 46px;
  overflow: hidden;
  color: transparent;
}

.screenshot-lightbox-nav::before {
  display: grid;
  place-items: center;
  color: #f5f3ff;
  font-size: 1.4rem;
  line-height: 1;
}

.screenshot-lightbox-prev::before {
  content: "<";
}

.screenshot-lightbox-next::before {
  content: ">";
}

@media (max-width: 960px) {
  .site-header,
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-layout,
  .cards-grid,
  .contact-grid,
  .classti-gallery,
  .desktop-showcase .classti-gallery,
  .crm-showcase .classti-gallery {
    grid-template-columns: 1fr;
  }

  .home-side {
    grid-template-columns: 1fr;
  }

  .classti-overview {
    grid-template-columns: 1fr;
  }

  .screenshot-lightbox-panel {
    grid-template-columns: 1fr;
    padding-top: 104px;
  }

  .screenshot-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .screenshot-lightbox-prev {
    left: 12px;
  }

  .screenshot-lightbox-next {
    right: 12px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .hero-panel,
  .page-intro,
  .info-card,
  .classti-overview {
    padding: 22px;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  h1 {
    max-width: 100%;
    font-size: 2.5rem;
  }

  .page-intro h1,
  .info-card h2 {
    font-size: 2rem;
  }

  .classti-summary {
    padding: 18px;
  }

  .screenshot-lightbox {
    padding: 10px;
  }

  .screenshot-lightbox-panel {
    max-height: calc(100vh - 20px);
    padding: 104px 10px 16px;
    border-radius: 24px;
  }

  .screenshot-zoom-control {
    top: 58px;
    left: 10px;
    right: 10px;
  }

  .screenshot-lightbox-content img {
    max-height: calc(100vh - 150px);
    border-radius: 18px;
  }

  .screenshot-lightbox-content.is-zoomed img {
    max-width: none;
    max-height: none;
  }
}
