/* ============================
   Global Styles
============================ */
:root {
  --page-pad: clamp(12px, 3vmin, 32px);
  --content-max: 1200px;
  --img-max-w: 92vw;
  --img-max-h: 88vh;
  --radius: 16px;
  --bg-main: #0d0410;
  --text-color: #d786ee;
  --accent: rgb(18, 4, 20);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-color);
  font-family: 'Orbitron', 'Rajdhani', 'Exo 2', sans-serif;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d4ff00; /* The base color of the text */
  font-family: 'DIGITALCALIPER';
  
  /* ADD THESE LINES for the effect */
  text-shadow: 
    /* Inner Glow (lightest part, creating the 'core shine') */
    /*1px 1px 1px #ffffff, */
    /* Outer Glow (medium part, matching the text color) */
    0 0 1px #000000, 
    /* Darker "Shadow" (to simulate depth or a metallic edge) */
    3px 3px 3px rgba(254, 255, 203, 0.2); 
}

/* Intro */
#intro h1 {
  font-size: clamp(4rem, 10vw, 12rem);
  line-height: 1;
  font-weight: 900;
  text-align: center;
  /* keep spacing above as-is; remove the bottom margin so h2 sits directly below */
    margin-top: 0;
  margin-bottom: 0;
}

#intro h2 {
  /* subtitle directly under the title with no gap */
  margin: 0;
  line-height: 1;
  text-align: center;
  font-weight: 400;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
}

/* Override section centering for intro so h1 and h2 stack naturally
   (keeps the top spacing but removes vertical centering that created large gaps) */
#intro.section, #intro.section--intro {
  display: block;
  /*min-height: auto; /* don't force full viewport height here */
  padding-top: var(--page-pad);
  padding-bottom: 0;
  text-align: center; /* keep centered horizontally */
  min-height: 100vh; /* fills the entire visible screen height */
  overflow: hidden;  /* prevents anything from peeking out */

}
/* Section */
.section {
  padding: 2px;
  margin-top: 2px;
display: grid;
  place-items: center;
  min-height: 100vh;
}

/* Hero Images */
img.fit-window {
  display: block;
  max-width: 300px;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: var(--radius);
}

/* Framed hero */
.frame {
  width: min(var(--content-max), var(--img-max-w));
  height: var(--img-max-h);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 auto;
}

.frame>img.cover-window {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Navigation */
#site-nav {
  position: sticky;
  top: 0;
  background: rgba(30, 5, 43, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10;
}

#site-nav nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 12px var(--page-pad);
}

a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--accent);
}

/* About section */
.section--about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(12px, 3vmin, 32px);
  align-items: start; /* Keeping your previous top alignment */
  justify-items: start; /* Keeping your previous left alignment */
  max-width: min(var(--content-max), 96vw);
  /* This value should be equal to or slightly larger than your navbar's height */
  scroll-margin-top: 30px;
  padding-left: 50px; 
}

.section--about .about__text {
  max-width: 60ch;
}

.section--about .about__photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

@media (max-width: 900px) {
  .section--about {
    grid-template-columns: 1fr;
  }
}

/* ============================
   Illustrations Grid
============================ */
.section--illustrations {
  width: 100%;
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.section--illustrations h2 {
  margin-bottom: 2rem;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* Responsive Grid */
/* Justified / no-crop grid for illustrations and sketchbook */
.illustrations-grid {
  /* container becomes a simple block; JS will build rows inside */
  width: min(96vw, var(--content-max));
  margin: 0 auto;
}

.illustrations-grid .justified-row {
  display: flex;
  gap: 0; /* flush */
}

.illustrations-grid .justified-item {
  display: block;
  overflow: hidden;
  background-color: #120217;
}

.illustrations-grid .justified-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* preserve whole image */
}

/* Reduce vertical spacing around section title */
.section--illustrations h2,
.section--illustrations .illustrations-grid + h2 {
  margin-bottom: 0.75rem;
}

/* Responsive columns */
@media (max-width: 900px) {
  .illustrations-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 600px) {
  .illustrations-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

/* ============================
   Videos carousel styles
   (moved from sections/videos.html)
============================ */
.section--videos {
  padding: 2rem 1rem;
}

.section--videos .container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section--videos h2 {
  margin: 0 0 0.75rem 0;
  font-size: 5rem;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 400ms cubic-bezier(.22, .96, .36, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 0 0.5rem;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
  border-radius: 6px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.carousel-button {
  pointer-events: all;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.carousel-button svg {
  width: 18px;
  height: 18px;
}

.carousel-caption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #333;
  text-align: center;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 0.75rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  border: 0;
}

.carousel-dot.active {
  background: #333;
}

@media (min-width: 700px) {
  .carousel-slide {
    min-width: 50%;
  }
}

@media (max-width: 420px) {
  .section--videos {
    padding: 1.2rem 0.6rem;
  }

  .section--videos h2 {
    font-size: 1.25rem;
  }

  .carousel-button {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}

/* DIGITALCALIPER font for intro title */
@font-face {
  font-family: 'DIGITALCALIPER';
  src: url('../fonts/DIGITALCALIPER.woff2') format('woff2'),
    url('../fonts/DIGITALCALIPER.woff') format('woff'),
    url('../fonts/DIGITALCALIPER.ttf') format('truetype'),
    url('../fonts/DIGITALCALIPER.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Apply only to the intro hero title */
#intro .hero-title {
  font-family: 'DIGITALCALIPER', 'Orbitron', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  letter-spacing: 0.04em;
  margin-bottom: 0px;
}

.section--projects {
  gap: clamp(12px, 3vmin, 32px);
  
  /* This value should be equal to or slightly larger than your navbar's height */
  scroll-margin-top: 30px;
  /*font-size: 5rem;  */
  
  /* to allow the content to be centered by the base .section's place-items: center; */
}