*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #14CF93;
  --ink: #111;
  --bg: #fafafa;
  --muted: #6b7280;
  --panel: #dadada;
}

html, body { height: 100%; margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: #000;
  color: #fff;
  padding: 1rem;
  z-index: 10000;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 999;
  pointer-events: none;
}
#topheading {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
#topheading h5 { text-transform: uppercase; font-size: 12px; font-weight: 300; }
#loader h1 { text-align: center; font-size: clamp(28px, 4vw, 56px); font-weight: 300; }

.reveal .parent { display: inline-block; overflow: hidden; }
.reveal .child { display: inline-block; }

#fs, #white, #elem, #green {
  position: fixed;
  left: 0; top: 0;
  width: 100%;
  height: 0;
}
/* Loader and Transition Styles */
#loader {
  position: fixed;
  inset: 0;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#topheading {
  position: absolute;
  top: 5%;
  text-align: center;
}

.reveal {
  overflow: hidden;
  display: block;
}

#loader h1 {
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 300;
}

.loader-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 20px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Transition Layers */
#fs, #white, #elem, #green {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
}

#fs { background: #222; z-index: 103; }
#white { background: #dadada; z-index: 102; }
#elem { background: #509e8e; z-index: 101; }
#green { background: #14CF93; top: auto; bottom: 0; z-index: 100; }
#fs { background:#343434; z-index: 12; }
#white { background:#dadada; z-index: 11; }
#elem { background:#509e8e; z-index: 10; }
#green { background: var(--brand); top: auto; bottom: 0; z-index: 9; }

.textcolor { color: var(--brand); }

/* Layout */
.container {
  max-width: 1300px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}
.section { width: 100%; }

/* Navigation */
#nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
#nav a {
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.08em;
  position: relative;
}
#nav .brand { font-weight: 700; font-size: 13px; }
#nav a .line {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: width 0.5s ease;
}
#nav a:hover .line { width: 0; }

.nav-links { display: flex; gap: 24px; align-items: center; }

/* Fixed Navigation Fixes for Mobile */
.nav-toggle {
  display: none;
  width: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1001; /* Higher than GSAP layers */
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: 0.3s;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; position: relative; }
  
  /* Menu Button Animation to X */
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1000;
    opacity: 0;
  }
  .nav-links.open {
    right: 0;
    opacity: 1;
  }
  .nav-links a { font-size: 32px; font-weight: 700; }
}

/* Hero Content */
.row {
  margin-top: clamp(24px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
}
.row h1 { font-size: clamp(42px, 9vw, 120px); line-height: 1; font-weight: 500; margin: 0; }
.row .text h5 { opacity: 0.7; font-size: 12px; font-weight: 600; letter-spacing: 0.8em; margin: 0; }
.img { width: 68px; height: 48px; }

/* Imagery Section */
#imagery {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(20px, 5vw, 60px);
  margin-top: clamp(40px, 15vw, 200px);
}
#imgleft h1 { font-size: clamp(18px, 2.1vw, 28px); font-weight: 600; }
#imgright { position: relative; height: clamp(260px, 40vw, 520px); }
.imgcontainer {
  position: absolute;
  width: 46%;
  height: 80%;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
  transition: all 0.6s ease;
}
.imgcontainer:hover { filter: grayscale(0); }
.imgcontainer:nth-child(1) { left: 0; transform: rotate(-10deg); }
.imgcontainer:nth-child(2) { left: 20%; transform: rotate(-5deg); z-index: 2; }
.imgcontainer:nth-child(3) { left: 40%; transform: rotate(0deg); z-index: 3; }

/* Work & Images Section */
#work { 
  padding-top: 140px; 
  background: var(--panel); 
  margin-top: 120px; 
  border-radius: 40px 40px 0 0; /* Softens the transition from the hero */
}

#images { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: clamp(20px, 3vw, 40px); 
  padding-bottom: 80px; 
}

.cnt { 
  position: relative; 
  aspect-ratio: 4/5; 
  border-radius: 24px; 
  overflow: hidden; 
  background: #111; /* Prevents white flash during loading */
  cursor: pointer;
}

.cnt img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1); 
  will-change: transform;
}

.overlay {
  position: absolute; 
  inset: 0;
  /* Cleaner gradient for better text readability */
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
  display: flex; 
  flex-direction: column; 
  justify-content: flex-end;
  padding: 40px; 
  opacity: 0; 
  transform: translateY(10px); /* Slight lift effect */
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none; /* Allows click through to the image if needed */
}

