/* ============================================================
   NINDUWARA — COWBOY STYLE ULTRA-CINEMATIC CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --black:   #060608;
  --off:     #0d0d11;
  --card:    #141418;
  --border:  rgba(255,255,255,0.12);
  --white:   #f0ede8;
  --muted:   #a0a0b5;  /* ↑ lifted for better contrast */
  --accent:  #6c63ff;
  --red:     #ff3c3c;
  --green:   #00e87a;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'Space Grotesk', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;
  font-size: 16px;   /* base minimum */
  line-height: 1.6;
}
body.loading { overflow: hidden; }
img { max-width: 100%; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; }

/* ── Noise Overlay ─────────────────────────────────────────── */
.noise-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Preloader ─────────────────────────────────────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
}
.preloader-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.preloader-name {
  display: flex; gap: 4px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  letter-spacing: 0.15em;
  color: var(--white);
}
.pre-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px);
}
.preloader-bar {
  width: 280px; height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 2px;
  transition: width 0.05s linear;
}
.preloader-count {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--muted);
  letter-spacing: 0.15em;
}

/* ── Custom Cursor ─────────────────────────────────────────── */
.cursor-ball {
  position: fixed; z-index: 9998;
  width: 50px; height: 50px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  display: flex; align-items: center; justify-content: center;
  mix-blend-mode: difference;
  transition: transform 0.35s var(--ease-out), width 0.35s, height 0.35s, background 0.3s;
  will-change: transform;
}
.cursor-ball.cursor-expanded {
  transform: translate(-50%, -50%) scale(1);
  width: 80px; height: 80px;
}
.cursor-ball.cursor-view {
  transform: translate(-50%, -50%) scale(1);
  background: var(--accent);
  mix-blend-mode: normal;
  width: 80px; height: 80px;
}
.cursor-text {
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor-ball.cursor-view .cursor-text { opacity: 1; }

.cursor-dot-small {
  position: fixed; z-index: 9999;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: difference;
  box-shadow: 0 0 6px 2px rgba(108, 99, 255, 0.6);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
/* Dot shrinks on click */
body:active .cursor-dot-small {
  width: 5px; height: 5px;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 24px 0;
  transition: padding 0.4s var(--ease-out), background 0.4s;
}
.navbar.scrolled {
  padding: 16px 0;
  background: rgba(6, 6, 8, 0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem; letter-spacing: 0.08em;
  display: flex; align-items: baseline;
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 0.7; }
.logo-red { color: var(--red); font-size: 2.2rem; line-height: 0.6; }

.nav-center-links {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 8px;
}
.nav-link {
  padding: 8px 20px;
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-radius: 100px;
  transition: all 0.3s;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-link.active { color: var(--white); background: rgba(255,255,255,0.1); }

.nav-cta {
  font-size: 0.82rem; font-weight: 600;
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 22px;
  transition: all 0.3s;
}
.nav-cta:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.hamburger { display: none; background: none; border: none; }
.ham-lines { display: flex; flex-direction: column; gap: 6px; }
.ham-lines span { display: block; width: 26px; height: 1.5px; background: var(--white); transition: 0.3s; }
.hamburger.open .ham-lines span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open .ham-lines span:nth-child(2) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 999;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(0% at calc(100% - 60px) 44px);
  transition: clip-path 0.7s var(--ease-out);
}
.mobile-menu.open { clip-path: circle(150% at calc(100% - 60px) 44px); }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.mob-link {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 6rem);
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.3s;
}
.mob-link:hover { color: var(--white); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-noise {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 60% 40%, rgba(108,99,255,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(255,60,60,0.06) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 3;
  max-width: 1400px; margin: 0 auto;
  padding: 160px 40px 60px;
  width: 100%;
}
.hero-tag-line {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(0,232,122,0.25);
  border-radius: 100px;
  padding: 8px 18px;
  margin-bottom: 40px;
  opacity: 0;
}
.tag-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,232,122,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0,232,122,0); }
}

.hero-big-text {
  overflow: hidden;
  margin-bottom: 36px;
}
.hbt-line {
  overflow: hidden;
  line-height: 0.9;
}
.hbt-mask {
  overflow: hidden;
}
.hbt-mask span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 14rem);
  letter-spacing: -0.02em;
  color: var(--white);
  transform: translateY(110%);
}

