@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../Font/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../Font/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../Font/IBMPlexMono-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../Font/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../../Font/IBMPlexMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mukta";
  src: url("../../Font/Mukta-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --yellow: #ffe600;
  --black: #000000;
  --off-white: #f4f4f0;
  --gray: #8a8a86;
  --border: rgba(244, 244, 240, 0.14);
  --content-width: 1120px;
}

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

html,
body {
  width: 100%;
  height: 100%;
  background: var(--black);
  color: var(--off-white);
  font-family: "IBM Plex Mono", monospace;
  overscroll-behavior: none;
}

/* Locked for the entire opening sequence -- the next task unhides #main-content
   and switches this over to normal document scroll after Bonjour. */
body.scene-locked {
  overflow: hidden;
  height: 100dvh;
}

.opening-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: var(--black);
  overflow: hidden;
  touch-action: none;
}

.opening-scene.has-custom-cursor,
.opening-scene.has-custom-cursor * {
  cursor: none;
}

#reveal-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.yellow-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--yellow);
  opacity: 0;
  pointer-events: none;
}

.yellow-bg.is-visible {
  opacity: 1;
}

.reveal-text {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--black);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: clamp(2.75rem, 6vw, 6rem);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}

.reveal-text.is-visible {
  opacity: 1;
}

.reveal-text.lang-hi {
  font-family: "Mukta", sans-serif;
  font-weight: 700;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 5;
}

.hint-line {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--off-white);
  opacity: 0.55;
  animation: hint-pulse 2.4s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.75; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-cue.is-visible {
  opacity: 0.8;
}

.scroll-cue .chevron {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  transform: rotate(45deg);
  animation: chevron-bounce 1.6s ease-in-out infinite;
  mix-blend-mode: difference;
  filter: invert(1);
}

@keyframes chevron-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

.cursor-roller {
  position: fixed;
  top: 0;
  left: 0;
  width: 92px;
  height: auto;
  pointer-events: none;
  z-index: 20;
  transform: translate3d(-50%, -50%, 0) rotate(-35deg);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor-roller.is-active {
  opacity: 1;
}

.cursor-roller img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

#main-content[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== Main site ==================== */

#main-content {
  background: var(--black);
  color: var(--off-white);
  font-weight: 300;
}

#main-content .section {
  padding: 8rem 1.5rem;
}

#main-content .section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

#main-content .section-heading {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-index {
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---- Nav ---- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  color: var(--off-white);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  color: var(--off-white);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding-bottom: 0.3rem;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  opacity: 1;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

/* ---- Hero ---- */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}

.eyebrow {
  color: var(--yellow);
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  color: var(--yellow);
}

.hero-sub {
  color: var(--gray);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 46ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--off-white);
}

.btn-ghost {
  background: transparent;
  color: var(--off-white);
  border-color: var(--border);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ---- About ---- */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-bio {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--off-white);
}

.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-content: flex-start;
}

.skills-list li {
  padding: 0.5em 1em;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--off-white);
}

/* ---- Projects ---- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
  border-color: var(--yellow);
  transform: translateY(-4px);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, rgba(255, 230, 0, 0.12), rgba(255, 230, 0, 0.02));
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.project-thumb span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--yellow);
  opacity: 0.6;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags span {
  font-size: 0.72rem;
  color: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25em 0.75em;
}

.project-link {
  color: var(--yellow);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.project-link:hover,
.project-link:focus-visible {
  border-bottom-color: var(--yellow);
}

/* ---- Contact ---- */

.contact-lead {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

.contact-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--gray);
}

.form-row input,
.form-row textarea {
  background: rgba(244, 244, 240, 0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75em 0.9em;
  color: var(--off-white);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

.contact-form .btn {
  align-self: flex-start;
}

.form-note {
  font-size: 0.75rem;
  color: var(--gray);
}

.contact-email {
  display: inline-block;
  color: var(--yellow);
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.contact-email:hover,
.contact-email:focus-visible {
  border-bottom-color: var(--yellow);
}

/* ---- Footer ---- */

.site-footer {
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--gray);
  font-size: 0.8rem;
}

/* ---- Reveal helper (initial state before GSAP/JS reveals it) ---- */

.reveal-up {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1;
  }
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
  #main-content .section {
    padding: 6rem 1.25rem;
  }

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

  .nav-links {
    gap: 1.25rem;
  }
}
