* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Only apply custom cursor on devices with a precise mouse (Desktops/Laptops) */
@media (pointer: fine) and (hover: hover) {
  * {
    cursor: url('./assets/cursor.svg'), auto !important;
  }
}

body {
  background-color: #000000;
  background-image: url('./assets/images/grid.svg');
  background-attachment: fixed;
  background-position: center;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

@keyframes hueShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes textColorShift {
  0% { color: #E91D4F; }
  50% { color: #FAB01E; }
  100% { color: #E91D4F; }
}

.webgl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  animation: hueShift 30s infinite linear;
}

.scroll-container {
  position: relative;
  z-index: 10;
  width: 100%;
}

.view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 5rem;
  text-align: left;
}

.first-view {
  align-items: center;
  text-align: center;
}

.first-view .content {
  transform: translateY(25vh);
}

.second-view, .tools-view {
  /* Aligned left by default in .view */
  margin-top: 50vh; 
  margin-bottom: 50vh;
}

.third-view {
  align-items: flex-end;
  text-align: right;
  margin-top: 50vh; 
  margin-bottom: 50vh;
}

.fourth-view {
  align-items: center;
  text-align: center;
  margin-top: 50vh;
  margin-bottom: 50vh;
}

.fifth-view {
  align-items: center;
  text-align: center;
  margin-top: 50vh; 
  margin-bottom: 50vh;
}

.second-view .content > p:first-of-type:not(.desc), .third-view .content > p:first-of-type:not(.desc), .tools-view .content > p:first-of-type:not(.desc), .fourth-view .content > p:first-of-type:not(.desc) {
  font-size: 1.75rem;
}

.logo {
  width: 500px; /* Reduced from 800px to find the perfect middle ground */
  max-width: 100%; /* Ensures it still shrinks on mobile screens */
  margin-bottom: 1.5rem;
  animation: hueShift 30s infinite linear;
}

h1, h2, h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

h1 {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: 0.2rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(3.5rem, 8vw, 9rem); /* Massive on desktop, fits perfectly on mobile */
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

p {
  font-size: 1.25rem;
  font-weight: 300;
  color: #ffffff;
  max-width: 600px;
  line-height: 1.6;
}

.header-subtitle {
  font-size: 1.75rem;
  color: #ffffff;
}

.author-signature {
  font-family: 'Shadows Into Light', cursive;
  font-size: 1.5rem;
  color: #ffffff;
  margin-top: -0.25rem;
  opacity: 0.4; /* Reduced from 0.8 to make it significantly darker */
}

/* Expertise Grid Layout */
.expertise-grid {
  display: block;
  column-count: 2;
  column-gap: 3rem;
  margin-top: 4rem;
  width: 100%;
  max-width: 700px;
}
.expertise-column {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 3rem;
  display: inline-block; /* Helps prevent breaking across columns */
  width: 100%;
}

.expertise-column h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.expertise-column h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.expertise-column h3 a:hover {
  color: #ffffff;
  /* Massive white glow with 3 layers of intense light */
  text-shadow: 0 0 8px rgba(255, 255, 255, 1.0), 0 0 16px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.expertise-column ul {
  list-style: none;
  padding: 0;
}

.expertise-column ul li, p.desc {
  font-family: 'Space Mono', monospace; /* Tech/Code vibe */
  font-size: 0.95rem; 
  font-weight: 400;
  color: #ffffff;
  opacity: 0.65; /* Dimmed text */
  margin-bottom: 0.2rem;
  line-height: 1.4;
  position: relative;
}

.expertise-column ul li {
  padding-left: 1rem;
}

/* Custom minimal bullet points */
.expertise-column ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #ffffff;
  font-weight: 300;
}

/* Reverse bullet point alignment for right-aligned sections like third-view */
.third-view .expertise-column ul li {
  padding-left: 0;
  padding-right: 1rem;
}

.third-view .expertise-column ul li::before {
  left: auto;
  right: 0;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6rem;
  width: 100%;
}

.cta-subtitle {
  align-self: flex-start;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.cta-email {
  font-size: 6.8vw; /* Precisely calculated to span 23 characters across the screen padding */
  font-weight: 100;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.cta-email:hover {
  opacity: 0.8;
}

.footer-copy {
  position: relative;
  margin-top: 4rem;
  width: 100%;
  padding: 0 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.footer-logo {
  max-width: 120px;
  opacity: 0.8;
  animation: hueShift 30s infinite linear;
}

.footer-copy p {
  font-size: 0.85rem;
  font-weight: 300;
  color: #ffffff;
  opacity: 0.4;
  letter-spacing: 0.05rem;
  margin: 0;
  max-width: none;
}

@media (max-width: 1024px) {
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .view {
    padding: 2rem 1.5rem; /* Drastically reduce padding on mobile to widen the content area */
  }

  h1 { font-size: 3rem; }
   /* Increased for mobile as well */
  p { 
    font-size: 1rem; 
    line-height: 1.3;
    letter-spacing: 0;
  }
  
  /* Removed the overly specific .first-view paragraph rule that was overriding the subtitle */
  .expertise-grid {
    column-count: 2;
    column-gap: 1.5rem;
    margin-top: 2rem;
  }
  .expertise-column {
    margin-bottom: 2rem;
  }
  
  .header-subtitle,
  .second-view .content > p:first-of-type:not(.desc),
  .third-view .content > p:first-of-type:not(.desc),
  .tools-view .content > p:first-of-type:not(.desc),
  .fourth-view .content > p:first-of-type:not(.desc) {
    font-size: 1.75rem; 
  }

  .cta-email {
    font-size: 7.2vw; /* Reduced from 8.5vw so it perfectly fits left-to-right on mobile screens */
    white-space: nowrap;
  }
  
  .footer-copy {
    padding: 0 1.5rem; /* Match mobile padding */
  }

}

/* Character Counter Tool Styles */
#text-input { width: 100%; height: 250px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; color: #fff; padding: 1.5rem; font-family: 'Inter', sans-serif; font-size: 1.25rem; font-weight: 300; line-height: 1.5; resize: vertical; margin-bottom: 3rem; outline: none; transition: border-color 0.3s; backdrop-filter: blur(10px); }
#text-input:focus { border-color: rgba(233, 29, 79, 0.5); }
#text-input::placeholder { color: rgba(255, 255, 255, 0.3); }
.stats-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, 130px); 
  justify-content: center;
  gap: 1.5rem; 
  width: 100%; 
  margin-bottom: 3rem; 
}
.stat-card { 
  background: rgba(0, 0, 0, 0.2); 
  border: 1px solid rgba(255, 255, 255, 0.05); 
  border-radius: 50%; 
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(5px); 
  transition: transform 0.3s, background 0.3s; 
}
.stat-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.05); }
.stat-card h3 { font-size: 2.5rem; font-weight: 200; margin-bottom: 0.2rem; background: linear-gradient(90deg, #E91D4F, #FAB01E); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card p { font-size: 0.8rem; color: #aaa; margin: 0 auto; letter-spacing: 0.05rem; text-transform: uppercase; }

@media (max-width: 768px) {
  /* Character Counter Mobile Overrides */
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .stat-card {
    padding: 0.5rem;
  }
  .stat-card h3 {
    font-size: 1.75rem;
  }
  .stat-card p {
    font-size: 0.75rem;
  }
}


/* Usta.agency style Navigation */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.7rem 0;
  pointer-events: auto; /* Allows interaction with the header itself */
}

.main-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3); /* Glass effect background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle edge */
  z-index: -1;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 5rem;
  pointer-events: auto; /* Re-enable clicks */
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 24px;
  animation: hueShift 30s infinite linear;
}

.nav-right {
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: 1.125rem; /* text-lg equivalent */
  color: #ffffff;
}

.nav-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}
.nav-link:hover {
  opacity: 0.7;
}

