/* ------------------------------
   Reset & base styles
--------------------------------*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges; 
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}


:root {
  --primary-color: #2f4a68;
  --accent-color: #d5eae7;
  --overlay-color: rgba(30, 171, 214, 0.6);
  --highlight-color: #24b1d4;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background-color: var(--accent-color);
  color: var(--primary-color);
  line-height: 1.6;
}

body {
  cursor: url(assets/cursor.png) 8 8, auto;
}
a, button, nav a {
  cursor: url(assets/cursor-highlight.png) 8 8, pointer;
}

#custom-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 32px;           /* actual image size */
  height: 32px;
  background: url('/assets/cursor.png') no-repeat center center;
  background-size: contain;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.15s ease-out;
  opacity: 1;
  image-rendering: pixelated; /* makes the image sharp when scaled */
  image-rendering: crisp-edges;
}

/* Smooth pulsing */
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(0.85); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Hover pulse */
.cursor-hover:not(.cursor-click) {
  animation: pulse 0.6s ease-in-out infinite;
}

/* Click */
.cursor-click {
  animation: none;
  transform: translate(-50%, -50%) scale(0.6);
}


/* ------------------------------
   Layout
--------------------------------*/
main {
  flex: 1;
  max-width: 900px;
  margin: 2rem auto;
  padding: 5rem 1rem 0; /* push down content so it clears the fixed header */
  width: 100%;
}


footer {
  background: var(--primary-color);
  color: var(--accent-color);
  text-align: center;
  padding: 1rem;
}

/* ------------------------------
   Links
--------------------------------*/
a {
  color: var(--highlight-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ------------------------------
   Header & Navigation
--------------------------------*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--primary-color);
  color: var(--accent-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 12px 15px rgba(0, 0, 0, 0.25);
}

h1 {
  font-size: 3rem;
}

h1, h2, h3, nav {
  font-family: 'Passero One', sans-serif;
}

nav a {
  margin-left: 1.4rem;
  font-weight: 500;
  font-size: 2.2rem;
  color: var(--accent-color);
}

nav a:hover {
  color: var(--highlight-color);
}

/* ------------------------------
   Main content
--------------------------------*/
section {
  margin-bottom: 3rem;
}

h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.8rem;
}

/* ------------------------------
   About section
--------------------------------*/
#about img {
  max-width: 180px;
  border-radius: 50%;
  display: block;
  margin-bottom: 1rem;
}

/* ------------------------------
   Projects section
--------------------------------*/
/* ------------------------------
   Projects grid
--------------------------------*/
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 250px); /* fixed width columns */
  gap: 1.5rem;
  padding: 2rem;

  justify-content: center; /* keeps grid centered */
  margin: 0 auto;
}



/* Make each project card a square */
.project-card {
  position: relative;
  aspect-ratio: 1 / 1;        /* keeps it square */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  text-decoration: none;
  color: inherit;
  background: #000;           /* fallback background */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}

/* Thumbnail images fill the square */
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.05);     /* zoom in on hover */
}

/* Overlay with title + description */
.project-card .overlay {
  position: absolute;
  inset: 0; /* shorthand for top/right/bottom/left: 0 */
  background: rgba(0,0,0,0.6);
  color: var(--accent-color);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  transition: opacity 0.3s ease;
}

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

.project-card h2 {
  color: var(--accent-color) !important;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 1rem;
  line-height: 1.4;
}

.project-section p {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

section > h2 {
  text-align: center;
  margin: 2rem 0 1.5rem;
  font-size: 2rem;
  color: #2f4a68;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: block;   /* makes it span the full width */
  width: 100%;
}



/* ------------------------------
   Landing page links
--------------------------------*/
.landing-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.landing-links a {
  background: var(--primary-color);
  color: var(--accent-color);
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  transition: background 0.3s;
}

.landing-links a:hover {
  background: var(--highlight-color);
}

/* ------------------------------
   Contact section
--------------------------------*/
ul {
  list-style-type: none;
}

ul li {
  margin-bottom: 0.5rem;
}

/* ------------------------------
   Responsive adjustments
--------------------------------*/
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 0.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .landing-links {
    flex-direction: column;
  }
}


/*-------------------
Click Sparks
--------------------*/
/* Spark particles */
/*-------------------
Click Sparks
--------------------*/
.spark {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    opacity: 1;
    transform-origin: center;
    
}

.debris-chunk {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    opacity: 1;
    transform-origin: center;
}

/* Project Pages */

.hero-image {
  display: flex;
  flex-direction: column;   /* Stack title above image */
  align-items: center;      /* Center horizontally */
  justify-content: center;  /* Center vertically if needed */
  text-align: center;
  margin: 2rem 0;           /* Some breathing room */
}

.hero-image h1 {
  margin-bottom: 1rem;      /* Space between title and image */
  font-size: 4rem;          /* Adjust as needed */
}

.hero-image img {
  height: 50vh;             /* 18% of viewport height */
  width: auto;              /* Keep aspect ratio */
  max-width: 90%;           /* Don’t overflow small screens */
  object-fit: contain;
}


.carousel-container {
    max-width: 800px;
    margin: 0 auto;
}

.carousel-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: block;   /* makes it span the full width */
    width: 100%;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.carousel-viewport {
    width: 680px; /* 3 items * 200px + 2 gaps * 20px + padding */
    overflow: hidden;
    position: relative;
}

.carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    padding: 0 240px; /* Center the first item */
}

.carousel-item {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    background: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    opacity: 0.6;
    transform: scale(0.9);
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.carousel-item:hover {
    transform: scale(1.05);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
}

.expanded-image {
    width: 500px;
    height: 500px;
    background: #000;
    border-radius: 12px;
    border: 3px solid #fff;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.close-btn:hover {
    background: #ddd;
}

/* Navigation arrows */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.prev-btn {
    left: -60px;
}

.next-btn {
    right: -60px;
}

.image-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}