/* Apple Style Reset & Core */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

:root {
  /* Apple Color Palette SWAPPED FOR DARK MODE */
  --color-dark: #f5f5f7; 
  --color-light: #1c1c1e; 
  --color-white: #000000; 
  --color-gray: #8f8f93; 
  /* UPDATED: Change the link color to the new gold/ochre */
  --color-link: #CC9933; 
  --color-card-border: rgba(255, 255, 255, 0.15); 
}

body {
  /* Apply the new dark background */
  background: var(--color-light); 
  /* Apply the new light text color */
  color: var(--color-dark);
  scroll-behavior: smooth;
  line-height: 1.4;
  font-weight: 400;
  min-height: 100vh;
}

/* -------------------------------------- */
/* NEW: Pulsating Radial Gradient Keyframes */
/* -------------------------------------- */
@keyframes pulsateGlow {
    /* Slowly change size and position for a subtle, breathing effect */
    0% { background-size: 200% 200%; background-position: 50% 50%; }
    50% { background-size: 220% 220%; background-position: 45% 55%; }
    100% { background-size: 200% 200%; background-position: 50% 50%; }
}

/* Typography (Large & Bold Headers) */

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  font-size: 1.1rem;
  color: #c9c9c9; 
}

/* Navigation (Minimalist, Translucent Effect) */
nav {
  position: sticky;
  top: 0;
  background: #252527; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  padding: 0 1.5rem;
  z-index: 1000;
  height: 52px; 
  backdrop-filter: saturate(180%) blur(5px);
  background-color: rgba(37, 37, 39, 0.9);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 980px;
}

.logo {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-dark); 
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  color: var(--color-dark); 
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
  opacity: 1;
  color: #CC9933;
  text-decoration: underline;
}

/* -------------------------------------- */
/* NEW: GLASS CTA BUTTON STYLE */
/* -------------------------------------- */
.nav-cta-button {
    /* Reset default nav link styles */
    color: var(--color-dark) !important; 
    opacity: 1 !important;
    text-decoration: none !important;
    
    /* Box Model */
    display: inline-block;
    padding: 0.4rem 1rem;
    margin-left: 0.5rem; /* Add space from previous link */
    
    /* Glass Effect */
    background: rgba(255, 255, 255, 0.1); /* Light, transparent background */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    border: 1px solid rgba(255, 255, 255, 0.2); /* Soft, light border */
    border-radius: 999px; /* Pill shape */
    
    /* Animation/Hover */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.nav-cta-button:hover {
    background: rgba(255, 255, 255, 0.2); /* Slightly less transparent on hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Ensure the parent <li> doesn't inherit unnecessary space/padding */
.nav-links li {
    padding: 0;
}


/* Profile picture removed from nav, use it in the About section */
.profile-pic-container {
  display: none;
}

/* Hamburger menu (mobile only) */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 24px;
}

.hamburger .bar {
  height: 2px;
  width: 100%;
  background-color: var(--color-dark); 
  border-radius: 10px;
}

/* Header (Hero Section) - ANIMATION APPLIED HERE */
header {
  min-height: 80vh;
  position: relative; 
  overflow: hidden; 
  z-index: 1; 
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1rem 4rem;
  margin-top: 0;
  background: var(--color-light); 
}

/* Animated Pulsating Background Pseudo-Element */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* NEW RADIAL GRADIENT: Central bright glow fading quickly to dark */
    background: radial-gradient(
        circle at center, 
        rgba(240, 240, 240, 0.15) 0%, /* Soft, bright core */
        rgba(44, 44, 44, 0.8) 40%,    /* Mid-dark transition */
        #151515 80%                   /* Dark edges */
    );
    
    /* Reduced size for the radial effect and centered position */
    background-size: 200% 200%; 
    background-position: 50% 50%;
    
    /* NEW ANIMATION: Slow, continuous pulsation */
    animation: pulsateGlow 15s ease-in-out infinite alternate; 
    
    z-index: -1; 
    opacity: 1; /* Removed opacity for richer colors */
}

/* Ensure text is high contrast and above the animation */
header h1, header p {
    position: relative;
    z-index: 2;
    /* Glass effect is retained */
    padding: 0 1rem; 
    
    /* Glass Effect Properties */
    background: rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    border-radius: 10px;
    
    color: var(--color-dark); 
}

/* Override the hero subtext to match the new glass style */
.hero-subtext {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--color-gray);
  max-width: 600px;
  margin-top: 1rem;
  margin-bottom: 0.5rem; 
}

/* Since h1 and p are now inline-block/block for the blur, adjust their margins */
header h1 {
    margin-bottom: 0.5rem; 
    padding: 0.5rem 1.5rem; 
}

/* Main Content Layout */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 6rem 1rem 8rem; 
}

section {
  margin-bottom: 6rem;
  padding-top: 2rem;
}

/* New Grid Wrapper for Cards */
.case-study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: center;
}

.case-study-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  background: #2a2a2c; 
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  color: var(--color-dark); 
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-card-border); 
}

.case-study-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.case-study-card h3 {
  color: var(--color-dark); 
  margin-bottom: 0.5rem;
}

.case-study-card p {
  font-size: 0.95rem;
  color: var(--color-gray); 
  margin-bottom: 1rem;
}

.cta-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-link);
  margin-top: auto;
  align-self: flex-end;
  transition: all 0.2s ease-in-out; 
}

.cta-link:hover {
  opacity: 0.8;
  border-bottom: 1px solid var(--color-link);
}

/* About Section: Glass Card Style - Optimized for Dark Theme */
.about {
  text-align: center;
  padding: 3rem;
  border-radius: 20px;
  
  /* --- REFINED GLASSCARD EFFECT --- */
  background: rgba(0, 0, 0, 0.2); 
  backdrop-filter: blur(15px); 
  -webkit-backdrop-filter: blur(15px); 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); 
  /* --- END REFINED GLASSCARD EFFECT --- */

  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.about h2 {
    color: var(--color-dark); 
    margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.2rem;
  font-weight: 400;
  color: #e0e0e0; 
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* Contact Section (Clean list of links) */
.contact {
  text-align: center;
}

.contact-link {
  display: block;
  margin: 0.8rem 0;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link.email {
  font-weight: 400;
  color: var(--color-dark); 
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-link:hover {
  color: var(--color-link);
  text-decoration: underline;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: var(--color-light); 
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
  font-size: 0.8rem;
  color: var(--color-gray); 
}

/* Responsive (Mobile View) */
@media (max-width: 768px) {
  /* Mobile Navigation */
  .nav-content {
    justify-content: space-between;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 52px; 
    left: 0;
    width: 100%;
    background-color: rgba(37, 37, 39, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    align-items: center;
  }

  .nav-links.show {
    display: flex;
  }
  
  .nav-links li {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }

  .nav-links li a {
    font-size: 1rem;
    font-weight: 500;
  }
  
  /* Mobile CTA Button - Ensure it's full width/centered */
  .nav-cta-button {
      margin: 0;
      width: calc(100% - 2rem);
      padding: 0.75rem 1rem;
  }

  .hamburger {
    display: flex;
  }

  /* Adjust spacing and size for mobile */
  h2 {
    margin-bottom: 1rem;
  }

  .case-study-grid {
    gap: 1.5rem;
  }

  .case-study-card {
    min-height: 200px;
    padding: 1.5rem;
    text-align: left;
  }

  .cta-link {
    align-self: flex-start;
  }
}

/* Additional smaller mobile adjustments */
@media (max-width: 480px) {
  header {
    min-height: 60vh;
  }
  
  header h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtext {
    font-size: 1.1rem;
  }
}