.hero-sub-row {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.hero-role-tag {
  display: flex; gap: 10px; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
}
.role-pill {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 1rem; font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}
.hero-desc {
  font-size: 1.1rem; color: var(--white); font-weight: 500;
  max-width: 360px;
  opacity: 0; transform: translateY(20px);
}

.hero-actions {
  display: flex; align-items: center; gap: 48px;
  flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
}
.cta-main {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--white);
  color: var(--black);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 18px 36px;
  border-radius: 100px;
  position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}
.cta-main::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  transition: transform 0.45s var(--ease-out);
  z-index: 0;
}
.cta-main:hover::before { transform: translateX(0); }
.cta-main:hover { transform: translateY(-3px); color: var(--white); }
.cta-label, .cta-arrow { position: relative; z-index: 1; }
.cta-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s;
}
.cta-main:hover .cta-arrow { transform: translateX(4px); }

.hero-stats-row {
  display: flex; align-items: center; gap: 32px;
}
.hstat { text-align: center; }
.hstat-n {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem; letter-spacing: 0.04em;
  color: var(--white); line-height: 1;
}
.hstat-l {
  font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  margin-top: 2px;
}
.hstat-sep { width: 1px; height: 44px; background: var(--border); }

.hero-scroll-line {
  position: absolute; bottom: 40px; right: 40px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0;
}
.scroll-track {
  width: 1.5px; height: 60px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.scroll-thumb {
  width: 100%; height: 30px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 2px;
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(-100%); opacity: 0; }
  30% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}
.hero-scroll-line span {
  font-size: 0.62rem; letter-spacing: 0.2em;
  color: var(--muted); writing-mode: vertical-rl;
  text-transform: uppercase;
}

/* Marquee */
.hero-marquee-wrap {
  position: relative; z-index: 3;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
  padding: 18px 0;
  opacity: 0;
}
.hero-marquee {
  display: inline-flex; gap: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  animation: marqueeScroll 28s linear infinite;
}
.footer-marquee {
  display: inline-flex; gap: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  animation: marqueeScroll 28s linear infinite;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Section Common ─────────────────────────────────────────── */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  display: block;
}

/* ── About ──────────────────────────────────────────────────── */
.about {
  padding: 140px 0;
  background: var(--off);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: 0.92; letter-spacing: -0.01em;
  margin-bottom: 48px;
}
.about-heading em { font-style: normal; color: var(--muted); }