.dropdown-wrapper {
  position: relative;
}

.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #ffffff;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.menu-toggle:hover {
  opacity: 0.7;
}

.hamburger-icon {
  width: 20px;
  height: 20px;
}

.nav-dropdown-list {
  position: absolute;
  top: 100%;
  right: -1.5rem;
  width: max-content;
  text-align: right;
  list-style: none;
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateZ(0); /* Force hardware acceleration for blur */
  z-index: 99;
}



.nav-dropdown-list li {
  transition: padding-right 0.3s ease;
}

/* The usta hover animation: adding padding right on hover */
.nav-dropdown-list li:hover {
  padding-right: 1rem;
}

.nav-dropdown-list a {
  display: block;
  padding: 1rem 0;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.125rem;
  line-height: 1.5;
}

.close-mobile {
  display: none; /* Only visible on mobile */
}

@media (max-width: 1024px) {
  .nav-container {
    padding: 0 1.5rem;
  }
  
  .hidden-mobile {
    display: none;
  }
  
  .nav-dropdown-list {
    position: fixed;
    top: 70px; /* Below header */
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* Match glass effect */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 2rem 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    transform: translateZ(0); /* Force hardware acceleration */
  }
  

  
  .close-mobile {
    display: block;
    margin-top: 2.5rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 1rem 0;
  }
}


/* Neon Teal Custom Cursor on Hover */
@media (pointer: fine) and (hover: hover) {
  a:hover, a:hover *, button:hover, button:hover *, .menu-toggle:hover, .menu-toggle:hover *, .nav-logo:hover, .nav-logo:hover * {
    cursor: url('./assets/cursor-hover.svg') 0 0, pointer !important;
  }
}



/* Force the text inside the Live Projects grid to be left-aligned, while keeping the block right-aligned */
.third-view .expertise-grid {
  text-align: left;
}

@media (max-width: 768px) {
  .expertise-grid {
    column-count: 1 !important;
    width: 100%;
  }
  .view .content {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width: 768px) {
  .third-view {
    align-items: center !important;
    text-align: center !important;
  }
  .third-view .expertise-grid {
    text-align: center !important;
  }
  .third-view .content {
    align-items: center !important;
    display: flex;
    flex-direction: column;
  }
}
