/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
  scroll-behavior: smooth;
}

:root {
  --background: rgb(0, 0, 0);
  --second-background: #fff9e9;
}

body {
  min-height: 100vh;
  background: var(--background);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}


/* Hide/show nav smoothly when user scrolls */
.nav-hidden {
  transform: translateY(-120%);
  transition: transform 260ms cubic-bezier(.2,.9,.2,1);
  pointer-events: none; /* avoid accidental clicks when hidden */
  opacity: 0;
}

/* When visible, ensure transform is reset and interactive */
nav:not(.nav-hidden) {
  transform: translateY(0);
  transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
  pointer-events: auto;
  opacity: 1;
}
/* Page container styles */
.page {
  width: 100%;
  height: 100%vh;
  background-color: #000000;
  position: relative; /* allow absolute centering of hero title */
}



.box {
    width: 200px;
    height: 200px;
    background-color: #67c2ff;
    margin: 20px auto;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Navigation styles */
nav{
    font-family: "modak", cursive;
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1em 15%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(15,15,15,0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
}
.links {
  margin: 0 auto;
  /* use a CSS variable so the nav gap is easy to tweak */
  --nav-gap: 2.25rem; /* increase this value to make items further apart */
  display: flex;
  gap: var(--nav-gap);
  align-items: center;
}

/* Hide the menu icon on larger screens so it doesn't affect centering */
#menu {
  display: none;
}

/* Show menu icon on small screens and make nav responsive */
@media (max-width: 800px) {
  #menu { display: block; }
  nav { padding: 1em; }
  .links { display: none; }
}

/* Small adjustments for menu toggle button */
.menu-toggle {
  background: transparent;
  border: none;
  color: var(--second-background);
  font-size: 1.6rem;
  display: none; /* shown only on small screens via media query */
  cursor: pointer;
}
.menu-toggle:focus { outline: 3px solid rgba(154,235,163,0.14); outline-offset: 3px }

@media (max-width: 800px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* When the nav has .menu-open, show the stacked links and lock body scroll */
nav.menu-open .links { display: flex; }
body.menu-open { overflow: hidden; }

/* Mobile menu open state: show links as a stacked panel */
nav.menu-open .links {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.92);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1100;
}

#menu { cursor: pointer; }

nav ul a:hover{
  opacity: 1;
}

.links a{
  color: var(--second-background);
  opacity: 0.8;
  transition: 0.2s ease-in-out;
}

.logo{
  font-size: 2em;
  color: #9AEBA3;
  transition: 0.2s ease-in-out;
}
.logo:hover{
  opacity: 1;
}

/* Nav button (Contact Me) */
.nav-btn {
    font-family: "modak", cursive;
  background: #9AEBA3;
  border: none;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(91, 161, 255, 0.22);
}

.nav-btn:focus {
  outline: 3px solid rgba(102, 164, 255, 0.28);
  outline-offset: 2px;
}

/* legacy .main-nav was used previously; nav spacing is now controlled via .links and --nav-gap */
.main-nav { display: none; }

.main-nav a {
  color: var(--second-background);
  font-size: 1.25rem;
  font-family: 'Modak', cursive;
  text-decoration: none;
  line-height: 1.75rem;
}

/* Hero Section Styles --------------------------------------------*/
.hero-section {
    width: 100%;
    height: 100vh;
    position: relative;
    background: black;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
  position: absolute;
  width: 100%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--second-background);
  font-family: 'Modak', cursive;
  font-size: clamp(13rem, 24vw, 25rem); /* responsive */
  line-height: 1;
  pointer-events: none; /* decorative */
  margin: 0;
}

#hero-img {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 210px;
}

#hero-img img {
  /* responsive hero image: scales between 160px and 400px depending on viewport */
  width: 100%;
  max-width: clamp(250px, 28vw, 400px);
  height: auto;
}

/* Spin container: positioned so half of it sits outside the left edge of the viewport
   and the visible half overlaps the hero image. Placed inside the #Home .page
   which already has position:relative. */