/* Terminal */
.about-code-terminal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tb { width: 12px; height: 12px; border-radius: 50%; }
.tb-red    { background: #ff5f57; }
.tb-yellow { background: #febc2e; }
.tb-green  { background: #28c840; }
.tb-title  { margin-left: 8px; font-size: 0.72rem; color: var(--muted); }
.terminal-body { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.tl { display: flex; gap: 16px; line-height: 1.7; }
.tl-num { color: rgba(255,255,255,0.2); min-width: 16px; user-select: none; }
.t-kw  { color: #ff7b72; }
.t-fn  { color: #d2a8ff; }
.t-key { color: #79c0ff; }
.t-str { color: #a5d6ff; }
.cursor-blink { animation: cursorBlink 1s step-end infinite; }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.about-para-block { margin-bottom: 28px; }
.about-mini-head {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 10px;
}
.about-para { color: #e2e2e8; font-size: 1.1rem; line-height: 1.85; }

.skills-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 36px;
}
.skill-chip {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem; font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
  transition: all 0.3s;
}
.skill-chip:hover {
  border-color: var(--accent);
  color: var(--white);
  background: rgba(108,99,255,0.1);
  transform: translateY(-2px);
}
.about-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1rem;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding-bottom: 4px;
  transition: all 0.3s;
}
.about-cta span { font-size: 1.2rem; transition: transform 0.3s; }
.about-cta:hover { border-color: var(--accent); color: var(--accent); }
.about-cta:hover span { transform: translate(3px, -3px); }

/* ── Services ────────────────────────────────────────────────── */
.services {
  padding: 140px 0;
  max-width: 1400px; margin: 0 auto;
  padding-inline: 40px;
}
.services-header { margin-bottom: 72px; overflow: visible; }
.services-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 10rem);
  letter-spacing: -0.02em;
  line-height: 1.05;  /* ↑ prevent clip at top/bottom */
  overflow: visible;
  padding-bottom: 0.05em; /* prevents descender clip */
}
.services-list { border-top: 1px solid var(--border); }

.srv-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: padding 0.3s var(--ease-out);
  overflow: hidden;
}
.srv-item::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(108,99,255,0.04);
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out);
}
.srv-item:hover::before { transform: translateX(0); }
.srv-item:hover { padding-left: 16px; }

.srv-num {
  font-family: var(--font-display);
  font-size: 1.1rem; letter-spacing: 0.1em;
  color: var(--muted);
  position: relative; z-index: 1;
}
.srv-info { position: relative; z-index: 1; }
.srv-info h3 {
  font-size: 1.35rem; font-weight: 700;
  margin-bottom: 6px; letter-spacing: -0.3px;
  transition: color 0.3s;
}
.srv-item:hover .srv-info h3 { color: var(--accent); }
.srv-info p { color: var(--muted); font-size: 0.88rem; }
.srv-icon {
  font-size: 2rem;
  position: relative; z-index: 1;
  transition: transform 0.3s var(--ease-out);
}
.srv-item:hover .srv-icon { transform: rotate(-15deg) scale(1.15); }
.srv-line {
  position: absolute; bottom: 0; left: 0;
  height: 1px; width: 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 0.6s var(--ease-out);
}
.srv-item:hover .srv-line { width: 100%; }

/* ── Projects ────────────────────────────────────────────────── */
.projects {
  padding: 140px 0;
  background: var(--off);
  border-top: 1px solid var(--border);
}
.projects-header {
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px;
  margin-bottom: 72px;
}
.projects-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 10rem);
  letter-spacing: -0.02em;
  line-height: 1.05;  /* fixed: was 0.9 which clips descenders */
  overflow: visible;
  padding-bottom: 0.05em;
}
.projects-title em { font-style: normal; color: var(--muted); }

.projects-list {
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px;
  display: flex; flex-direction: column; gap: 140px; /* More breathing room */
}
.proj-item {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 100px; /* Increased gap between img and text */
  align-items: center;
  position: relative;   /* contain children */
  z-index: 0;
}
/* Reverse layout — use order instead of direction:rtl to avoid text bleeding over image */
.proj-item-reverse {
  grid-template-columns: 1fr 1.1fr;
}
.proj-item-reverse .proj-media { order: 2; }
.proj-item-reverse .proj-info  { order: 1; }
.proj-featured { position: relative; }

/* Project card glow border on hover */
.proj-item, .proj-item-reverse {
  border-radius: 20px;
  padding: 32px;
  border: 1px solid transparent;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.proj-item:hover, .proj-item-reverse:hover {
  border-color: rgba(108,99,255,0.25);
  box-shadow: 0 0 60px rgba(108,99,255,0.08), inset 0 0 40px rgba(108,99,255,0.04);
}
.proj-media {
  position: relative; overflow: hidden;
  border-radius: 16px;
  height: 340px;          /* fixed uniform height for all project boxes */
  width: 100%;
  background: var(--card);
}
.proj-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
  will-change: transform;
}
.proj-item:hover .proj-media img { transform: scale(1.06); }
.proj-media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(6,6,8,0.7) 0%, rgba(6,6,8,0.1) 60%, transparent 100%);
  transition: opacity 0.4s;
  opacity: 1; /* Always dark at bottom for readability */
  pointer-events: none;
}
.proj-item:hover .proj-media-overlay { opacity: 0.4; } /* Lighter on hover */
.proj-badge {
  position: absolute; top: 20px; left: 20px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px;
}

