/* ==========================================
   RESET & CORE VARIABLES
   ========================================== */
:root {
  --bg-color: #060908;
  --card-bg: rgba(16, 22, 19, 0.85);
  --accent-green: #00ff88;
  --glow-emerald: #023820;
  --text-main: #f0f2f5;
  --text-muted: #8a9691;
  --border-color: rgba(0, 255, 136, 0.12);
  
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  background: 
    radial-gradient(circle at 10% 10%, rgba(0, 255, 136, 0.15) 0%, rgba(2, 56, 32, 0.2) 30%, transparent 65%),
    radial-gradient(circle at 90% 90%, rgba(0, 255, 136, 0.12) 0%, rgba(2, 56, 32, 0.15) 35%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(6, 9, 8, 1) 0%, rgba(4, 6, 5, 1) 100%);
  background-attachment: fixed;
}

/* Enable hardware acceleration for performance */
#canvas-container, .cursor-dot, .cursor-circle, .project-card, .reveal, .fade-in {
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Custom Cursor */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px var(--accent-green);
}

.cursor-circle {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-circle {
    display: none;
  }
}

/* ==========================================
   3D CANVAS
   ========================================== */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.8rem 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(6, 9, 8, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo-brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  height: 28px !important; /* Perfect height to align with WORK, ABOUT, etc. */
  width: auto !important;
  display: block;
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-minimal {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: rgba(0, 255, 136, 0.03);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.btn-minimal:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* ==========================================
   LAYOUT & SECTIONS
   ========================================== */
.main-content {
  position: relative;
  z-index: 2;
}

.section {
  padding: 8rem 8% 4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.section-num {
  color: var(--accent-green);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 2px;
}

/* HERO */
.hero-section {
  min-height: 100vh;
  padding-top: 12rem;
}

.tagline {
  color: var(--accent-green);
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -1px;
  margin-bottom: 3rem;
  text-transform: uppercase;
}

.outline-text {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.6);
}

.hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-subtext {
  max-width: 460px;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 300;
}

.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scroll-text {
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.scroll-line {
  width: 40px;
  height: 1px;
  background-color: var(--accent-green);
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.5rem;
}

.project-card {
  position: relative;
  cursor: pointer;
}

.project-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 8, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.view-btn {
  padding: 0.8rem 1.6rem;
  background: var(--accent-green);
  color: #040605;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ABOUT & EXPERIENCE */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.large-body {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  line-height: 1.4;
  margin-bottom: 2rem;
  font-weight: 400;
}

.body-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 300;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-left: 1px solid var(--border-color);
  padding-left: 3rem;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-green);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.period {
  color: var(--accent-green);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.company {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.timeline-content p {
  color: var(--text-muted);
  font-weight: 300;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.skill-category {
  background-color: var(--card-bg);
  padding: 3rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.skill-category h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--accent-green);
}

.skill-category ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-category li {
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 0.5rem;
}

/* ==========================================
   CONTACT & FORM (FIXED SUCCESS CARD)
   ========================================== */
.contact-section {
  text-align: center;
  align-items: center;
  padding-bottom: 4rem;
}

.contact-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 1.5rem 0 3rem;
}

.big-email-link {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 2.5rem);
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 2px solid var(--accent-green);
  padding-bottom: 0.5rem;
}


.contact-footer {
  margin-top: 8rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.social-links {
  display: flex;
  gap: 2rem;
}

.social-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

/* MODAL STYLES */
.projects-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 5, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.projects-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  max-height: 85vh;
  background: #0d120f;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 2.2rem;
  cursor: pointer;
}

.modal-header {
  margin-bottom: 2.5rem;
  text-align: left;
}

.modal-category-badge {
  color: var(--accent-green);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

.modal-title {
  font-size: 2rem;
  margin: 0.5rem 0;
  color: #fff;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.popup-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.popup-card-img {
  width: 100%;
  height: 180px;
  background: #1a221d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

.popup-card-body {
  padding: 1.2rem;
  text-align: left;
}

.popup-card-title {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.popup-card-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ANIMATION CLASSES */
.fade-in, .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.active, .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 992px) {
  .projects-grid, .skills-grid, .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .header {
    padding: 1.5rem 5%;
  }
  .section {
    padding: 6rem 5% 3rem;
  }
}
/* ==========================================
   MOBILE RESPONSIVE OPTIMIZATIONS
   ========================================== */

@media screen and (max-width: 968px) {
  /* Adjust main container spacing for tablets and mobiles */
  body {
    overflow-x: hidden;
  }

  /* Scale down the massive hero headings so they don't break lines awkwardly */
  .contact-headline, 
  h1 {
    font-size: clamp(2rem, 8vw, 3.5rem) !important;
  }

  /* Fix navigation menu behavior on mobile if it overflows */
  .nav-links, header nav {
    gap: 1.2rem;
  }

  /* Ensure Three.js canvas or hero graphics don't overflow or look giant on mobile */
  canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

@media screen and (max-width: 768px) {
  /* Smaller mobile screens (Phones) */
  
  /* Compact the header and navigation */
  header {
    padding: 0.8rem 1rem !important;
  }

  /* Shrink the logo slightly on mobile so it leaves room for the menu/resume button */
  .brand-logo-img {
    height: 32px !important;
  }

  /* Make contact forms and wrappers fit nicely within mobile viewport margins */
  .form-wrapper, .contact-form {
    width: 90% !important;
    margin: 2rem auto !important;
  }

  /* Stack footer items nicely */
  .contact-footer {
    margin-top: 4rem !important;
    gap: 1.5rem;
  }
  
  .social-links {
    gap: 1.2rem;
  }
}

/* ==========================================
   FULL-WIDTH CLIENT LOGO MARQUEE WITH EDGE FADE
   ========================================== */
.client-marquee-section {
  width: 100%;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(41, 254, 146, 0.1);
  border-bottom: 1px solid rgba(41, 254, 146, 0.1);
  background: rgba(0, 0, 0, 0.25);
  margin: 3rem 0;
  overflow: hidden;
}

.marquee-track-wrapper {
  overflow: hidden;
  width: 100%;
  cursor: grab;
  user-select: none;
  display: flex;

  /* Left and right smooth gradient transparency masks */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 12%,
    black 88%,
    transparent 100%
  );
}

.marquee-track-wrapper:active {
  cursor: grabbing;
}

.marquee-track {
  display: flex;
  gap: 5rem; /* Gap between logos */
  align-items: center;
  width: max-content;
  animation: logoMarquee 35s linear infinite;
  will-change: transform;
}

.client-marquee-section:hover .marquee-track {
  animation-play-state: paused;
}

.client-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-logo-item img {
  height: 32px; /* Adjust logo height as needed */
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Forces PNG to pure white */
  opacity: 0.4; /* Base theme transparency */
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.client-logo-item img:hover {
  opacity: 0.9;
}

@keyframes logoMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .client-marquee-section {
    padding: 1.8rem 0;
    margin: 2rem 0;
  }
  .marquee-track {
    gap: 3.5rem;
  }
  .client-logo-item img {
    height: 24px;
  }
}
/* EGO GRIDS SHAPE MATCHER */
.ego-section {
  width: 100%;
  background-color: #050505;
  color: #ffffff;
  padding: 80px 20px;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  user-select: none;
  border-top: 1px solid #151515;
}

.ego-container {
  max-width: 900px;
  margin: 0 auto;
}

.ego-tag {
  color: #00FF87;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.ego-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  margin: 10px 0 6px;
  letter-spacing: -1px;
}

.ego-subtitle {
  color: #00FF87;
  font-size: 0.95rem;
  font-family: monospace;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* HUD Header */
.ego-hud {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 8px;
  font-family: monospace;
  font-size: 0.9rem;
}

.ego-target-box, .ego-match-box {
  background: #111111;
  border: 1px solid #222222;
  padding: 8px 16px;
  border-radius: 4px;
  color: #888888;
}

.ego-target-box span {
  color: #ffffff;
  font-weight: 700;
}

.ego-match-box strong {
  color: #00FF87;
}

.ego-comment-box {
  background: #0a0a0a;
  border: 1px dashed #333333;
  color: #00FF87;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 12px 20px;
  max-width: 600px;
  margin: 0 auto 20px auto;
  border-radius: 4px;
  min-height: 24px;
  line-height: 1.4;
}

/* Canvas Wrapper */
.ego-canvas-wrap {
  position: relative;
  width: 100%;
  height: 400px;
  min-height: 400px;
  background: #080808;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 25px;
  cursor: crosshair;
  display: block;
  touch-action: none;
}

#egoCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Controls */
.ego-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.ego-btn {
  background: transparent;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.ego-btn:hover {
  border-color: #00FF87;
  color: #00FF87;
}

.ego-btn-reset:hover {
  border-color: #ff4757;
  color: #ff4757;
}

.ego-cta-main {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.ego-cta-sub {
  color: #777777;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.ego-cta-link {
  display: inline-block;
  background-color: #00FF87;
  color: #000000;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ego-cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 135, 0.3);
}
.ego-title {
  font-family: var(--font-heading, inherit);
}

.ego-section p, 
.ego-section span, 
.ego-section button {
  font-family: var(--font-sans, inherit);
}
.ego-comment-box {
  font-family: inherit; /* This pulls your website's main body font */
  font-weight: 400;     /* Sets it to regular weight instead of bold/code style */
  letter-spacing: normal;
}

html {
  scroll-behavior: smooth;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Optional: Subtle pause on hover for high-end feel */
.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes smoothMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* 2 Columns across 2 Rows Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px;
}

/* Compact Card Image Container */
.project-image-wrap {
  position: relative;
  width: 100%;
  height: 140px; /* Compact height so 4 cards show cleanly */
  overflow: hidden;
  border-radius: 8px;
}

.project-image-placeholder,
.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay Styling & Click Fix */
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Allows hover pass-through */
  z-index: 5;
}

.project-image-wrap:hover .project-overlay {
  opacity: 1;
  pointer-events: auto; /* Enables clicks when overlay is visible */
}

/* VIEW PROJECTS Button / Link Fix */
a.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: #00FF87;
  color: #000000;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto !important; /* Forces direct clickability */
  position: relative;
  z-index: 10;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

a.view-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
}

/* Responsive fallback for mobile screens */
@media (max-width: 650px) {
  .projects-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================
   GLOBAL SECTION SPACING & GAP TIGHTENING
   ========================================== */

/* 1. Reduce default section padding across all blocks */
section,
.section,
.work-section,
.about-section,
.experience-section,
.skills-section,
.marquee-section,
.contact-section {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-height: auto !important; /* Disables forcing full viewport height per section */
}

/* 2. Tighten headers and section titles */
.section-header,
.ego-title-wrap {
  margin-bottom: 20px !important;
  padding-bottom: 0 !important;
}

.section-title,
.ego-title {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

/* 3. Eliminate excessive margins on containers & grids */
.container,
.projects-grid,
.skills-grid,
.experience-grid {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 4. Compact hero section if it has unnecessary bottom padding */
.hero-section {
  padding-bottom: 40px !important;
  min-height: calc(100vh - 80px) !important; /* Keeps Hero prominent without extra bottom gap */
}

/* Pull the logo marquee up into the middle of the screen */
section.client-marquee-section {
  margin-top: -40px !important;    /* Pulls the logo strip upward */
  margin-bottom: 90px !important;   /* Creates a balanced gap below it before SELECTED WORK */
  padding: 15px 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

/* ==========================================
   TIMELINE & SKILLS EXACT SPACING FIX
   ========================================== */

/* 1. Experience Timeline Gaps */
.timeline {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important; /* Reduces gap between experience items */
  margin-top: 20px !important;
  padding: 0 !important;
}

.timeline-item {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.timeline-meta {
  margin-bottom: 6px !important;
}

.timeline-content h3 {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

.timeline-content p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.5 !important;
}

/* 2. Skills Grid & List Gaps */
.skills-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important; /* Compact gap between the 3 skill columns */
  margin-top: 20px !important;
}

.skill-category {
  padding: 20px !important; /* Compact internal card padding */
}

.skill-category h3 {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

.skill-category ul {
  margin: 0 !important;
  padding-left: 18px !important; /* Aligns bullet points cleanly */
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important; /* Reduces vertical gap between individual list items */
}

.skill-category ul li {
  margin-bottom: 0 !important;
  line-height: 1.4 !important;
}

/* Responsive fallback for mobile screens */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 1. Account for the fixed header height globally when scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px !important; /* Adjust this value (e.g., 80px or 100px) based on your header's height */
}

/* 2. Alternatively, ensure each section clears the navbar */
section, .section {
  scroll-margin-top: 100px !important;
}

/* Completely hide and disable custom cursor follower */
.custom-cursor,
.cursor-dot,
.cursor-follower,
#cursor,
#cursor-dot {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ensure default browser cursor is visible everywhere */
html, body, a, button {
  cursor: auto !important;
}

/* ==========================================
   FORCE CLEAN BUTTON CURSORS & DISABLE TEXT BEAM
   ========================================== */

/* 1. Force pointer hand cursor on all interactive elements */
a, 
button, 
.button, 
.btn, 
[role="button"],
.project-card,
.big-email-link,
.view-project-btn,
.nav-link,
.timeline-item,
.skill-category {
  cursor: pointer !important;
  user-select: none !important; /* Prevents text cursor from appearing */
  -webkit-user-select: none !important;
}

/* 2. Reset text elements inside buttons so they don't trigger the 'I' beam */
a *, 
button *, 
.button *, 
.btn * {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* ==========================================
   RESTORE TEXT CURSOR (I-BEAM) FOR CONTENT
   ========================================== */

/* 1. Reset text elements in Experience section to text cursor */
.timeline-item p,
.timeline-item h3,
.timeline-meta,
.timeline-meta span {
  cursor: text !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* 2. Reset text elements in Skills section to text cursor */
.skill-category p,
.skill-category h3,
.skill-category ul li {
  cursor: text !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* 3. Keep links or buttons inside these sections as pointer hands */
.timeline-item a,
.timeline-item button,
.skill-category a,
.skill-category button {
  cursor: pointer !important;
}
/* ==========================================================
   SELECTED WORK: PERFECT VERTICAL CARD SPACING
   ========================================================== */

/* 1. Tight gap under top thumbnail */
.project-card img,
.work-card img,
.project-thumbnail,
.image-wrapper {
  margin-bottom: 8px !important;
  display: block;
}

/* 2. Category tag close to upper thumbnail */
.project-category,
.project-tag,
.work-card .tag {
  margin-top: 0px !important;
  margin-bottom: 4px !important;
  font-size: 0.75rem !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: #00FF87 !important;
}

/* 3. Title close to category tag */
.project-title,
.work-card h3,
.project-card h3 {
  margin-top: 0px !important;
  margin-bottom: 6px !important;
  line-height: 1.2 !important;
}

/* 4. Subtitle close to title, with balanced spacing above the next thumbnail */
.project-description,
.project-subtitle,
.work-card p,
.project-card p {
  margin-top: 0px !important;
  margin-bottom: 48px !important; /* Creates distinct breathing room above the lower thumbnail */
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Contact Section Styles */
.contact-main {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
}

.email-link {
  color: #ffffff !important;
  text-decoration: none !important;
  border-bottom: 2px solid #00FF87 !important;
  padding-bottom: 8px !important;
  margin-bottom: 0 !important;
}

.social-links {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 20px !important;
  margin-top: 4px !important;
}

.contact-footer {
  margin-top: 48px !important;
  text-align: center !important;
}

.copyright-text {
  font-size: 0.75rem !important;
  color: rgba(255, 255, 255, 0.4) !important;
  letter-spacing: 1px !important;
}

/* ==========================================
   SOCIAL LINKS HOVER POP-UP & GLOW ANIMATION
   ========================================== */
.social-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 16px !important;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 1.5px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  /* Smooth transform & glow transition */
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
  position: relative !important;
}

.social-icon {
  fill: rgba(255, 255, 255, 0.7) !important;
  transition: fill 0.3s ease, transform 0.3s ease !important;
}

/* Hover State: Pop Up Lift + Green Glow */
.social-link:hover {
  color: #00FF87 !important;
  background: rgba(0, 255, 135, 0.08) !important;
  border-color: #00FF87 !important;
  /* Lifts item up and scales slightly */
  transform: translateY(-5px) scale(1.05) !important;
  /* Multi-layered neon green drop shadow glow */
  box-shadow: 0 8px 25px rgba(0, 255, 135, 0.35),
              0 0 12px rgba(0, 255, 135, 0.2) !important;
}

.social-link:hover .social-icon {
  fill: #00FF87 !important;
  transform: scale(1.15) rotate(-3deg) !important;
}