/* ═══════════════════════════════════════════════
   ASHISH DIXIT PORTFOLIO — GLOBAL CSS
   /public/global.css — linked in every page
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Bebas+Neue&family=Instrument+Serif:ital@0;1&display=swap');

/* ── TOKENS ── */
:root {
  --bg: #101012;
  --surface: #161618;
  --s2: #1c1c1f;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.14);
  --red: #e82828;
  --red-dim: rgba(232, 40, 40, 0.12);
  --white: #f0f0f0;
  --grey1: #888890;
  --grey2: #555560;
  --mono: 'Space Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
  --serif: 'Instrument Serif', serif;
  --gu: 36px;
  --nav-w: 280px;
  --nav-col: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.8;
  overflow-x: hidden;
  cursor: none;
}

::-webkit-scrollbar {
  width: 2px;
}

::-webkit-scrollbar-thumb {
  background: var(--grey2);
}

/* ── CANVAS LAYERS ── */
#cursor-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

#bg {
  position: fixed;
  left: var(--nav-w);
  top: 0;
  width: calc(100vw - var(--nav-w));
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   NAV — 280px
═══════════════════════════════════════════════ */
nav {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--nav-w);
  background: rgba(10, 10, 12, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

#main-nav.is-open {
  transform: translateX(0) !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Nav Toggle Button */
.nav-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  background: rgba(10, 10, 12, 0.9);
  border: 1px solid var(--border);
  z-index: 300;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.nav-toggle:hover {
  border-color: var(--red);
}

.toggle-line {
  width: 20px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

.nav-toggle.active .toggle-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active .toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .toggle-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Logo header */
.nav-top {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
}

.nav-mark {
  width: 64px;
  height: 40px;
  min-width: 64px;
  border: 1px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  background: rgba(232, 40, 40, 0.05);
}

.nav-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.nav-name-main {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-name-sub {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--grey1);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Links */
.nav-links {
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  gap: 4px;
  flex: 1;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 46px;
  padding: 0 16px;
  text-decoration: none;
  color: var(--grey1);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  overflow: hidden;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--red-dim);
  border-left: 2px solid var(--red);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  position: relative;
  z-index: 1;
}

.nav-link.active .nav-label::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--red);
  border-radius: 50%;
  margin-left: 10px;
  vertical-align: middle;
}

/* Bottom */
.nav-bottom {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.nav-time {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--grey2);
  white-space: nowrap;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #3ddc84;
  border-radius: 50%;
  animation: blink 2.5s ease infinite;
  flex-shrink: 0;
}

.status-txt {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(61, 220, 132, 0.6);
  white-space: nowrap;
}

@keyframes blink {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.4);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(61, 220, 132, 0);
  }
}

/* Collapsed state (≤900px) */
nav.collapsed {
  width: var(--nav-col);
}

nav.collapsed .nav-name,
nav.collapsed .nav-label,
nav.collapsed .nav-time,
nav.collapsed .status-txt {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

nav.collapsed .nav-link {
  padding: 0;
  justify-content: center;
  gap: 0;
}

nav.collapsed .nav-top {
  padding: 0;
  justify-content: center;
}

nav.collapsed .nav-bottom {
  padding: 14px 0;
  align-items: center;
}

nav.collapsed .nav-status {
  justify-content: center;
}

/* ═══════════════════════════════════════════════
   HUD INFO BAR — top right
═══════════════════════════════════════════════ */
.hud-info {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 24px;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  pointer-events: none;
}

.hud-info-item {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-info-item .val {
  color: rgba(255, 255, 255, 0.5);
}

.hud-info-sep {
  width: 1px;
  height: 13px;
  background: var(--border2);
}

/* ═══════════════════════════════════════════════
   HUD CORNERS
═══════════════════════════════════════════════ */
.hud {
  position: fixed;
  z-index: 20;
  pointer-events: none;
}

.hud.tl {
  top: 18px;
  left: calc(var(--nav-w) + 18px);
}

.hud.bl {
  bottom: 18px;
  left: calc(var(--nav-w) + 18px);
}

.hud.br {
  bottom: 18px;
  right: 18px;
  text-align: right;
}

.hud-corner {
  width: 16px;
  height: 16px;
  opacity: 0.22;
}

.hud.tl .hud-corner {
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}

.hud.bl .hud-corner {
  border-bottom: 1px solid #fff;
  border-left: 1px solid #fff;
}

.hud.br .hud-corner {
  border-bottom: 1px solid #fff;
  border-right: 1px solid #fff;
  margin-left: auto;
}

.hud-txt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.18);
  margin-top: 6px;
}

.hud.br .hud-txt {
  margin-top: 0;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════════════ */
.page {
  margin-left: var(--nav-w);
  position: relative;
  z-index: 10;
  transition: margin-left 0.3s;
}

/* ═══════════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--red) 0%, var(--border) 55%, transparent 100%);
  position: relative;
  z-index: 10;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0 32px;
  cursor: none;
  border: none;
  clip-path: polygon(7px 0%, 100% 0%, calc(100% - 7px) 100%, 0% 100%);
  transition: all 0.2s;
  height: 46px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-red:hover {
  background: #ff3333;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--grey1);
  border: 1px solid var(--border2);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

/* Copy email confirm tooltip */
.btn-copy {
  position: relative;
}

.copy-confirm {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.15em;
  background: var(--red);
  color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.copy-confirm.show {
  opacity: 1;
}

/* ═══════════════════════════════════════════════
   CHIPS
═══════════════════════════════════════════════ */
.chip {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border2);
  color: var(--grey1);
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.03);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: all 0.2s;
  cursor: none;
}

