* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --navy: #0f1f46;
  --navy-light: #1a2f5f;
  --navy-dark: #0a1530;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.3);
  --text: #e8ecf3;
  --text-muted: #a0aac0;
  --gradient-1: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(147, 51, 234, 0.1));
  --gradient-2: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(236, 72, 153, 0.15));
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--navy-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.8rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 31, 70, 0.85);
  backdrop-filter: blur(10.8px);
  border-bottom: 0.9px solid rgba(255, 255, 255, 0.05);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.08rem 1.8rem;
}

.brand-link {
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand-mark {
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.855rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

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

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4.5px;
  left: 0;
  width: 0;
  height: 1.8px;
  background: var(--accent);
  transition: width 0.3s;
}

.site-nav a:hover::after {
  width: 100%;
}

.header-cta {
  display: flex;
  gap: 0.9rem;
}

.btn {
  padding: 0.585rem 1.35rem;
  border-radius: 7.2px;
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  border: 1.8px solid transparent;
  display: inline-block;
}

.btn-outline {
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent);
}

.btn-solid {
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
}

.btn-solid:hover {
  transform: translateY(-1.8px);
  box-shadow: 0 7.2px 21.6px var(--accent-glow);
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 0.99rem;
}

.nav-toggle {
  display: none;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, rgba(6, 73, 90, 0.7), rgba(6, 73, 90, 0.85)), var(--navy-dark);
  border-bottom: 0.9px solid rgba(255, 255, 255, 0.05);
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  z-index: 0;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 108px 0 90px;
  max-width: 810px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(40.5px, 7.2vw, 63px);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-shadow: 0 1.8px 10.8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  margin: 0 0 28.8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(14.4px, 1.8vw, 17.1px);
  max-width: 65ch;
  line-height: 1.7;
  text-shadow: 0 0.9px 3.6px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  gap: 14.4px;
  flex-wrap: wrap;
}

.hero .btn-solid {
  box-shadow: 0 3.6px 14.4px rgba(37, 121, 160, 0.4);
}

.hero .btn-outline {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(7.2px);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Filter Section */
.filter-section {
  padding: 3.6rem 0 2.7rem;
  background: var(--navy);
  border-bottom: 0.9px solid rgba(255, 255, 255, 0.05);
}

.filter-tabs {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.675rem 1.35rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1.8px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.855rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--text);
}

.filter-tab.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab svg {
  flex-shrink: 0;
}

/* Projects Section */
.projects-section {
  padding: 5.4rem 0 7.2rem;
  background: var(--gradient-1);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.7rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.02);
  border: 0.9px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.4s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-7.2px);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.3);
}

.project-image {
  width: 100%;
  height: 216px;
  object-fit: cover;
  display: block;
  background: var(--gradient-2);
}

.project-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.project-title {
  font-size: 1.26rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.project-category {
  font-size: 0.72rem;
  padding: 0.36rem 0.675rem;
  background: var(--gradient-2);
  border-radius: 5.4px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.35rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.54rem;
  margin-bottom: 1.35rem;
}

.tech-badge {
  font-size: 0.72rem;
  padding: 0.36rem 0.675rem;
  background: rgba(0, 212, 255, 0.08);
  border: 0.9px solid rgba(0, 212, 255, 0.2);
  border-radius: 5.4px;
  color: var(--accent);
  font-weight: 500;
}

.project-links {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 0.9px solid rgba(255, 255, 255, 0.05);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.855rem;
  font-weight: 600;
  transition: gap 0.3s;
}

.project-link:hover {
  gap: 0.675rem;
}

.project-link svg {
  width: 14.4px;
  height: 14.4px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  border-top: 0.9px solid rgba(255, 255, 255, 0.05);
  padding: 3.6rem 0 1.8rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 3.6rem;
  margin-bottom: 2.7rem;
}

.footer-brand {
  max-width: 270px;
}

.footer-tag {
  color: var(--text-muted);
  margin-top: 0.9rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.7rem;
}

.footer-col h4 {
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.81rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  padding: 0.36rem 0;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-legal {
  border-top: 0.9px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.8rem;
}

.legal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.legal-bar small {
  color: var(--text-muted);
}

.legal-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.legal-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.81rem;
  transition: color 0.3s;
}

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

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 21, 48, 0.95);
  backdrop-filter: blur(10.8px);
  z-index: 999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav {
  padding: 7.2rem 1.8rem 3.6rem;
}

.mobile-nav ul {
  list-style: none;
  margin-bottom: 2.7rem;
}

.mobile-nav a {
  display: block;
  padding: 0.9rem 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1.17rem;
  font-weight: 600;
  border-bottom: 0.9px solid rgba(255, 255, 255, 0.05);
  transition: color 0.3s;
}

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

.mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mobile-cta .btn {
  width: 100%;
  text-align: center;
}

.btn-close {
  margin-top: 0.9rem;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 871.2px) {
  .site-nav, .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4.5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.45rem;
  }

  .nav-toggle-bar {
    width: 21.6px;
    height: 1.8px;
    background: var(--accent);
    transition: all 0.3s;
  }

  .hero-title {
    font-size: clamp(32.4px, 9vw, 48px);
    text-align: center;
  }

  .hero-subtitle {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.9rem;
  }

  .filter-tab {
    white-space: nowrap;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }
}

/* Mobile Menu States */
html.nav-open {
  overflow: hidden;
}

html.nav-open .mobile-drawer {
  display: block;
}

/* Accessibility */
.nav-toggle:focus-visible,
.btn:focus-visible,
.filter-tab:focus-visible,
.project-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(27px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth transitions for filtered items */
.project-card {
  transition: opacity 0.32s ease, transform 0.32s ease, display 0.32s allow-discrete;
}