.overlay-text h5 {
  color: var(--brand);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.overlay-text h3 {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

/* Hover States */
.cnt:hover .overlay { 
  opacity: 1; 
  transform: translateY(0); 
}

.cnt:hover img { 
  transform: scale(1.1); 
  /* Removed blur/brightness for a cleaner 'High-Fashion' look */
}

/* Responsive Fix */
@media (max-width: 1024px) {
  #images { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  #images { grid-template-columns: 1fr; }
  .cnt { aspect-ratio: 1/1; } /* Square on mobile looks better */
}

/* Playbook & Resources */
.playbook-section { padding: 100px 0; }
.resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.resource-card { background: #fff; padding: 40px; border-radius: 24px; transition: 0.4s; }
.resource-card:hover { transform: translateY(-10px); }

/* Skills */
#skills { background: var(--panel); padding-block: 80px; }
.skills-section { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.skills-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; }

/* Selected Projects Section */
.projects-section { 
  padding: 10px 0; 
  background: #fdfdfd; /* Slightly cleaner white */
}

.projects-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
  gap: 40px; 
  margin-top: 60px;
}

.project-card { 
  background: #fff; 
  border-radius: 24px; 
  overflow: hidden; 
  border: 1px solid rgba(0,0,0,0.05); /* Subtle editorial border */
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); 
}

.project-card:hover { 
  transform: translateY(-12px); 
  box-shadow: 0 30px 60px rgba(0,0,0,0.1); 
  border-color: var(--brand); /* Highlight border on hover */
}

.project-card img { 
  width: 100%; 
  object-fit: cover; 
  transition: transform 0.8s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-info { 
  padding: 30px; 
}

.project-info h3 { 
  font-size: 24px; 
  font-weight: 700; 
  margin-bottom: 12px; 
  color: var(--ink);
}

.project-info p { 
  font-size: 14px; 
  color: var(--muted); 
  line-height: 1.6; 
  margin-bottom: 24px;
}

/* Links & Icons */
.project-links { 
  display: flex; 
  gap: 20px; 
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.project-links a { 
  text-decoration: none; 
  font-size: 13px; 
  font-weight: 600; 
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.project-links a i { 
  font-size: 16px; 
}

.project-links a:hover { 
  color: var(--brand); /* Emerald glow on hover */
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}
/* Contact & Footer */
.hero-section { 
  text-align: center; 
  padding: 120px 16px; 
  background: #1a2e2a; 
  color: #fff; 
  position: relative;
  overflow: hidden;
}

.heading-with-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.hero-heading { 
  font-size: clamp(38px, 6vw, 88px); 
  font-weight: 800; 
  line-height: 1.1; 
  margin: 0; 
}

/* Fix for Attached Buttons */
.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px; /* Space between buttons */
  width: 100%;
}

.hero-btn { 
  padding: 16px 32px; 
  background: #fff; 
  color: #111; 
  border-radius: 50px; 
  text-decoration: none; 
  font-weight: 700; 
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1); 
  display: inline-block;
  white-space: nowrap;
}

.hero-btn.outline { 
  background: transparent; 
  color: #fff; 
  border: 2px solid rgba(255,255,255,0.3); 
}

.hero-btn:hover { 
  background: var(--brand); 
  color: #fff; 
  transform: translateY(-5px);
  border-color: var(--brand);
}

/* Social Links Refinement */
.social-links { 
  display: flex; 
  justify-content: center; 
  flex-wrap: wrap;
  gap: 28px; 
  margin-top: 80px; 
}

.social-btn { 
  color: rgba(255,255,255,0.6); 
  text-decoration: none; 
  font-size: 14px;
  font-weight: 500;
  transition: 0.3s;
}

.social-btn:hover {
  color: var(--brand);
}
#cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none; /* Crucial: clicks go through the cursor */
    z-index: 9999;
    mix-blend-mode: difference; /* Makes it visible on both dark/light bg */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s, height 0.3s, background 0.3s;
}
.filter-controls { display: flex; gap: 10px; margin-left: 20px; }
.filter-btn { 
    background: transparent; border: 1px solid #111; border-radius: 20px; 
    padding: 8px 18px; font-size: 11px; cursor: pointer; transition: 0.3s;
    font-weight: 700; text-transform: uppercase;
}
.filter-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.cursor-text {
    font-size: 4px;
    font-weight: 800;
    color: #000;
    opacity: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* When hovering over a project or link */
#cursor.active {
    width: 80px;
    height: 80px;
    background: #fff;
    mix-blend-mode: normal;
}

#cursor.active .cursor-text {
    opacity: 1;
    font-size: 10px;
}
/* Footer Section */
.site-footer { 
  margin-top: 100px; 
  border-top: 1px solid rgba(255,255,255,0.05); 
  padding: 40px 0; 
}

.footer-main {
  font-size: 13px;
  opacity: 0.5;
  margin-bottom: 20px;
}

.footer-bottom { 
  display: flex; 
  justify-content: space-between; 
  max-width: 100%; 
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.4;
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  
  .hero-btn {
    width: 100%; /* Make buttons full width on mobile */
    max-width: 300px;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .social-links {
    gap: 20px;
  }
}
.milestone-card {
    position: fixed;
    bottom: -100px; /* Start hidden */
    left: 30px;
    background: rgba(20, 61, 50, 0.9); /* Your brand green */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    opacity: 0;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.toast-icon {
    background: #fff;
    color: #143d32;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.toast-content h4 { font-size: 13px; font-weight: 700; margin: 0; text-transform: uppercase; }
.toast-content p { font-size: 11px; margin: 0; opacity: 0.8; }

.close-toast {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}
.about-section { padding: 100px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; }

.about-text {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.8;
    font-weight: 300;
}

.highlight { color: #fff; font-weight: 600; }

.experience-badge {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.badge-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.badge-item .company { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 2px; }
.badge-item .role { font-size: 12px; opacity: 0.6; }

/* Mobile adjust */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
}