.chip:hover {
  border-color: var(--red);
  color: var(--white);
  background: var(--red-dim);
}

/* ═══════════════════════════════════════════════
   SECTION LABELS
═══════════════════════════════════════════════ */
.section-tag {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey2);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-tag::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--red);
}

/* ═══════════════════════════════════════════════
   SECTION HEADINGS
═══════════════════════════════════════════════ */
.section-h2 {
  font-family: var(--display);
  font-size: clamp(3.5rem, 6vw, 6.5rem);
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.02em;
}

.section-h2 span {
  color: var(--grey2);
}

/* ═══════════════════════════════════════════════
   MARQUEE
═══════════════════════════════════════════════ */
.marquee-wrap {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  background: var(--surface);
}

.marquee-track {
  display: flex;
  gap: 52px;
  animation: marquee 22s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.marquee-track span {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  color: var(--grey2);
}

.marquee-track span.r {
  color: var(--red);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ═══════════════════════════════════════════════
   PROJECT CARDS
═══════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.proj-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: none;
  transition: border-color 0.25s;
  text-decoration: none;
  display: block;
}

.proj-card:hover {
  border-color: rgba(232, 40, 40, 0.45);
}

.proj-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent var(--red) transparent transparent;
  transition: border-width 0.2s ease;
}

.proj-card:hover::after {
  border-width: 0 30px 30px 0;
}

.proj-thumb {
  background: var(--s2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: calc(var(--gu) * 8);
}

.thumb-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: var(--gu) var(--gu);
}

.thumb-num {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 5rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.06);
  transition: color 0.25s;
}

.proj-card:hover .thumb-num {
  color: rgba(232, 40, 40, 0.15);
}

.proj-info {
  padding: calc(var(--gu) * 0.7) var(--gu);
  border-top: 1px solid var(--border);
}

.proj-meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey2);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
}

.proj-title {
  font-family: var(--display);
  font-size: 2.1rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  transition: color 0.2s;
}

.proj-card:hover .proj-title {
  color: var(--red);
}

.proj-date {
  font-size: 13px;
  color: var(--grey2);
  margin-top: 5px;
}

.proj-sub {
  font-size: 15px;
  line-height: 1.75;
  color: var(--grey2);
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════
   TESTIMONIALS
═══════════════════════════════════════════════ */
.testi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: calc(var(--gu) * 1.5);
}

.testi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: calc(var(--gu) * 1.2) calc(var(--gu) * 1.2);
  transition: border-color 0.25s;
}

.testi-card:hover {
  border-color: rgba(232, 40, 40, 0.3);
}

.testi-quote {
  font-size: 16px;
  line-height: 1.85;
  color: var(--grey1);
  font-style: italic;
  margin-bottom: calc(var(--gu));
  position: relative;
  padding-left: 20px;
}

.testi-quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--red);
  opacity: 0.5;
}

.testi-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testi-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--s2);
  border: 1px solid var(--border2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.testi-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.testi-role {
  font-size: 12px;
  color: var(--grey2);
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  padding: 24px calc(var(--gu) * 3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-txt {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--grey2);
  text-transform: uppercase;
}

.footer-v {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--red);
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root {
    --nav-w: 0px;
  }

  .nav-toggle {
    display: flex;
  }

  nav {
    width: 100%;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    border-right: none;
    padding-top: 80px;
    /* Push everything down below toggle */
  }

  .page {
    margin-left: 0;
  }

  #bg {
    left: 0;
    width: 100vw;
  }

  .nav-top {
    height: auto;
    padding: 20px 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .nav-links {
    padding: 20px 20px;
    gap: 8px;
  }

  .nav-link {
    height: 50px;
    font-size: 13px;
    /* Smaller intricate font */
    padding: 0 24px;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  .nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .nav-bottom {
    padding: 32px 40px;
  }

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

  .testi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .proj-card.wide {
    grid-column: span 2;
  }

  .hud.tl,
  .hud.bl {
    left: 20px;
  }

  .hud.tr,
  .hud.br {
    right: 20px;
  }

  .hud-info {
    padding: 8px 12px;
    gap: 10px;
  }

  .hud-info-sep {
    height: 10px;
  }

  .hud-info-item {
    font-size: 8px;
  }
}

@media (max-width: 600px) {
  .hero-h1 {
    font-size: 3.5rem !important;
  }

  .section-h2 {
    font-size: 2.8rem !important;
  }

  .hero-body {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .testi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .testi-card {
    padding: 16px;
  }

  .testi-quote {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  .testi-name {
    font-size: 11px !important;
  }

  .testi-role {
    font-size: 9px !important;
  }

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

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

  .proj-card.wide {
    grid-column: span 2;
  }

  .proj-info {
    padding: 16px;
  }

  .proj-title {
    font-size: 14px !important;
  }

  .proj-sub {
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin-top: 6px !important;
  }

  .hero,
  .work,
  .testimonials,
  .contact-cta-section {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #bg {
    left: 0 !important;
    width: 100vw !important;
  }

  #cursor-canvas {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }

  body * {
    cursor: auto !important;
  }

  body {
    font-size: 15px;
  }

  footer {
    padding: 20px 24px;
  }
}