/* ==========================================================================
   FUTURISTIC THEME - Final Mobile-Friendly Version
   ========================================================================== */

/* 1. DESIGN CONTROL PANEL (Colors & Fonts) */
:root {
  --font-primary: 'Poppins', sans-serif;
  --background-dark-base: #0D1117;
  --background-dark-alt: #161B22;
  --accent-glow: #33FFD7;
  --text-primary: #E6EDF3;
  --text-secondary:rgb(122, 128, 135);
  --border-color: rgba(67, 255, 215, 0.15);
}

/* 2. GLOBAL STYLES */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background-color: var(--background-dark-base);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 300;
}

/* 3. HEADER & NAVIGATION */
header {
  position: fixed; width: 100%; top: 0; left: 0; z-index: 1000;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}
nav { max-width: 1200px; margin: 0 auto; padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 400; color: var(--text-primary); text-decoration: none; z-index: 1001; }

/* Desktop Navigation Styles */
.nav-menu { list-style: none; display: flex; gap: 2.5rem; }
.nav-menu a { color: var(--text-secondary); text-decoration: none; font-weight: 100; transition: color 0.3s ease; }
.nav-menu a:hover { color: var(--accent-glow); }
/* Active state for menu items (not logo) */
.nav-menu a.active {
  color: var(--accent-glow); font-weight: 300; position: relative;
}
.nav-menu a.active::after {
  content: ''; position: absolute; width: 100%; height: 2px;
  background-color: var(--accent-glow); bottom: -5px; left: 0;
}

/* 4. MAIN CONTENT & SECTIONS */
main { padding-top: 0; }
section { padding: 7rem 2rem; border-top: 1px solid var(--border-color); }
section:first-of-type {
  border-top: none;
}
section:nth-of-type(even) { background-color: var(--background-dark-alt); }

.container { 
    max-width: 900px; 
    margin: 0 auto; 
    text-align: left; /* CHANGED */
}

#home {
    height: 100vh; /* Make section full height of the viewport */
    padding: 0 2rem; /* Remove vertical padding */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* This adds a dark overlay for text readability over the image */
    /* Background image of an electronic circuit - https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=2670&auto=format&fit=crop */
    /* Background image of a blue glowing ribbon - https://images.unsplash.com/photo-1606778303039-9fc1488b1d8a?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D */
    /* Image of a laptop lid opening in the dark - https://images.unsplash.com/photo-1531297484001-80022131f5a1?q=80&w=2620&auto=format&fit=crop */
    /* Background image of a snow mountain in the night - https://images.unsplash.com/photo-1519681393784-d120267933ba?q=80&w=2670&auto=format&fit=crop */
    /* Background image of a blue lit neuoron network - https://images.unsplash.com/photo-1644088379091-d574269d422f?q=80&w=3386&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/blue-glowing-ribbon.avif');
    background-size: cover;
    background-position: center;
}

#home .container {
    text-align: center;
}

#home h1 { font-size: 4rem; font-weight: 600; line-height: 1.15; margin-bottom: 1.5rem; letter-spacing: -0.03em; }


/* Glassmorphism effect for the main hero paragraph on the home section */
/* #home p { */
    /* font-size: 1.25rem; */
    /* max-width: 700px; */ /* Constrain the width */
    /* margin: 0 auto; */ /* Keep it centered */
    
    /* --- NEW Glass Effect Styles --- */
    /* background-color: rgba(13, 17, 23, 0.5); */ /* Semi-transparent background */
    /* backdrop-filter: blur(8px); */
    /* -webkit-backdrop-filter: blur(8px); */ /* For Safari browser support */
    /* padding: 1rem 1.5rem; */
    /* border-radius: 12px; */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    /* box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); */
/* } */

#home p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  background-color: rgba(13, 17, 23, 0.5);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px); /* For Safari browser support */
}