.spin-container1 {
  position: absolute;
  left: 0; /* align to left edge of the page */
  top: 250px;
  transform: translate(-50%, -50%); /* move half its width offscreen to the left */
  width: clamp(160px, 16vw, 260px); /* responsive size */
  height: auto;
  z-index: 750; /* sit above hero graphics but below nav */
  pointer-events: none; /* decorative only; let clicks pass through */
  display: flex;
  align-items: center;
  justify-content: center;
}

.spin-container2{
  position: absolute;
  right: 0; /* align to left edge of the page */
  top: 500px;
  transform: translate(50%, 50%); /* move half its width offscreen to the left */
  width: clamp(160px, 16vw, 260px); /* responsive size */
  height: auto;
  pointer-events: none; /* decorative only; let clicks pass through */
  display: flex;
  align-items: center;
  justify-content: center;
}

#spinImage {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: 50% 50%; /* ensures proper rotation center */
}

/* Hero section mobile styles */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(8rem, 20vw, 13rem);
  }
  
  #hero-img {
    padding-top: 150px;
  }
  
  #hero-img img {
    max-width: clamp(200px, 35vw, 300px);
  }
  
  .spin-container1 {
    top: 180px;
    width: clamp(120px, 18vw, 180px);
  }
  
  .spin-container2 {
    top: 380px;
    width: clamp(120px, 18vw, 180px);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(5rem, 28vw, 8rem);
  }
  
  #hero-img {
    padding-top: 120px;
  }
  
  #hero-img img {
    max-width: clamp(220px, 300vw, 180px);
  }
  
  .spin-container1 {
    top: 140px;
    width: clamp(100px, 20vw, 140px);
  }
  
  .spin-container2 {
    top: 300px;
    width: clamp(80px, 20vw, 140px);
  }
}

/* Custom cursor styles */
/* Only apply on fine pointers (mouse); keep native cursor on touch devices */
@media (pointer: fine) {
  html, body {
    cursor: none; /* hide native cursor */
  }

  .custom-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: normal;
  }

  .cursor-dot {
    width: 8px;
    height: 8px;
    background: #111;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.12s ease, height 0.12s ease, background 0.12s ease;
    will-change: transform;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05) inset;
  }

  .cursor-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #9AEBA3;
    position: absolute;
    left: 0;
    top: 0;
    transition: transform 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
    opacity: 0.95;
    will-change: transform, opacity;
  }

  /* Enlarge ring on hoverable elements (scaling is visual only) */
  .custom-cursor.hover .cursor-ring {
    transform: scale(1.6);
    border-color: #fff9e9;
  }

  /* Active/click state */
  .custom-cursor.active .cursor-dot {
    transform: scale(0.6);
    background: #9AEBA3;
  }
}

/* For touch devices keep the default cursor */
@media (pointer: coarse), (hover: none) {
  .custom-cursor { display: none; }
}

/* Cursor ripple (polish) */
.cursor-ripple {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  background: rgba(154,235,163,0.18);
  mix-blend-mode: normal;
}

/* Focus-visible improvements for keyboard users */
a:focus-visible, button:focus-visible, .tech-card:focus-visible, .menu-toggle:focus-visible {
  outline: 3px solid #9AEBA3;
  outline-offset: 3px;
  border-radius: 6px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .custom-cursor, .cursor-dot, .cursor-ring, .cursor-ripple { transition: none !important; }
  .cursor-ring { opacity: 0.9; }
}





/* Running banner styles ---------------------------------------------------------------*/
.running-banner {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(10,10,10,0.6));
  z-index: 20;
}

.banner-line {
  display: flex;
  gap: var(--banner-gap, 2rem);
  align-items: center;
  white-space: nowrap;
  will-change: transform;
}

/* Make each banner item equal width so gaps are visually consistent */
.banner-line .item,
.banner-line .logo-item {
  --banner-item-width: 12rem; /* change this to increase/decrease spacing */
  flex: 0 0 var(--banner-item-width);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Modak', cursive;
  color: var(--second-background);
  padding: 0.25rem 0.5rem;
  font-size: 50px;
}

