/* Site chrome: frosted nav stays readable over scrolling content. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid rgba(213, 218, 226, 0.65);
  background: var(--nav-bg);
  backdrop-filter: saturate(1.2) blur(var(--blur-nav));
  -webkit-backdrop-filter: saturate(1.2) blur(var(--blur-nav));
  box-shadow: var(--shadow-nav);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand:hover {
  color: var(--text);
}

.brand__logo {
  display: block;
  height: 2.15rem;
  width: auto;
  max-width: 9.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand--logo-only .brand__logo {
  height: 2.4rem;
  max-width: 11rem;
}

.nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 560;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.nav-toggle__bars {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  z-index: 99;
  padding: var(--space-5);
  background: var(--drawer-bg);
  backdrop-filter: saturate(1.2) blur(var(--blur-nav));
  -webkit-backdrop-filter: saturate(1.2) blur(var(--blur-nav));
}

.nav-drawer.is-open {
  display: block;
}

.nav-drawer nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 20rem;
}

.nav-drawer a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-drawer {
    display: none !important;
  }
}

/* Buttons */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--btn-on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--btn-on-accent);
}

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

.btn--ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--bg-soft);
}

/* Tags */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.tag--accent {
  color: var(--accent);
  border-color: rgba(17, 99, 247, 0.35);
  background: var(--accent-soft);
}

.tag--freelance {
  color: #d4b483;
  border-color: rgba(212, 180, 131, 0.35);
  background: rgba(212, 180, 131, 0.1);
}

/* Project feature blocks */

.project-feature {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-top: 1px solid var(--border);
}

.project-feature__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.project-feature__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-feature__body h3 {
  margin-bottom: var(--space-3);
}

.project-feature__body h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-feature__body h3 a:hover {
  color: var(--accent);
}

.project-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

@media (min-width: 900px) {
  .project-feature {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--space-7);
  }

  .project-feature--flip {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .project-feature--flip .project-feature__media {
    order: 2;
  }
}

/* Project list rows */

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.project-list__item {
  border-bottom: 1px solid var(--border);
}

.project-list__link {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5) 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s var(--ease);
}

.project-list__link:hover {
  color: inherit;
}

.project-list__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

.project-list__summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

@media (min-width: 760px) {
  .project-list__link {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
    align-items: start;
    gap: var(--space-5);
  }

  .project-list__link:hover {
    background: linear-gradient(90deg, transparent, rgba(26, 29, 33, 0.03), transparent);
  }
}

.project-list__arrow {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.2rem;
}

/* Capability / integration grids */

.split-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 800px) {
  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }

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

.panel {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.panel h3 {
  margin-bottom: var(--space-3);
}

.panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.05rem;
}

.panel p,
.panel li {
  color: var(--text-muted);
}

.tech-group h3 .fa-solid,
.tech-group h3 .fa-brands {
  margin-right: 0.45rem;
  color: var(--accent);
  width: 1.1em;
  text-align: center;
}

.experience-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1rem;
}

.btn i {
  margin-right: 0.45rem;
}

.btn .icon-end {
  margin-right: 0;
  margin-left: 0.45rem;
}

.cred-strip i {
  margin-right: 0.4rem;
  color: var(--accent);
}

.project-list__arrow i {
  margin-left: 0.35rem;
  font-size: 0.75rem;
}

.tech-group + .tech-group {
  margin-top: var(--space-5);
}

.tech-group h3 {
  font-size: 0.95rem;
  margin-bottom: var(--space-3);
  color: var(--text);
}

/* Experience */

.experience-block {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 860px) {
  .experience-block {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
  }
}

.experience-card {
  padding: var(--space-6);
  border: 1px solid rgba(213, 218, 226, 0.7);
  border-left: 2px solid var(--accent);
  background: var(--glass);
  backdrop-filter: saturate(1.15) blur(var(--blur-glass));
  -webkit-backdrop-filter: saturate(1.15) blur(var(--blur-glass));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.experience-card h3 {
  margin-bottom: var(--space-3);
}

/* CTA band */

.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-block: 1px solid rgba(213, 218, 226, 0.7);
  background: transparent;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 40%, rgba(17, 99, 247, 0.28), transparent 42%),
    radial-gradient(circle at 85% 20%, rgba(23, 35, 49, 0.14), transparent 45%),
    radial-gradient(circle at 70% 90%, rgba(17, 99, 247, 0.14), transparent 40%),
    var(--bg-soft);
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--glass);
  backdrop-filter: saturate(1.2) blur(var(--blur-glass));
  -webkit-backdrop-filter: saturate(1.2) blur(var(--blur-glass));
}

.cta-band .btn-row {
  margin-top: var(--space-5);
}

/* Footer */

.site-footer {
  padding-block: var(--space-7);
  border-top: 1px solid var(--border);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-size: 1rem;
  margin-bottom: var(--space-3);
}

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

.site-footer__copy {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* WhatsApp FAB */

.wa-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.wa-fab:hover {
  background: var(--wa-hover);
  color: #fff;
  transform: translateY(-2px);
}

.wa-fab svg,
.wa-fab i {
  width: auto;
  height: auto;
  font-size: 1.65rem;
  line-height: 1;
}

.site-footer a i {
  margin-right: 0.4rem;
  color: var(--accent);
  width: 1em;
  text-align: center;
}

body.nav-open .wa-fab {
  z-index: 80;
}

/* Credibility strip */

.cred-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cred-strip li {
  margin: 0;
}

.cred-strip li + li {
  position: relative;
  padding-left: var(--space-5);
}

.cred-strip li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
  transform: translateY(-50%);
}

/* Gallery */

.gallery {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gallery__item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 16 / 10;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
}

.gallery__item:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 35, 49, 0.78);
  border: 0;
  cursor: zoom-out;
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  width: min(96vw, 72rem);
  max-height: 92vh;
}

.lightbox__img {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  max-width: 100%;
  max-height: min(84vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.lightbox__close {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox__nav {
  grid-row: 2;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox__nav--prev {
  grid-column: 1;
}

.lightbox__nav--next {
  grid-column: 3;
}

.lightbox__nav[hidden] {
  visibility: hidden;
  pointer-events: none;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 699px) {
  .lightbox__dialog {
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
  }

  .lightbox__img {
    grid-column: 1 / -1;
    max-height: min(70vh, 700px);
  }

  .lightbox__close {
    grid-column: 3;
  }

  .lightbox__nav--prev,
  .lightbox__nav--next {
    grid-row: 3;
  }

  .lightbox__nav--prev {
    grid-column: 1;
    justify-self: start;
  }

  .lightbox__nav--next {
    grid-column: 3;
    justify-self: end;
  }
}

.placeholder-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}
