/* Comprehensive Responsive CSS for All Pages */
:root {
  --bg: #0f0f10;
  --muted: #f3f3f3;
  --accent: #ffb400;
  --card: #121214;
  --glass: rgba(255, 255, 255, 0.03);
  --radius: 16px;
  --max: 1400px;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #bdbdbd;
}

/* Ensure text visibility */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important
}

p {
  color: var(--text-secondary) !important
}

.muted {
  color: var(--text-muted) !important
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box
}

html {
  font-size: clamp(14px, 2.5vw, 16px);
  scroll-behavior: smooth
}

html, body {
  height: 100%;
  overflow-x: hidden
}

body {
  margin: 0;
  font-family: Inter, system-ui, Arial;
  background: linear-gradient(180deg, #040405 0%, #0c0c0d 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  transition: all 0.3s ease;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Light Theme */
body.light {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  color: #333;
  --text-primary: #333;
  --text-secondary: #555;
  --text-muted: #666;
}

body.light h1, body.light h2, body.light h3, body.light h4, body.light h5, body.light h6 {
  color: #333 !important
}

body.light p {
  color: #555 !important
}

body.light .muted {
  color: #666 !important
}

body.light .card {
  background: #ffffff;
  border: 1px solid #e0e0e0
}

body.light header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85))
}

body.light .brand h1, body.light nav a, body.light .menu-btn, body.light .theme-btn {
  color: #333
}

body.light .hero-right {
  background: linear-gradient(180deg, rgba(255, 180, 64, 0.1), rgba(0, 0, 0, 0.05));
  border: 1px solid #e0e0e0
}

body.light .project {
  background: linear-gradient(180deg, #f0f0f0, #e8e8e8)
}

body.light .muted {
  color: #666
}

body.light h1, body.light h2, body.light h3, body.light h4, body.light p {
  color: #333
}

body.light footer {
  border-top: 1px solid #e0e0e0
}

body.light .socials a {
  color: #666
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(12px, 4vw, 80px);
  width: 100%;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(7, 7, 7, 0.75), rgba(7, 7, 7, 0.35));
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 24px);
  padding: clamp(6px, 1.5vw, 12px);
}

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

.brand a {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand img {
  width: 120px;
  height: 40px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
}

.brand h1 {
  font-size: clamp(16px, 4vw, 20px);
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.1)
}

/* Buttons */
.cta {
  background: var(--accent);
  color: #111;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.3);
}

.theme-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  min-width: 44px;
  min-height: 44px;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.2)
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

/* Mobile Navigation */
@media(max-width:880px) {
  nav ul {
    display: none
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px
  }

  .mobile-menu-open {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    right: 20px !important;
    top: 60px !important;
    background: rgba(18, 18, 20, 0.98) !important;
    padding: 16px !important;
    border-radius: 12px !important;
    gap: 8px !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    min-width: 180px !important;
    z-index: 9999 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
  }

  .mobile-menu-open a {
    color: #ffffff !important;
    padding: 10px 12px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
    display: block !important;
  }

  .mobile-menu-open a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffb400 !important;
  }
}