/* ── Image text overlay (e.g. Ninduwara Bus) ── */
.proj-img-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 24px 20px;
  background: linear-gradient(0deg, rgba(6,6,8,0.92) 0%, rgba(6,6,8,0.5) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.pil-route {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.pil-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
}
.pil-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
}

.proj-info {}
.proj-num {
  font-family: var(--font-mono);
  font-size: 0.75rem; color: var(--muted);
  letter-spacing: 0.1em; margin-bottom: 14px;
  display: block;
}
.proj-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.01em; line-height: 1;
  margin-bottom: 16px;
  transition: color 0.3s;
}
.proj-item:hover .proj-name { color: var(--accent); }
.proj-desc {
  color: #d8d8e6;
  font-size: 1.1rem;   /* minimum 16px+ */
  line-height: 1.8;
  margin-bottom: 24px;
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.proj-tags span {
  padding: 5px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  font-size: 0.72rem;
  color: #c0c0d5;   /* readable on dark */
  background: rgba(255,255,255,0.03);
}
/* Project Link — pill button with glow */
.proj-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--white);
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 11px 22px;
  position: relative; overflow: hidden;
  transition: color 0.35s, border-color 0.35s, box-shadow 0.35s, transform 0.3s;
}
.proj-link::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  border-radius: 100px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
  z-index: 0;
}
.proj-link:hover::before { transform: scaleX(1); }
.proj-link:hover {
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(108,99,255,0.45);
  transform: translateY(-2px);
}
.proj-link span, .proj-link .proj-arrow { position: relative; z-index: 1; }
.proj-arrow { font-size: 1rem; transition: transform 0.3s; }
.proj-link:hover .proj-arrow { transform: translate(4px, -4px); }

/* ── Contact ─────────────────────────────────────────────────── */
.contact {
  padding: 140px 0;
  background: var(--black);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
/* No ghost 'CONTACT' text — removed for clarity */

.contact-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
  align-items: start;
  position: relative; z-index: 1;
}
.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: 1.0; letter-spacing: -0.01em;
  margin-bottom: 48px;
  overflow: visible;
}
.contact-heading em { font-style: normal; color: var(--muted); }

.contact-cards { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.cc {
  display: flex; align-items: center; gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: all 0.3s var(--ease-out);
}
.cc:hover {
  border-color: rgba(108,99,255,0.4);
  transform: translateX(8px);
  box-shadow: 0 0 30px rgba(108,99,255,0.12);
}
.cc-icon { font-size: 1.8rem; }
.cc-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 4px;
}
.cc-val { font-size: 0.95rem; font-weight: 600; }
.avail-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(0,232,122,0.25);
  border-radius: 100px;
  background: rgba(0,232,122,0.06);
  color: var(--green);
  font-size: 0.82rem; font-weight: 600;
}
.avail-dot {
  width: 8px; height: 8px;
  background: var(--green); border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ── WhatsApp Card ───────────────────────────────────────── */
.cc-whatsapp {
  border-color: rgba(37, 211, 102, 0.3) !important;
  background: rgba(37, 211, 102, 0.05) !important;
  position: relative;
}
.cc-whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.7) !important;
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.2) !important;
  transform: translateX(8px) !important;
}
.cc-live {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #25d366;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 100px;
  padding: 4px 10px;
  animation: liveGlow 2s ease-in-out infinite;
}
@keyframes liveGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.3); }
  50%       { box-shadow: 0 0 10px 3px rgba(37, 211, 102, 0.15); }
}

/* ── Floating WhatsApp Button ────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 5000;
  width: 60px; height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  animation: waEntry 0.8s var(--ease-out) 2s both;
}
@keyframes waEntry {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}
.wa-float:hover {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.6);
}
.wa-float:hover .wa-tooltip { opacity: 1; transform: translateX(-8px); }

/* Pulse ring */
.wa-pulse {
  position: absolute; inset: -4px;
  border: 2px solid rgba(37, 211, 102, 0.5);
  border-radius: 50%;
  animation: waPulse 2.5s ease-out infinite;
}
@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0;   }
}

