:root {
  --bg: #07112a; /* darker blue start for gradient */
  --surface: #111827;
  --primary: #38bdf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* darker vertical gradient background */
  background: linear-gradient(180deg, #0f3b6f 0%, #07203a 50%, #01050a 100%);
  min-height: 100vh; /* ensure gradient fills the viewport */
  background-attachment: fixed;
  color: var(--text);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 0.75rem 0;
  /* darker glass header to stand out against the background image */
  background: rgba(3,37,65,0.55);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
}

/* Reserve vertical space for the tags area so cards keep consistent height
   even when tags wrap onto a second line. Tweak `min-height` if you want
   more or less reserved space. */
.card .tags {
  /* Increased to allow two wrapped lines of tag pills so buttons align */
  min-height: 3.6rem;
  display: block;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #021126;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(2,17,38,0.45);
  /* Use the provided image as the logo, fall back to the gradient if image is missing */
  background-image: url("Images/CobraChickenIcon.png"), linear-gradient(135deg, var(--primary), #60a5fa);
  background-size: contain, cover;
  background-position: center;
  background-repeat: no-repeat, no-repeat;
  border-radius: 10px;
}

.main-nav a {
  margin-left: 0.75rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  /* subtle dark glass pills for nav links */
  background: rgba(2,17,38,0.45);
  border: 1px solid rgba(255,255,255,0.02);
  transition: background-color 180ms ease, color 180ms ease, transform 120ms ease;
}

/* Filter bar and select styles */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
  position: relative;
}

.filter-label {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.filter-select {
  min-width: 220px;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 0.35rem 0.9rem;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: none;
  background-image: none;
  cursor: pointer;
  height: 40px;
  padding-right: 0.9rem;
}

.filter-select option {
  background: #0f172a;
  color: var(--text);
}

.filter-select.has-selection {
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  color: #021126;
  border-color: transparent;
}

.filter-bar::after {
  display: none;
}

/* Hide native IE/Edge expand icon */
.filter-select::-ms-expand { display: none; }

.main-nav a:hover {
  background: rgba(255,255,255,0.03);
  transform: translateY(-1px);
}

.main-nav a.active {
  background: linear-gradient(90deg,var(--primary),#60a5fa);
  color: #021126;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.site-header nav {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text);
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.menu-toggle span:nth-child(1) { top: 0.65rem; }
.menu-toggle span:nth-child(2) { top: 1.15rem; }
.menu-toggle span:nth-child(3) { top: 1.65rem; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

.site-header a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

@media (max-width: 760px) {
  .header-row {
    position: relative;
    align-items: center;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  }

  .site-header nav.open {
    display: flex;
  }

  .main-nav {
    gap: 0;
  }

  .main-nav a {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    display: block;
  }
}

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.hero p {
  max-width: 32rem;
  margin: 0 auto 2rem;
  color: var(--muted);
}

.home-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.25rem;
}

.home-card { display: block; background: rgba(255,255,255,0.02); border-radius: 0.6rem; overflow: hidden; text-decoration: none; color: inherit; }
.home-card img { width: 100%; display: block; height: 140px; object-fit: cover; }
.home-card .card-body { padding: 0.75rem; }
.home-card h3 { margin: 0 0 0.4rem; }

.quick-updates { margin-top: 1.25rem; text-align: left; }

.cta { display: inline-block; padding: 0.8rem 1.25rem; border-radius: 0.6rem; background: var(--primary); color: #021126; text-decoration: none; }

button {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.8rem;
  font-size: 1rem;
  color: #020617;
  background: var(--primary);
  cursor: pointer;
}

.ghost {
  display: inline-block;
  margin-left: 0.75rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(148,163,184,0.08);
}

.features,
.contact,
.about {
  padding: 4rem 0;
}

.features h2,
.contact h2,
.about h2 {
  margin-bottom: 1.5rem;
}

.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-grid article {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
}

.projects {
  padding: 3rem 0;
}

.project-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.tab {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  /* darker glass style for project tabs so they stand out over the background */
  background: rgba(2,17,38,0.55);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.03);
  backdrop-filter: blur(6px) saturate(110%);
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(90deg,var(--primary),#60a5fa);
  color: #021126;
}

.projects-list {
  margin-top: 1rem;
}

.project-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Big buttons layout for Updates page */
.big-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.big-card .card { display: flex; flex-direction: column; }
.big-card .card img { height: 260px; object-fit: cover; border-radius: 0.5rem; }

@media (max-width: 900px) {
  .big-buttons { grid-template-columns: 1fr; }
  .big-card .card img { height: 180px; }
}

/* Ensure big cards always match height */
.big-buttons { align-items: stretch; }
.big-buttons .card-link { display: block; height: 100%; }
.big-card .card { height: 100%; justify-content: space-between; }
.big-card .card .thumb { flex: 0 0 auto; }
.big-card .card h3 { margin: 0.75rem 0 0.5rem; }
.big-card .card p { margin: 0 0 0.75rem; }

.projects-updates { margin-bottom: 1rem; }
.project-update { margin-top: 0.6rem; font-size: 0.95rem; }

.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0.5rem; margin-bottom: 0.5rem; }

.card {
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 0.75rem;
  border: 1px solid rgba(148,163,184,0.06);
  display: flex;
  flex-direction: column;
}

.card-link { display: block; color: inherit; text-decoration: none; }

/* Ensure each card fills its grid cell so bottom-anchored elements align */
.project-grid .card { height: 100%; }

/* Anchor only the store link to sit just above the bottom of the card */
.card .ghost.store-link { margin-top: auto; margin-bottom: 0.5rem; display: inline-block; }

/* Make the card body expand to push the store link to the bottom */
.card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
}

/* Reduce spacing for title, description, and tags inside cards */
.card h3 {
  margin: 0 0 0.25rem;
}
.card .muted {
  margin: 0 0 0.35rem;
}
.card .tags {
  margin-top: 0.35rem;
}

.tags span {
  display: inline-block;
  background: rgba(255,255,255,0.03);
  padding: 0.2rem 0.45rem;
  border-radius: 0.45rem;
  margin-right: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.filter-btn {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 120ms ease;

/* Reserve vertical space for the tags area so cards keep consistent height
   even when tags wrap onto a second line. Tweak `min-height` if you want
   more or less reserved space. */
.card .tags {
  min-height: 2.4rem;
  display: block;
}
}

.filter-btn:hover {
  background: rgba(255,255,255,0.06);
}

.filter-btn.active {
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  color: #021126;
  border-color: transparent;
}

.muted { color: var(--muted); }

.hidden { display: none; }

.media { padding: 3rem 0; }

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

.video-card { background: rgba(255,255,255,0.02); padding: 0.5rem; border-radius: 0.6rem; }

.thumb { position: relative; cursor: pointer; overflow: hidden; border-radius: 0.5rem; }
.thumb img { width: 100%; display: block; height: auto; }
.thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.5); color: white; border-radius: 50%; width: 3rem; height: 3rem; border: none; font-size: 1.25rem; }

#videoModal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); padding: 1rem; }
.modal.show { display: flex; }
.modal-content { width: min(900px,100%); background: var(--surface); border-radius: 0.6rem; padding: 0.5rem; position: relative; }
.modal-close { position: absolute; right: 0.5rem; top: 0.5rem; border: none; background: transparent; color: var(--muted); font-size: 1.2rem; }
#videoContainer iframe { width: 100%; height: 480px; border: 0; }

.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr 320px; align-items: start; }

/* Info panel used on About and Contact pages to group content */
.info-panel {
  background: linear-gradient(180deg, rgba(2,17,38,0.6), rgba(3,37,65,0.55));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(2,17,38,0.45);
}
.info-panel h2,
.info-panel h3 {
  margin-top: 0;
}
.info-panel p { color: var(--muted); }

@media (max-width:800px){
  .info-panel { padding: 1rem; }
}

.socials { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.75rem; }
.socials a { color: var(--text); text-decoration: none; }

/* Small square icons for social links */
.social-icon {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  border: none;
}
.socials a:hover .social-icon {
  transform: scale(1.06);
  transition: transform 120ms ease;
}

/* Remove default focus outline for icon links */
.socials a:focus,
.socials a:focus-visible {
  outline: none;
}

form#mailForm { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
form#mailForm input { flex: 1; padding: 0.6rem; border-radius: 0.4rem; border: 1px solid rgba(148,163,184,0.08); background: rgba(255,255,255,0.02); color: var(--text); }
form#mailForm button { padding: 0.6rem 0.9rem; border-radius: 0.4rem; }

/* Make mailto link in contact page match site text color (not default blue) */
.contact a[href^="mailto:"] {
  color: var(--text);
}
.contact a[href^="mailto:"]:hover {
  color: var(--primary);
}

@media (max-width:800px){
  .header-row { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
}

.quick-look { padding: 3.5rem 0; }
.quick-look h2 { margin-bottom: 0.5rem; text-align: center; }
.video-embed { max-width: 1100px; margin: 1rem auto 0; border-radius: 0.6rem; overflow: hidden; }
.video-embed iframe { width: 100%; height: 620px; display: block; border: 0; }

@media (max-width:900px) {
  .video-embed iframe { height: 360px; }
}

.feature-grid h3 {
  margin-top: 0;
}

.site-footer {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
}