.banner-line.line1 { padding: 1rem 0; }

.banner-line.line2 { 
  padding: 0.5rem 0; 
  opacity: 0.95; 
}

/* Slight visual differences for logos */
.banner-line .logo-item {
  font-size: 5rem;
  color: #9AEBA3;
}

/* Make lines wide so they can scroll smoothly */
.banner-line .item, .banner-line .logo-item { min-width: 10rem; text-align: center; }

/* Running banner mobile styles */
@media (max-width: 768px) {
  .running-banner {
    padding: 1.5rem 0;
  }
  
  .banner-line .item,
  .banner-line .logo-item {
    --banner-item-width: 8rem;
    font-size: 2.5rem;
    padding: 0.2rem 0.4rem;
  }
  
  .banner-line .logo-item {
    font-size: 3rem;
  }
  
  .banner-line.line1 { 
    padding: 0.75rem 0; 
  }
  
  .banner-line.line2 { 
    padding: 0.4rem 0; 
  }
}

@media (max-width: 480px) {
  .running-banner {
    padding: 1rem 0;
  }
  
  .banner-line .item,
  .banner-line .logo-item {
    --banner-item-width: 6rem;
    font-size: 2rem;
    padding: 0.15rem 0.3rem;
    min-width: 6rem;
  }
  
  .banner-line .logo-item {
    font-size: 2.5rem;
  }
  
  .banner-line.line1 { 
    padding: 0.5rem 0; 
  }
  
  .banner-line.line2 { 
    padding: 0.3rem 0; 
  }
}

/* About me style -----------------------------------------------------------------------*/
#About {
  display: flex;
  gap: 4.5rem;
  align-items: center;
  justify-content: space-between;
  background-color: var(--second-background);
  padding: 8rem 15%;
  box-sizing: border-box;
  flex-wrap: wrap;
  position: relative; /* For absolute SVG positioning */
}

.about-left {
  flex: 1 1 560px;
  min-width: 260px;
  margin: 0;
  padding: 1rem 0;
  position: relative;
  z-index: 1; /* Above SVG background */
}

.about-left h1 { 
  font-family: 'Modak', 'Montserrat', sans-serif;
  /* clamp(min, preferred, max) */
  font-size: clamp(6rem, 6vw, 4.2rem);
  margin: 0 0 1rem 0;
  line-height: 0.9;
  color: #081018;
  -webkit-text-stroke: 0;
  text-shadow: none;
  font-weight: 400;
}

.about-left span {
  /* keep the green fill but add a thin dark stroke */
  color: #9AEBA3;
  -webkit-text-stroke: 2.5px #000000;
}

.about-left .about-bold { 
  font-size:1.6rem; 
  font-weight:600; 
  margin-bottom:1rem; 
  font-family: 'Montserrat', sans-serif;
  color: #9AEBA3;
}

.about-left p {
  display: block;
  max-width: 700px;
  width: 100%;
  font-size: 1.3rem;
  line-height: 1.4;
  color: #000000;
  font-family: 'Montserrat', sans-serif;
  margin: 1.5rem 0 2.5rem 0;
  text-align: justify;
  text-align-last: left;
}

.about-actions { 
  display:flex; 
  gap:1rem; 
  align-items:center 
}
.btn { display:inline-block; 
  padding:.6rem 1rem; 
  border-radius:999px; 
  text-decoration:none; 
  font-weight:600 
}
.contact-btn {
  font-family:  "modak", cursive;
  background: #9AEBA3;
  color: #000000;
  border-radius: 999px; /* pill-shaped */
  padding: .6rem 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
}

.contact-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.03) saturate(1.06);
  background: linear-gradient(90deg, #9AEBA3, #7FE79A);
}
.contact-btn:focus { outline: 3px solid rgba(102,164,255,0.28); outline-offset: 2px; }