/* Tooltip */
.wa-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%; transform: translateY(-50%) translateX(0);
  background: rgba(10, 10, 12, 0.95);
  color: var(--white);
  font-size: 0.78rem; font-weight: 600;
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.wa-tooltip::after {
  content: '';
  position: absolute; left: 100%; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(10,10,12,0.95);
}


/* Form */
.contact-form { display: flex; flex-direction: column; gap: 24px; }
/* Contact Form — clearly visible inputs */
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.cf-group { position: relative; }
.cf-group input,
.cf-group select,
.cf-group textarea {
  width: 100%;
  background: #1a1a22;   /* slightly lighter than page bg */
  border: 1.5px solid rgba(255,255,255,0.2);  /* visible border */
  border-radius: 12px;
  padding: 22px 20px 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  resize: none;
}
.cf-group input::placeholder,
.cf-group textarea::placeholder {
  color: rgba(255,255,255,0.5); /* Clearly visible placeholders */
}
.cf-group textarea { padding-top: 22px; }
.cf-group select { padding: 14px 20px; background: #1a1a22; }
.cf-group select option { background: #1a1a22; }
.cf-group input:focus,
.cf-group select:focus,
.cf-group textarea:focus {
  border-color: var(--accent);
  background: #1e1e2a;
  box-shadow: 0 0 0 4px rgba(108,99,255,0.18);
}
.cf-group input:hover:not(:focus),
.cf-group select:hover:not(:focus),
.cf-group textarea:hover:not(:focus) {
  border-color: rgba(255,255,255,0.32);
}
.cf-group label {
  position: absolute; top: 14px; left: 20px;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  transition: all 0.3s;
  pointer-events: none;
}
.cf-group input:not(:placeholder-shown) + label,
.cf-group input:focus + label,
.cf-group textarea:not(:placeholder-shown) + label,
.cf-group textarea:focus + label {
  top: 8px; font-size: 0.62rem;
  color: var(--accent);
}
.cf-submit {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  padding: 22px;
  background: var(--accent);
  color: #ffffff !important;  /* force white — overrides any inheritance */
  font-family: var(--font-body);
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(108,99,255,0.25);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  cursor: pointer;
  -webkit-appearance: none;
}
.cf-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(108,99,255,0.45);
}
.cf-submit-label {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.cf-submit-icon {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-size: 1.3rem;
  transition: transform 0.3s;
}
.cf-submit:hover .cf-submit-icon { transform: translateX(6px); }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--off);
  border-top: 1px solid var(--border);
}
.footer-marquee-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: rgba(255,255,255,0.01);
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 80px 40px 40px;
}
.footer-logo-big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 8rem);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 60px;
  color: rgba(255,255,255,0.1);
  transition: color 0.3s;
}
.footer-logo-big:hover { color: rgba(255,255,255,0.25); }
.foot-red { color: var(--red); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.fcol h5 {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 20px;
}
.fcol a {
  display: block;
  font-size: 1.05rem; color: var(--muted);
  margin-bottom: 14px;
  transition: color 0.3s, transform 0.3s;
}
.fcol a:hover { color: var(--white); transform: translateX(6px); }
.footer-bottom { text-align: center; }
.footer-bottom p { font-size: 0.78rem; color: var(--muted); }

/* ── Reveal helpers ──────────────────────────────────────────── */
.reveal-text { overflow: hidden; }
.reveal-text .char { display: inline-block; transform: translateY(115%); opacity: 0; }
.reveal-para { opacity: 0; transform: translateY(30px); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile First
══════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1100px) ─────────────────────────────────── */
@media (max-width: 1100px) {
  /* About */
  .about-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Projects */
  .proj-item,
  .proj-item-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 32px;
  }

  /* Contact */
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  /* Footer */
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile (≤ 768px) ──────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Cursor — hide on touch ── */
  .cursor-ball, .cursor-dot-small { display: none; }
  body { cursor: auto; }

  /* ── Navbar ── */
  .nav-center-links { display: none; }
  .nav-cta          { display: none; }
  .hamburger        { display: flex; }
  .nav-inner        { padding: 0 20px; }
  .nav-logo         { font-size: 1.3rem; }

  /* ── Hero ── */
  .hero-content {
    padding: 120px 20px 32px;
  }
  .hero-tag-line {
    font-size: 0.68rem;
    padding: 6px 14px;
    margin-bottom: 28px;
  }
  .hbt-mask span {
    font-size: clamp(3.2rem, 17vw, 6rem);
    letter-spacing: -0.01em;
  }
  .hero-sub-row {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
  }
  .hero-role-tag { gap: 8px; }
  .role-pill { font-size: 0.72rem; padding: 6px 14px; }
  .hero-desc {
    font-size: 0.9rem;
    max-width: 100%;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
  .cta-main { padding: 15px 28px; font-size: 0.85rem; }
  .hero-stats-row { gap: 20px; }
  .hstat-n { font-size: 2rem; }
  .hero-scroll-line { display: none; }
  .hero-marquee { font-size: 0.85rem; }

  /* ── About ── */
  .about { padding: 80px 0; }
  .about-inner { padding: 0 20px; }
  .about-heading {
    font-size: clamp(2.8rem, 12vw, 5rem);
    margin-bottom: 32px;
  }
  .about-code-terminal { font-size: 0.75rem; }
  .terminal-body { padding: 14px; }
  .about-para { font-size: 0.88rem; }
  .skills-grid { gap: 6px; }
  .skill-chip { font-size: 0.75rem; padding: 6px 14px; }

  /* ── Services ── */
  .services {
    padding: 80px 20px;
  }
  .services-title {
    font-size: clamp(3rem, 14vw, 6rem);
  }
  .services-header { margin-bottom: 40px; }
  .srv-item {
    grid-template-columns: 50px 1fr;
    gap: 16px;
    padding: 22px 0;
  }
  .srv-icon { display: none; }
  .srv-info h3 { font-size: 1.1rem; }
  .srv-info p  { font-size: 0.82rem; }
  .srv-num     { font-size: 0.95rem; }

  /* ── Projects ── */
  .projects { padding: 80px 0; }
  .projects-header {
    padding: 0 20px;
    margin-bottom: 40px;
  }
  .projects-title {
    font-size: clamp(3rem, 14vw, 6rem);
  }
  .projects-list {
    padding: 0 20px;
    gap: 60px;
  }
  .proj-media { border-radius: 12px; height: 220px; }
  .proj-name { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .proj-desc { font-size: 0.95rem; }
  .proj-tags span { font-size: 0.72rem; padding: 6px 14px; }

  /* ── Contact ── */
  .contact { padding: 80px 0; }
  .contact::before { font-size: 5rem; opacity: 0.02; }
  .contact-inner { padding: 0 20px; gap: 40px; }
  .contact-heading {
    font-size: clamp(2.8rem, 12vw, 5rem);
    margin-bottom: 32px;
  }
  .cc { padding: 16px 18px; gap: 14px; }
  .cc-icon { font-size: 1.5rem; }
  .cc-val  { font-size: 0.85rem; }
  .cc-live { font-size: 0.58rem; padding: 3px 8px; }
  .contact-cards { gap: 12px; }

  /* Contact form */
  .cf-group input,
  .cf-group textarea,
  .cf-group select { font-size: 0.88rem; }
  .cf-submit { padding: 17px; font-size: 0.85rem; }

  /* ── Footer ── */
  .footer-inner { padding: 60px 20px 32px; }
  .footer-logo-big { font-size: clamp(2.2rem, 11vw, 5rem); margin-bottom: 40px; }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-bottom: 40px;
    margin-bottom: 28px;
  }
  .fcol a { font-size: 1rem; margin-bottom: 10px; }

  /* WhatsApp float — smaller on mobile */
  .wa-float { width: 52px; height: 52px; bottom: 24px; right: 20px; }
  .wa-tooltip { display: none; }
}

/* ── Small Mobile (≤ 480px) ────────────────────────────── */
@media (max-width: 480px) {

  /* Hero */
  .hero-content { padding: 110px 16px 28px; }
  .hbt-mask span { font-size: clamp(2.8rem, 18vw, 4.5rem); }
  .hero-tag-line { font-size: 0.62rem; }
  .hero-actions { gap: 24px; }
  .cta-main { width: 100%; justify-content: center; }
  .hero-stats-row { gap: 14px; }
  .hstat-n { font-size: 1.7rem; }
  .hstat-sep { height: 32px; }

  /* About */
  .about-inner { padding: 0 16px; }
  .about-heading { font-size: clamp(2.4rem, 14vw, 4rem); }

  /* Services */
  .services { padding: 70px 16px; }
  .services-title { font-size: clamp(2.5rem, 16vw, 5rem); }

  /* Projects */
  .projects-header,
  .projects-list { padding: 0 16px; }
  .projects-list { gap: 48px; }

  /* Contact */
  .contact-inner { padding: 0 16px; }
  .contact-heading { font-size: clamp(2.4rem, 14vw, 4rem); }

  /* Footer */
  .footer-inner { padding: 48px 16px 28px; }
  .footer-cols  { grid-template-columns: 1fr; gap: 24px; }
  .footer-logo-big { font-size: clamp(2rem, 14vw, 4rem); }
}

/* ══════════════════════════════════════════════════════════
   AI CHATBOT WIDGET
══════════════════════════════════════════════════════════ */
.chatbot-wrapper {
  position: fixed;
  bottom: 24px;
  right: 90px; /* Next to WhatsApp */
  z-index: 999;
  font-family: var(--font-body);
  pointer-events: none;
}

.chatbot-trigger {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  position: absolute;
  bottom: 0; right: 0;
  pointer-events: auto;
}
.chatbot-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(108, 99, 255, 0.6);
}