/* Contact Page Specific */
.contact-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media(max-width:880px) {
  .contact-forms {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Services Page Specific */
.features {
  margin: 40px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.feature-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 180, 0, 0.1);
  border-radius: 10px;
  margin-bottom: 12px;
}

.features .card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

@media(max-width:880px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:480px) {
  .features-grid {
    grid-template-columns: 1fr
  }
}

/* Projects Grid */
.projects {
  margin: 40px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.project {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #111, #0b0b0b);
  min-height: 140px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.project img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
}

.project h4 {
  position: relative;
  margin: 0;
  color: var(--text-primary);
}

@media(max-width:880px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:480px) {
  .projects-grid {
    grid-template-columns: 1fr
  }
}

/* About Page Specific */
.about {
  display: flex;
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
  padding: clamp(20px, 4vw, 28px) 0;
}

.about img {
  width: clamp(300px, 40vw, 400px);
  height: clamp(240px, 32vw, 320px);
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

@media(max-width:880px) {
  .about {
    flex-direction: column;
    text-align: center;
  }

  .about img {
    width: 100%;
    max-width: 400px;
    height: auto;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  margin: 0 0 1rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(28px, 6vw, 48px)
}

h2 {
  font-size: clamp(24px, 5vw, 40px)
}

h3 {
  font-size: clamp(20px, 4vw, 32px)
}

h4 {
  font-size: clamp(18px, 3vw, 24px)
}

p {
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.6;
  font-size: clamp(14px, 2.5vw, 16px);
}

.muted {
  color: var(--text-muted);
  font-size: clamp(12px, 2vw, 14px);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr min(520px, 40vw);
  gap: clamp(20px, 5vw, 40px);
  align-items: center;
  padding: clamp(40px, 10vw, 80px) 0;
}

.hero-left h2 {
  font-size: clamp(28px, 8vw, 56px);
  margin: 0 0 clamp(12px, 2vw, 16px);
  color: var(--text-primary);
  line-height: 1.1;
}

.hero-left p {
  color: var(--text-secondary);
  margin: 0 0 clamp(20px, 4vw, 28px);
  font-size: clamp(16px, 3vw, 20px);
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #111;
  padding: 16px 28px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 44px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 180, 0, 0.4);
}

.btn-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 24px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 44px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-light:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

/* Cards & Content */
.card {
  background: var(--card);
  padding: clamp(16px, 4vw, 28px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.card h3 {
  margin: 0 0 12px;
  font-size: clamp(18px, 3vw, 22px);
  color: var(--text-primary);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.5;
}

/* Grid Layouts */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(12px, 3vw, 18px);
  margin: clamp(30px, 6vw, 40px) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(10px, 2vw, 14px);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(24px, 5vw, 40px);
  margin-bottom: 30px;
}

/* Forms */
.demo-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: clamp(8px, 2vw, 12px);
  margin-top: clamp(16px, 3vw, 20px);
}

.form-input {
  padding: clamp(10px, 2vw, 12px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card);
  color: var(--text-primary);
  font-size: clamp(14px, 2vw, 16px);
  transition: all 0.3s;
  min-height: 44px;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 180, 0, 0.2);
}

.form-textarea {
  grid-column: 1/-1;
  resize: vertical;
  font-family: inherit;
  min-height: 80px;
}

.form-submit {
  grid-column: 1/-1;
  justify-self: start;
  min-width: 120px;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Breakpoints */
@media(max-width:880px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-right {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero-cta {
    justify-content: center
  }

  .about {
    flex-direction: column;
    text-align: center
  }

  .wrap {
    padding: clamp(12px, 3vw, 24px)
  }

  .nav {
    padding: clamp(10px, 2vw, 18px)
  }

  .services {
    grid-template-columns: repeat(2, 1fr)
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:768px) {
  .wrap {
    padding: 16px 20px
  }

  .nav {
    padding: 12px 16px
  }

  .brand h1 {
    font-size: 17px
  }

  .cta {
    padding: 8px 14px;
    font-size: 14px
  }

  .services {
    grid-template-columns: 1fr
  }

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

@media(max-width:640px) {
  .hero-cta {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-light {
    width: 100%;
    text-align: center;
  }

  .demo-form {
    grid-template-columns: 1fr
  }

  .form-submit {
    justify-self: stretch;
    width: 100%;
  }

  .wrap {
    padding: 12px 16px
  }

  .nav {
    padding: 10px 14px
  }

  .brand h1 {
    font-size: 16px
  }

  .cta {
    padding: 7px 12px;
    font-size: 13px
  }

  .hero {
    padding: clamp(20px, 6vw, 40px) 0
  }

  .hero-left h2 {
    font-size: clamp(24px, 7vw, 32px)
  }

  .hero-left p {
    font-size: clamp(14px, 3vw, 18px)
  }

  .card {
    padding: 20px;
    border-radius: 12px
  }

  .services {
    gap: 16px
  }

  .projects-grid {
    gap: 12px
  }

  .about-buttons {
    flex-direction: column;
    gap: 12px
  }

  .about-buttons .btn-primary, .about-buttons .btn-light {
    width: 100%;
    text-align: center
  }

  .footer-content {
    gap: 24px;
    text-align: center
  }
}

@media(max-width:480px) {
  .wrap {
    padding: 10px 14px
  }

  .nav {
    padding: 8px 12px
  }

  .brand {
    gap: 8px
  }

  .brand h1 {
    font-size: 15px
  }

  .menu-btn {
    font-size: 13px;
    padding: 6px
  }

  .theme-btn {
    padding: 6px 10px;
    font-size: 14px
  }

  .cta {
    padding: 6px 10px;
    font-size: 12px
  }

  .hero {
    padding: clamp(16px, 6vw, 32px) 0
  }

  .hero-left h2 {
    font-size: clamp(20px, 6vw, 28px)
  }

  .hero-left p {
    font-size: clamp(13px, 2.5vw, 16px)
  }

  .card {
    padding: 16px;
    border-radius: 10px
  }

  .services {
    gap: 12px
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 10px
  }

  .about-buttons {
    gap: 10px
  }

  .about-buttons .btn-primary, .about-buttons .btn-light {
    padding: 14px 20px;
    font-size: 16px
  }

  .footer-content {
    gap: 20px
  }

  .stats {
    gap: 8px
  }

  .stat {
    min-width: 80px;
    padding: 10px 8px
  }

  .stat b {
    font-size: 16px
  }

  .stat small {
    font-size: 11px
  }

  .socials {
    justify-content: center;
    gap: 8px
  }

  .socials a {
    padding: 6px 10px;
    font-size: 14px
  }
}

@media(max-width:375px) {
  .wrap {
    padding: 8px 12px
  }

  .nav {
    padding: 6px 10px
  }

  .brand {
    gap: 6px
  }

  .brand h1 {
    font-size: 14px
  }

  .menu-btn {
    font-size: 12px;
    padding: 5px
  }

  .theme-btn {
    padding: 5px 8px;
    font-size: 13px
  }

  .cta {
    padding: 5px 8px;
    font-size: 11px
  }

  .hero {
    padding: 12px 0
  }

  .hero-left h2 {
    font-size: clamp(18px, 5vw, 24px)
  }

  .hero-left p {
    font-size: clamp(12px, 2vw, 14px)
  }

  .card {
    padding: 14px;
    border-radius: 8px
  }

  .services {
    gap: 10px
  }

  .projects-grid {
    gap: 8px
  }

  .about-buttons {
    gap: 8px
  }

  .footer-content {
    gap: 16px
  }

  .stats {
    gap: 6px
  }

  .stat {
    min-width: 70px;
    padding: 8px 6px
  }

  .stat b {
    font-size: 15px
  }

  .stat small {
    font-size: 10px
  }
}

@media(max-width:320px) {
  .wrap {
    padding: 6px 10px
  }

  .nav {
    padding: 4px 8px
  }

  .brand {
    gap: 4px
  }

  .brand h1 {
    font-size: 13px
  }

  .menu-btn {
    font-size: 11px;
    padding: 4px
  }

  .theme-btn {
    padding: 4px 6px;
    font-size: 12px
  }

  .cta {
    padding: 4px 6px;
    font-size: 10px
  }

  .hero {
    padding: 8px 0
  }

  .hero-left h2 {
    font-size: clamp(16px, 4vw, 20px)
  }

  .hero-left p {
    font-size: clamp(11px, 1.5vw, 12px)
  }

  .card {
    padding: 12px;
    border-radius: 6px
  }

  .services {
    gap: 8px
  }

  .projects-grid {
    gap: 6px
  }

  .about-buttons {
    gap: 6px
  }

  .footer-content {
    gap: 12px
  }

  .stats {
    gap: 4px
  }

  .stat {
    min-width: 65px;
    padding: 6px 4px
  }

  .stat b {
    font-size: 14px
  }

  .stat small {
    font-size: 9px
  }
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all 700ms cubic-bezier(.2, .9, .2, 1);
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* Accessibility */
@media(prefers-reduced-motion:reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  header, footer, .menu-btn, .theme-btn {
    display: none
  }

  body {
    background: white;
    color: black
  }

  .card {
    border: 1px solid #ccc
  }
}