.resume-btn {
  font-family:  "modak", cursive;
  background: #000000;
  color: #9AEBA3;
  border-radius: 999px; /* pill-shaped */
  padding: .6rem 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
}
.resume-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.05) saturate(1.08);
  /* dark button gains a slight sheen on hover */
  background: linear-gradient(90deg, #000000, #1a1a1a);
}
.resume-btn:focus { outline: 3px solid rgba(154,235,163,0.18); outline-offset: 2px; }

/* legacy breakpoint removed; responsive rules are handled by the 900px and 520px media queries above */


.about-right {
  /* container that sizes to the image so the decorative box can stack beneath */
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 1rem 0;
  position: relative; /* containing block for absolute background box */
  box-sizing: border-box;
  z-index: 1; /* Above SVG background */
}

.about-photo {
  width: 100%;
  /* constrain the image so it doesn't dominate smaller screens */
  max-width: clamp(220px, 35vw, 420px);
  height: auto;
  display: flex;
  border-radius: 10px;
  position: relative;
  z-index: 2; /* sit above the decorative background box */
  object-fit: cover;
}

/* SVG Motion Path Styles */
#svg-stage {
  position: absolute;
  top: -25%; /* Move up by adjusting negative top value */
  left: -35%; /* Extend beyond the left edge */
  width: 100%; /* Wider to compensate for left shift */
  height: 100%;
  max-width: none; /* Remove max-width to allow full width */
  overflow: visible;
  pointer-events: none;
  z-index: 0; /* Behind all content */
}

.theLine {
  stroke: #000000; /* slate-950 equivalent */
  stroke-width: 30px;
  stroke-linecap: round;
}

.ball {
  fill: #000000; /* Match your theme color */
  opacity: 0; /* Start invisible, GSAP will animate autoAlpha */
}

/* background-box removed */

/* Horizontal scrolling styles ---------------------------------------------------------*/
.horizontal-container {
    height: 100vh;
    overflow: hidden;
    background: #000000;
}

.horizontal-sections {
    display: flex;
    width: 500%; /* Adjust based on number of sections */
    height: 100%;
}

.horizontal-section {
    width: 20%; /* 100% / number of sections */
    min-width: 100vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    background: #000000;
    border-right: 2px solid #444;
    flex-shrink: 0;
}

/* Project slide/card styles -----------------------------------------------------------------------*/
.horizontal-section.project {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  box-sizing: border-box;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius: 0;
  padding: 4rem 15rem;
  color: var(--second-background);
  box-sizing: border-box;
  margin: 0;
  flex-shrink: 0;
  overflow: hidden;
  justify-content: center;
}

.project-left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.project-number {
  font-family: 'Modak', cursive;
  font-size: 2rem;
  color: #9AEBA3;
  line-height: 1;
  margin-bottom: 0;
}

.project-title {
  font-size: 1.6rem;
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
}