.chatbot-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 340px;
  background: rgba(14, 14, 18, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}
.chatbot-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; justify-content: space-between; align-items: center;
}
.cb-header-info {
  display: flex; align-items: center; gap: 12px;
}
.cb-avatar {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: var(--white);
}
.cb-header-info h4 {
  font-size: 0.95rem; margin: 0; font-weight: 600; color: var(--white);
}
.cb-header-info span {
  font-size: 0.7rem; color: var(--accent); display: block;
}
.cb-close-btn {
  background: none; border: none; color: var(--muted);
  font-size: 1.5rem; cursor: pointer; transition: color 0.3s;
}
.cb-close-btn:hover { color: var(--white); }

.chatbot-messages {
  height: 320px;
  padding: 20px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.cb-msg { display: flex; flex-direction: column; max-width: 85%; }
.cb-msg-bot { align-self: flex-start; }
.cb-msg-user { align-self: flex-end; }

.cb-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.cb-msg-bot .cb-msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  border-bottom-left-radius: 4px;
}
.cb-msg-user .cb-msg-bubble {
  background: var(--accent);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chatbot-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; gap: 8px; align-items: center;
  background: rgba(0, 0, 0, 0.2);
}
.chatbot-input-area input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--white); font-size: 0.9rem;
}
.chatbot-input-area input::placeholder { color: rgba(255,255,255,0.3); }
.cb-send-btn {
  background: none; border: none; color: var(--accent);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 6px; transition: transform 0.3s, color 0.3s;
}
.cb-send-btn:hover { transform: scale(1.1); color: #fff; }

/* Typing animation */
.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span {
  width: 6px; height: 6px; background: var(--muted); border-radius: 50%;
  animation: cbTyping 1.4s infinite both;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cbTyping {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .chatbot-wrapper { right: 20px; bottom: 90px; } /* Stack above whatsapp on mobile */
  .chatbot-window { width: calc(100vw - 40px); right: 0; }
}