h2 { font-size: 3rem; font-weight: 400; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
h4 { font-size: 1.25rem; font-weight: 300; margin-bottom: 0.5rem; letter-spacing: 0.05em; transition: color 0.3s ease; }
section:not(#services) h4:hover { color: var(--accent-glow); } /* Hover for h4 outside bento boxes */
p { 
    font-size: 1.1rem; 
    color: var(--text-secondary); 
    max-width: 750px; 
    margin-bottom: 1rem; /* CHANGED */
    font-weight: 300; 
}

/* 5. COMPONENTS (Button, Bento Box, Form) */
.cta-button {
  display: inline-block; 
  background: var(--accent-glow); 
  color: #0D1117; 
  padding: 12px 28px; /* This makes the button smaller */
  border: none;
  border-radius: 8px; 
  font-weight: 300; /* Adjusted for better visibility on a smaller button */
  font-size: 1rem; 
  text-decoration: none; 
  cursor: pointer; 
  transition: all 0.3s ease;
}

.cta-button:hover { 
  transform: translateY(-4px) scale(1.05); 
  box-shadow: 0 10px 20px rgba(51, 255, 215, 0.15); 
}
.bento-grid-parent { display: grid; grid-template-rows: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: -0.5rem; }
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 3rem; text-align: left; }
.bento-box {
  /* The "glass" background with a lighter tint */
  background: rgba(255, 255, 255, 0.1); 
  
  /* Increased blur for a more obvious effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* For Safari browser support */

  /* The "glass" border */
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* Other styles */
  padding: 2rem;
  transition: all 0.3s ease;
}
.bento-box:hover {
    transform: translateY(-5px); border-color: var(--accent-glow);
    box-shadow: 0 0 40px -10px rgba(51, 255, 215, 0.2);
}
/* Correctly targeting the h4 inside the bento box */
.bento-box h4 { font-weight: 500; text-transform: none; letter-spacing: normal; }
.bento-box:hover h4 { color: var(--accent-glow); }

.contact-form { 
    max-width: 600px; 
    display: flex; 
    flex-direction: column; 
    gap: 1.25rem; 
}
.contact-form input, .contact-form textarea {
  width: 100%; padding: 1rem; border: 1px solid var(--border-color); background-color: var(--background-dark-alt);
  border-radius: 8px; color: var(--text-primary); font-family: var(--font-primary); font-size: 1rem;
  font-weight: 300; transition: all 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent-glow); box-shadow: 0 0 0 3px rgba(51, 255, 215, 0.15);
}

.form-consent {
    display: flex;
    align-items: center; /* CHANGED: Better vertical alignment */
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.form-consent input[type="checkbox"] {
    width: auto;
    height: 18px;
    width: 18px;
    margin-top: 4px; 
    flex-shrink: 0; 
    cursor: pointer;
}

.form-consent label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}
/* This is the main container for the two columns */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap; /* Allows columns to stack on mobile */
    gap: 3rem;
    margin-top: 2rem;
    align-items: flex-end; /* Aligns the top of both columns */
}
/* Column 1: Contact Details */
.contact-details {
    flex: 1 1 300px; /* Flex-grow, flex-shrink, flex-basis */
    display: flex;
    flex-direction: column;
    gap: 2.5rem; /* Increased gap for more breathing room */
}

/* Column 2: Contact Form */
.contact-form {
    flex: 1.5 1 300px; /* Make the form column wider */
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Individual detail item (icon + text) */
.detail-item {
    display: flex;
    align-items: center; /* Vertically center icon and text */
    gap: 1.5rem; /* Increased gap */
    text-align: left;
}

.detail-item svg {
    color: var(--accent-glow);
    flex-shrink: 0;
    width: 24px; /* Explicit size */
    height: 24px;
}

.detail-item div {
    display: flex;
    flex-direction: column;
}

.detail-item span {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.detail-item p, .detail-item a {
    font-size: 1rem;
    margin: 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.detail-item a:hover {
    color: var(--accent-glow);
}

footer { text-align: center; font-weight: 200; padding: 3rem 2rem; color: var(--text-secondary); }
footer p {
  font-size: 0.9rem; /* Or 0.8rem for even smaller text */
  margin: 0; /* Removes extra space around the text */
}

/* ==========================================================================
   6. MOBILE RESPONSIVE STYLES
   ========================================================================== */
.menu-toggle {
    display: none; flex-direction: column; justify-content: space-around;
    width: 30px; height: 25px; background: transparent; border: none;
    cursor: pointer; padding: 0; z-index: 1001;
}
.menu-toggle .bar {
    width: 100%; height: 3px; background-color: var(--text-primary);
    border-radius: 2px; transition: all 0.3s ease;
}
/* Hamburger animation to "X" */
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* Media Query for mobile devices */
@media (max-width: 768px) {
  /* Show hamburger, prepare desktop menu for hiding */
  .menu-toggle {
      display: flex;
  }
  .nav-menu {
      display: none;
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100vh;
      background-color: var(--background-dark-base);
      flex-direction: column; justify-content: center; align-items: center;
      gap: 2rem;
  }
  .nav-menu.nav-open {
      display: flex; /* This class, toggled by JS, shows the mobile menu */
  }
  .nav-menu a {
      font-size: 1.5rem; font-weight: 300;
  }
  /* Remove underline on mobile active link for cleaner look */
  .nav-menu a.active::after {
      display: none;
  }

  /* Adjust typography and spacing for mobile */
  #home h1, #home h2 { 
      font-size: 2.8rem; 
      letter-spacing: -0.02em;
  }
  h2 { font-size: 2.2rem; }
  section { padding: 5rem 1.5rem; }
  .bento-grid { grid-template-columns: 1fr; }
}

#services {
    position: relative;
    /* The overlay is now lighter (0.85 opacity) so the image is visible */
    background-image: linear-gradient(rgba(13, 17, 23, 0.85), rgba(13, 17, 23, 0.85)), url('images/neuron-constellation.avif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
}