.project-video-tech-container {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.project-video {
  flex: 1;
  max-width: 600px;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.project-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

.project-actions { 
  display: flex; 
  gap: 1rem; 
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.project-actions .btn { 
  padding: 0.65rem 1.3rem; 
  border-radius: 8px; 
  font-size: 0.95rem;
  font-weight: 500;
}
.project-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Play overlay on lazy videos */
.project-video { position: relative; }
.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.45);
  color: var(--second-background);
  border: none;
  padding: 0.6rem 0.8rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-icon { font-size: 1.15rem; }

/* Tech tags appear like small buttons */
.tech-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.6rem;
  justify-content: flex-start;
  align-items: stretch;
}

/* Flip Card Structure */
.tech-card {
  width: 100%;
  min-width: 140px;
  max-width: 180px;
  height: 45px;
  perspective: 1000px;
  cursor: pointer;
}

.tech-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.tech-card:hover .tech-card-inner {
  transform: rotateY(180deg);
}

.tech-card-front,
.tech-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 0.75rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.tech-card-front {
  background: rgba(255,255,255,0.03);
  color: #cfead3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tech-card-back {
  background: linear-gradient(135deg, rgba(154,235,163,0.15), rgba(127,231,154,0.15));
  color: #9AEBA3;
  transform: rotateY(180deg);
  border: 1px solid rgba(154,235,163,0.2);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(154,235,163,0.1);
}

.tech-card:focus-visible {
  outline: 3px solid rgba(154,235,163,0.4);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Remove old tech-tag styles */


@media (max-width: 900px) {
  #About { 
    flex-direction: column; 
    align-items: flex-start; 
    padding: 2.5rem 4%; 
  }
  .about-right { 
    order: -1; 
    width: 100%; 
    flex-basis: 100%; 
    margin-bottom: 1rem; 
    min-height: auto; 
  }
  .about-left { 
    flex-basis: 100%; 
  }
  .about-left h1 {
    font-size: clamp(3rem, 10vw, 5rem);
  }
  .about-left .about-bold {
    font-size: 1.3rem;
  }
  .about-left p {
    font-size: 1.1rem;
  }
  /* tighten the max-width on medium screens */
  .about-photo { 
    max-width: clamp(180px, 45vw, 360px); 
  }
  /* decorative box removed */
}

@media (max-width: 520px) {
  #About { 
    padding: 2rem 4%; 
  }
  .about-left h1 {
    font-size: clamp(2.8rem, 15vw, 3.5rem);
  }
  .about-left .about-bold {
    font-size: 1rem;
  }
  .about-left p {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  .about-actions {
    flex-wrap: wrap;
  }
  .contact-btn,
  .resume-btn {
    padding: 0.5rem 1rem;
  }
  /* ensure the photo remains proportionate on small phones */
  .about-photo { 
    max-width: clamp(140px, 60vw, 320px); 
  }
}

.demo-btn { 
  background: #9AEBA3; 
  color: #081018;
  transition: all 0.3s ease;
}
.demo-btn:hover {
  background: #7FE79A;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(154,235,163,0.3);
}
.repo-btn { 
  background: transparent; 
  color: #9AEBA3; 
  border: 1px solid rgba(154,235,163,0.3);
  transition: all 0.3s ease;
}
.repo-btn:hover {
  background: rgba(154,235,163,0.1);
  border-color: #9AEBA3;
}

.project-tech {
  flex: 0 0 auto;
  width: auto;
  min-width: 180px;
  max-width: 220px;
  border-left: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  align-self: flex-start;
}
.project-tech h4 { 
  margin: 0 0 0.5rem 0; 
  font-size: 1.1rem;
  color: #9AEBA3;
  font-weight: 600;
}
.project-tech ul { 
  margin: 0; 
  padding: 0; 
  list-style: none; 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem;
}
.project-tech li { 
  font-size: 1rem; 
  color: #cfead3;
}

@media (max-width: 900px) {
  .project-card { 
    flex-direction: column; 
    width: 95%; 
    height: 100%;
    padding: 2rem 2rem;
  }
  .project-video-tech-container {
    flex-direction: column;
    gap: 0.1rem;
  }
  .project-video {
    max-width: 100%;
  }
  .project-tech { 
    width: 100%; 
    max-width: 100%;
    flex-basis: auto; 
    border-left: none; 
    padding-left: 0; 
    border-top: 1px solid rgba(255,255,255,0.04); 
    padding-top: 1rem;
  }
  .tech-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tech-card {
    min-width: 110px;
    max-width: 150px;
  }
  .project-number { font-size: 1.6rem }
  .project-title { font-size: 1.4rem; }
  .project-left { flex: none; }
  .project-desc { font-size: 0.9rem; }
}

@media (max-width: 640px) {
  .project-card { 
    padding: 2rem 1.25rem;
  }
  .project-number { font-size: 1.4rem; }
  .project-title { font-size: 1.25rem; }
  .project-desc { font-size: 0.85rem; line-height: 1.5; }
  .project-actions .btn { 
    padding: 0.55rem 1.1rem; 
    font-size: 0.9rem;
  }
  .tech-card {
    min-width: 100px;
    max-width: 130px;
    height: 40px;
  }
  .tech-card-front,
  .tech-card-back {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .project-card { 
    padding: 1rem 1rem;
    gap: 0.5rem;
  }
  .project-left {
    gap: 1rem;
  }
  .project-number { font-size: 1.2rem; }
  .project-title { font-size: 1.1rem; }
  .project-desc { font-size: 0.5rem; }
  .project-actions { 
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
  }
  .project-actions .btn { 
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    text-align: center;
    font-size: 0.6rem;
  }
  .tech-list {
    gap: 0.1rem;
  }
  .tech-card {
    min-width: 50px;
    max-width: 90px;
    height: 32px;
  }
  .tech-card-front,
  .tech-card-back {
    font-size: 0.5em;
    padding: 0 0.5rem;
  }
}

.horizontal-section h2 {
    margin-bottom: 30px;
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Projects header (precedes horizontal projects) */
.projects-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(160px, 25vh, 220px);
  background: #000000;
}
.projects-title-wrap { text-align: center; }
.projects-title { 
  font-family: "Modak", cursive;
  font-weight: 400;
  font-size: clamp(3rem, 6vw, 4.2rem);
  margin: 0;
  color: var(--second-background);
}
.projects-subtitle { opacity: 0.9; margin-top: 0.4rem; color: #cfead3; }

/* Contact section styles --------------------------------------------------------------------------- */
.contact {
  background: #F6EFDD;
  color: #081018;
  min-height: 100vh; /* full viewport */
  display: flex;
  align-items: center;
  justify-content: center;
}
/* make .contact a containing block so absolutely positioned grid is relative to it */
.contact { position: relative; }
.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  padding: 2.5rem 6%;
  z-index: 3;
}
.contact-left h1 { font-family: 'Modak', cursive; font-weight: 400; font-size: clamp(3.2rem, 9vw, 6rem); line-height: 0.92; margin: 0; color: #081018; }
.contact-right { flex: 0 0 540px; display: flex; justify-content: center; }
.contact-card { background: #000; color: var(--second-background); padding: 3rem; border-radius: 20px; width: min(540px, 100%);height: auto; box-shadow: 0 18px 40px rgba(0,0,0,0.25); }
.contact-card p { margin: 0 0 1rem 0; font-size: 1.05rem; }
.contact-card a { color: var(--second-background); text-decoration: underline; }

@media (max-width: 900px) {
  .contact-inner { 
    flex-direction: column; 
    align-items: center; 
    padding: 2rem 4%; 
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .contact-left { 
    width: 100%; 
    display: block; 
  }
  .contact-left h1 { 
    font-size: clamp(2.5rem, 8vw, 4rem); 
    margin-bottom: 1rem;
  }
  .contact-right { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    margin-top: 1rem;
  }
  .contact-card { 
    width: min(520px, 95%); 
    padding: 2rem; 
    border-radius: 14px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .contact-card p {
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .contact { 
    min-height: auto; 
    padding: 1.5rem 0; 
  }
  .contact-inner { 
    height: auto;
    gap: 0.75rem; 
    padding: 0.75rem 3%;
    display: flex;
    flex-direction: column;
    justify-content: center;

  }
  .contact-left h1 { 
    font-size: clamp(2rem, 20vw, 4rem); 
    margin-bottom: 0.75rem;
  }
  .contact-right { 
    margin-top: 1rem; 
  }
  .contact-card { 
    width: 100%; 
    height: 40%;
    max-width: 400px; 
    padding: 1.5rem; 
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .contact-card p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 420px) {
  .contact { 
    min-height: auto; 
    padding: 1rem 0; 
  }
  .contact-inner { 
    height: auto;
    gap: 0.75rem; 
    padding: 0.75rem 3%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .contact-left h1 { 
    font-size: clamp(2rem, 20vw, 4rem); 
  }

  .contact-card { 
    padding: 1.25rem; 
    max-width: 340px; 
    width: 100%;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .contact-card p { 
    font-size: 0.9rem; 
    margin-bottom: 0.65rem;
    text-align: center;
  }
}

/* Footer styles */
.site-footer { background: #000000; color: #F6EFDD; padding: 3.5rem 16%; }
.footer-inner { max-width: 1200px; margin: auto; display: flex; gap: 6rem; align-items: center; justify-content: space-between; }
.footer-left { display: flex; flex-direction: column; gap: 1.25rem; min-width: 220px;}
.footer-item { display: flex; align-items: center; gap: 0.8rem; font-size: 1rem; }
.footer-item i { font-size: 1.15rem; color: #F6EFDD;}
.footer-item a { color: inherit; text-decoration: none; }
.footer-right { max-width: 760px; }
.footer-right h4 { margin: 0 0 0.6rem 0; font-size: 1.05rem; }
.footer-right p { margin: 0 0 1rem 0; line-height: 1.5; }
.footer-socials { display: flex; gap: 1rem;}
.social-link { display: inline-flex; align-items: center; justify-content: center; background: #000; color: var(--second-background); text-decoration: none; }
.social-link i { font-size: 2rem; color: var(--second-background);}

@media (max-width: 820px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-left { flex-direction: row; gap: 1rem; }
  .footer-right { margin-top: 1rem; }
}

/* Hide the about photo entirely on small screens to save space/bandwidth */
@media (max-width: 640px) {
  .about-photo {
    display: none;
  }
  .site-footer {
    padding: 2.5rem 6%;
  }
  .footer-inner {
    gap: 3rem;
  }
  .footer-right h4 {
    font-size: 1rem;
  }
  .footer-right p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  .social-link i {
    font-size: 1.75rem;
  }
}

@media (max-width: 520px) {
  .site-footer {
    padding: 2rem 5%;
  }
  .footer-inner {
    gap: 2rem;
  }
  .footer-left {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  .footer-item {
    font-size: 0.95rem;
  }
  .footer-item i {
    font-size: 1rem;
  }
  .footer-right {
    width: 100%;
  }
  .footer-right h4 {
    font-size: 0.95rem;
  }
  .footer-right p {
    font-size: 0.9rem;
  }
  .footer-socials {
    gap: 0.75rem;
  }
  .social-link i {
    font-size: 1.6rem;
  }
}

@media (max-width: 420px) {
  .site-footer {
    padding: 1.5rem 10%;
  }
  .footer-inner {
    gap: 1.5rem;
  }
  .footer-item {
    font-size: 0.85rem;
  }
  .footer-right h4 {
    font-size: 0.9rem;
  }
  .footer-right p {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .social-link i {
    font-size: 1.5rem;
  }
}

/*SVG Path styles for animated SVGs -----------------------------------------------------*/
svg {
  overflow: visible;
  height: 100%;
  
  /* Fix Safari rendering bug */
  transform: translateZ(0);
}

path {
  stroke-width: 2;
  stroke: gray;
}



/* Physics grid -----------------------------------------------------------------------*/

.physics-grid { 
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto; 
  z-index: 1;
  overflow: hidden;
}

.grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  grid-auto-rows: 80px;
  gap: 12px;
  padding: 20px;
  align-items: center;
  justify-items: center;
}

.cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}

.cell::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(0,0,0,0.85);
  opacity: 0.95;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    grid-auto-rows: 60px;
    gap: 10px;
    padding: 15px;
  }
  
  .cell::before {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    grid-auto-rows: 45px;
    gap: 8px;
    padding: 10px;
  }
  
  .cell::before {
    width: 8px;
    height: 8px;
  }
}

/* ensure contact content sits above the decorative grid */
.contact-inner { position: relative; z-index: 2; }

/* Click prompt shown in contact section to invite interaction */
.click-prompt {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: var(--second-background);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.2,.9,.2,1), transform 220ms ease;
}
.click-prompt.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Small tooltip that can follow the cursor to reinforce clicking */
.cursor-prompt {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -150%);
  background: rgba(154,235,163,0.95);
  color: #081018;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 10001;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}
.cursor-prompt.visible { opacity: 1; }



