:root {
  --ink: #0f1626;
  --ink-soft: #1f2d3f;
  --accent: #f34f5a;
  --accent-2: #f8c069;
  --glow: #7ae0ff;
  --bg: #0a0e18;
  --card: rgba(255, 255, 255, 0.06);
  --muted: #cfd8e3;
  --radius: 16px;
  font-family: "Bahnschrift", "Gill Sans MT", "Calibri", "Segoe UI", sans-serif;
  color: #f8fbff;
  background: var(--bg);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 20%, rgba(250, 168, 63, 0.06), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(122, 224, 255, 0.07), transparent 40%),
    var(--bg);
  color: #f8fbff;
  line-height: 1.6;
  min-height: 100vh;
}

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

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3), transparent 65%);
  opacity: 0.3;
}

.hero {
  position: relative;
  padding: 32px clamp(16px, 4vw, 48px) 64px;
  overflow: hidden;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  padding: 10px 14px;
  background: rgba(10, 14, 24, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.4px;
  display: block;
}

.brand-tagline {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fbff;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 32px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 10px;
}

h1 {
  font-size: clamp(32px, 4vw, 52px);
  margin: 0 0 12px;
  line-height: 1.1;
}

.lede {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fefefe;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #fd946e);
  border: none;
  box-shadow: 0 10px 30px rgba(243, 79, 90, 0.4);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
}

.stats strong {
  display: block;
  font-size: 18px;
  color: #fff;
}

.hero-frame {
  background: linear-gradient(135deg, rgba(122, 224, 255, 0.16), rgba(243, 79, 90, 0.12));
  border-radius: var(--radius);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  justify-content: center;
  width: max-content;
  margin: 0 auto;
}

.hero-frame img {
  width: 100%;
  max-height: 600px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.hero-frame__caption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.panel {
  padding: 64px clamp(16px, 5vw, 72px);
  position: relative;
  overflow: hidden;
}

.panel--accent {
  background: radial-gradient(circle at 15% 30%, rgba(122, 224, 255, 0.1), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(243, 79, 90, 0.15), transparent 55%),
    #0c1220;
}

.section-header {
  max-width: 900px;
  margin-bottom: 32px;
}

h2 {
  margin: 4px 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.about-card {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.tech-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.tech-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122, 224, 255, 0.08), rgba(243, 79, 90, 0.08));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tech-card:hover::after {
  opacity: 1;
}

.tech-card h3 {
  margin: 6px 0;
}

.tech-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.tech-label {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  letter-spacing: 1px;
}

.chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), #fd946e);
  border-color: transparent;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 200px;
  object-fit: contain; /* show ~100% of each image */
  background: radial-gradient(circle at 30% 20%, rgba(122, 224, 255, 0.05), transparent 50%), #0a0e18;
  display: block;
}

.project-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.project-title {
  margin: 0;
  font-size: 18px;
}

.project-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.project-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
}

.project-links a {
  color: var(--accent-2);
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
}

body.page-loaded .reveal {
  animation: fade-up var(--reveal-duration, 1.4s) ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.page-loaded .brand img {
  animation: logo-glow 2s ease-in-out forwards;
}

@keyframes logo-glow {
  0% {
    transform: scale(0.92) rotate(-2deg);
    filter: drop-shadow(0 0 0 rgba(122, 224, 255, 0));
  }
  50% {
    transform: scale(1.02) rotate(2deg);
    filter: drop-shadow(0 0 18px rgba(122, 224, 255, 0.3));
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 0 rgba(122, 224, 255, 0));
  }
}

.coming-soon {
  background: radial-gradient(circle at 20% 10%, rgba(248, 192, 105, 0.08), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(122, 224, 255, 0.08), transparent 55%),
    #0c1220;
}

.coming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.coming-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.coming-card h3 {
  margin: 0;
}

.coming-card p {
  margin: 0;
  color: var(--muted);
}

.coming-status {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.coming-status--accent {
  border-color: var(--accent);
  color: var(--accent);
}

.coming-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.embed-wrap {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 16px;
}

.embed-wrap iframe {
  border: none;
  display: block;
}

.embed-note {
  margin-top: 10px;
  color: var(--muted);
}

.contact {
  display: flex;
  justify-content: center;
}

.contact-card {
  max-width: 720px;
  width: 100%;
  background: linear-gradient(135deg, rgba(243, 79, 90, 0.14), rgba(122, 224, 255, 0.12));
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 28px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.contact-card p {
  color: var(--muted);
}

.contact-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.footer {
  padding: 28px clamp(16px, 5vw, 72px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer a {
  color: #fff;
  font-weight: 600;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.lightbox.hidden {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.lightbox__dialog {
  position: relative;
  width: min(960px, 92vw);
  background: rgba(15, 22, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.lightbox__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 0 56px 0 8px; /* extra right space for the close button */
}

.lightbox__title {
  margin: 0;
}

.lightbox__count {
  color: var(--muted);
  font-size: 14px;
}

.lightbox__carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.lightbox__image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, rgba(122, 224, 255, 0.06), transparent 50%), #0a0e18;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox__nav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.lightbox__nav:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), #fd946e);
}

.lightbox__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.lightbox__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 0;
}

.lightbox__dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

.lightbox__caption {
  margin: 4px 8px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 720px) {
  .top-nav {
    position: sticky;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
  }
  .nav-toggle {
    display: inline-flex;
    align-self: center;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    width: 100%;
    display: none;
    padding: 8px 0;
    background: rgba(10, 14, 24, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 5;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  .project-card {
    min-height: auto;
  }
  .lightbox__dialog {
    padding: 14px;
  }
  .lightbox__carousel {
    grid-template-columns: 1fr;
  }
  .lightbox__nav {
    justify-self: center;
  }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions,
  .stats {
    justify-content: center;
  }
  .stats div:last-child {
    grid-column: span 2;
    text-align: center;
  }
  .hero-frame {
    width: 100%;
    padding: 10px;
  }
  .hero-frame img {
    width: 100%;
    max-height: 320px;
    clip-path: none;
  }
}
