/* ============================================================
   Nexora Institute — "Tactile" design system
   Modern Soft-Skeuomorphism: real depth, embossed surfaces,
   glossy controls, brushed materials & frosted glass.
   (Tailwind via CDN handles utilities; this adds the physical polish)
   ============================================================ */

:root {
  /* Brand */
  --brand: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-light: #818cf8;
  --ink: #0b1020;

  /* Tactile canvas + surface ramp */
  --canvas: #e6eaf3;
  --surface: #eef1f8;
  --surface-hi: #ffffff;      /* light source highlight */
  --surface-lo: #c9d0e0;      /* shadow side */

  /* Light + dark shadow used for neumorphism */
  --sh-dark: rgba(43, 54, 92, .20);
  --sh-dark-strong: rgba(33, 42, 74, .30);
  --sh-light: rgba(255, 255, 255, .92);

  /* Radii */
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;
}

* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { overflow-x: hidden; background-color: var(--canvas); }

/* Selection */
::selection { background: rgba(99,102,241,.24); color: #1e1b4b; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c4cbdd, #aab3ca);
  border-radius: 9px; border: 3px solid var(--canvas); background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #97a1bd; background-clip: content-box; }

/* ============================================================
   FINE GRAIN — subtle paper/material noise for premium feel
   ============================================================ */
.grain { position: relative; }
.grain::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   TACTILE SURFACES (neumorphic)
   ============================================================ */

/* Raised panel — appears to lift off the canvas */
.tactile {
  background: linear-gradient(150deg, #f6f8fe 0%, #e3e8f3 100%);
  border-radius: var(--r-md);
  box-shadow:
    10px 12px 26px var(--sh-dark),
   -8px -8px 20px var(--sh-light),
    inset 0 1px 0 rgba(255,255,255,.85),
    inset 0 -1px 0 rgba(120,130,160,.12);
}

/* Strong raised — for hero/feature elements */
.tactile-xl {
  background: linear-gradient(150deg, #f7f9ff 0%, #e1e6f2 100%);
  border-radius: var(--r-lg);
  box-shadow:
    18px 22px 48px var(--sh-dark-strong),
   -12px -12px 30px var(--sh-light),
    inset 0 2px 0 rgba(255,255,255,.9),
    inset 0 -2px 2px rgba(120,130,160,.16);
}

/* Pressed / debossed well — carved into the surface */
.tactile-inset {
  background: linear-gradient(150deg, #dde3f1 0%, #f1f4fb 100%);
  border-radius: var(--r-md);
  box-shadow:
    inset 7px 7px 14px rgba(43,54,92,.18),
    inset -6px -6px 12px rgba(255,255,255,.9);
}

/* Interactive hover lift for tactile cards */
.tactile-lift { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.tactile-lift:hover {
  transform: translateY(-6px);
  box-shadow:
    18px 26px 50px var(--sh-dark-strong),
   -10px -10px 26px var(--sh-light),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* Embossed icon "chip/well" */
.chip-raised {
  background: linear-gradient(150deg, #fbfcff, #dfe5f2);
  box-shadow: 5px 5px 12px var(--sh-dark), -4px -4px 10px var(--sh-light), inset 0 1px 0 rgba(255,255,255,.9);
}
.chip-inset {
  background: linear-gradient(150deg, #dde3f1, #eef2fb);
  box-shadow: inset 4px 4px 9px rgba(43,54,92,.20), inset -4px -4px 9px rgba(255,255,255,.92);
}

/* ============================================================
   GLOSSY 3D CONTROLS — buttons you can feel press
   ============================================================ */
.btn3d {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 9999px; color: #fff; font-weight: 600;
  background: linear-gradient(180deg, #7c7ff6 0%, #5b54ec 48%, #4a40d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -3px 8px rgba(28,22,90,.45),
    0 10px 22px -6px rgba(79,70,229,.6),
    0 3px 6px rgba(20,20,50,.25);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn3d::before { /* glossy top sheen */
  content: ""; position: absolute; inset: 1px 1px 45% 1px; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0));
  pointer-events: none; z-index: -1;
}
.btn3d:hover { filter: brightness(1.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 8px rgba(28,22,90,.45), 0 14px 28px -6px rgba(79,70,229,.7), 0 4px 8px rgba(20,20,50,.3); }
.btn3d:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(20,16,70,.5), inset 0 -1px 0 rgba(255,255,255,.25), 0 4px 10px -4px rgba(79,70,229,.5); }

/* Light tactile button (on light canvas) */
.btn3d-light {
  position: relative; border-radius: 9999px; font-weight: 600; color: #2b3357;
  background: linear-gradient(180deg, #ffffff 0%, #e7ecf7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    6px 8px 18px var(--sh-dark),
   -5px -5px 14px var(--sh-light);
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn3d-light:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 8px 12px 24px var(--sh-dark), -6px -6px 16px var(--sh-light); }
.btn3d-light:active { transform: translateY(2px); box-shadow: inset 5px 5px 11px rgba(43,54,92,.18), inset -4px -4px 9px rgba(255,255,255,.9); }

/* Dark glossy button (on obsidian) */
.btn3d-dark {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 9999px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, #2a3252 0%, #161c30 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -3px 8px rgba(0,0,0,.5), 0 12px 26px -8px rgba(0,0,0,.7);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn3d-dark:hover { filter: brightness(1.12); }
.btn3d-dark:active { transform: translateY(2px); box-shadow: inset 0 2px 8px rgba(0,0,0,.6); }

/* Glassy white button on dark */
.btn-glass {
  position: relative; border-radius: 9999px; font-weight: 600; color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #eef1f8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 12px 28px -8px rgba(0,0,0,.55), 0 2px 4px rgba(0,0,0,.3);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-glass:hover { filter: brightness(1.03); transform: translateY(-1px); }
.btn-glass:active { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(120,130,160,.4); }

/* ============================================================
   OBSIDIAN — deep tactile dark panels (hero / why-us / footer)
   ============================================================ */
.obsidian {
  position: relative;
  background:
    radial-gradient(120% 120% at 50% -10%, #1b2238 0%, #0d1222 55%, #080b16 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -40px 80px rgba(0,0,0,.45);
}
.obsidian-panel {
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 24px 48px -20px rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
}
.obsidian-inset {
  background: rgba(0,0,0,.25);
  border-radius: var(--r-sm);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.05);
}

/* ============================================================
   MATERIALS — brushed metal, glass, glossy accent tiles
   ============================================================ */
.metal {
  background:
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 40%),
    repeating-linear-gradient(90deg, #cfd6e6 0px, #e7ecf6 2px, #cfd6e6 4px),
    linear-gradient(180deg, #dfe4f0, #c6cee0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 14px rgba(43,54,92,.18);
}

/* Accent glossy tile (gradient icon plates) */
.tile-accent {
  background: linear-gradient(160deg, #8b8ff8 0%, #5b54ec 55%, #4a40d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -4px 8px rgba(28,22,90,.5),
    0 10px 20px -6px rgba(79,70,229,.55);
}
.tile-emerald { background: linear-gradient(160deg, #34d399 0%, #059669 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 8px rgba(4,80,50,.5), 0 10px 20px -6px rgba(16,185,129,.5); }
.tile-amber  { background: linear-gradient(160deg, #fbbf24 0%, #d97706 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 8px rgba(120,60,4,.5), 0 10px 20px -6px rgba(217,119,6,.5); }
.tile-rose   { background: linear-gradient(160deg, #fb7185 0%, #e11d48 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 8px rgba(120,10,40,.5), 0 10px 20px -6px rgba(225,29,72,.5); }

/* Knurled grip texture (for handle/edge accents) */
.knurl {
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.10) 0 2px, transparent 2px 4px);
}

/* ============================================================
   TEXT + DECOR
   ============================================================ */
.text-gradient {
  background: linear-gradient(110deg, #6366f1 0%, #8b5cf6 45%, #ec4899 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.text-emboss { text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.text-deboss { text-shadow: 0 1px 1px rgba(255,255,255,.6), 0 -1px 1px rgba(43,54,92,.25); }

/* ---- Aurora / mesh (kept for obsidian sections) ---- */
.hero-aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.hero-aurora span { position: absolute; border-radius: 9999px; filter: blur(90px); opacity: .5; }
.hero-aurora span:nth-child(1){ width:520px;height:520px;background:#6366f1;top:-140px;left:-100px;animation:blob 18s infinite ease-in-out;}
.hero-aurora span:nth-child(2){ width:460px;height:460px;background:#a855f7;top:20px;right:-120px;animation:blob 20s -5s infinite ease-in-out;}
.hero-aurora span:nth-child(3){ width:420px;height:420px;background:#22d3ee;bottom:-160px;left:32%;animation:blob 22s -10s infinite ease-in-out;}
@keyframes blob {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(50px,-40px) scale(1.12); }
  66% { transform: translate(-40px,30px) scale(.92); }
}

/* ---- Grid / dot textures ---- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}
.bg-dots {
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 22px 22px;
}
/* engraved dot texture for light surfaces */
.bg-emboss-dots {
  background-image: radial-gradient(rgba(43,54,92,.10) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"]{ transition-delay:.08s } .reveal[data-delay="2"]{ transition-delay:.16s }
.reveal[data-delay="3"]{ transition-delay:.24s } .reveal[data-delay="4"]{ transition-delay:.32s }
.reveal[data-delay="5"]{ transition-delay:.40s }

/* legacy hover lift (kept for non-tactile pages) */
.card-lift { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s, border-color .4s; will-change: transform; }
.card-lift:hover { transform: translateY(-6px); box-shadow: 0 28px 56px -24px rgba(49,46,129,.4); }

/* ---- Shine sweep (used on glossy buttons) ---- */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content:""; position:absolute; top:0; left:-130%; width:60%; height:100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .7s; pointer-events: none;
}
.btn-shine:hover::after { left:140%; }

/* ---- Marquee ---- */
.marquee-wrap { -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.marquee { display:flex; gap:4rem; width:max-content; animation: scrollx 32s linear infinite; }
.marquee:hover { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---- Floating ---- */
@keyframes floaty { 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-14px) } }
.animate-floaty { animation: floaty 7s ease-in-out infinite; }
@keyframes fadeUp { 0%{ opacity:0; transform:translateY(24px) } 100%{ opacity:1; transform:none } }
.animate-fadeUp { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) both; }

/* ---- Ticker badge pulse ring ---- */
.pulse-ring { position: relative; }
.pulse-ring::before { content:""; position:absolute; inset:-4px; border-radius:9999px; background: currentColor; opacity:.35; animation: pulsering 2s ease-out infinite; }
@keyframes pulsering { 0%{ transform:scale(.8); opacity:.5 } 100%{ transform:scale(2.2); opacity:0 } }

/* line clamp fallback */
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
  .reveal { opacity:1; transform:none; }
}

/* ---- Print: certificates & receipts ---- */
@media print {
  .no-print { display: none !important; }
  body { background:#fff !important; }
  .grain::before { display: none !important; }
  .print-area { box-shadow:none !important; margin:0 !important; }
}


/* ============================================================
   SPLASH / FLASH SCREEN (admin toggleable, once per session)
   ============================================================ */
#splash {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 50% -10%, #1b2238 0%, #0d1222 55%, #080b16 100%);
  transition: opacity .7s ease, visibility .7s ease;
}
#splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#splash .splash-inner { text-align: center; padding: 1.5rem; }
#splash .splash-logo {
  display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto;
  border-radius: 24px; color: #fff; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 34px;
  background: linear-gradient(160deg, #8b8ff8 0%, #5b54ec 55%, #4a40d8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 10px rgba(28,22,90,.6), 0 18px 40px -10px rgba(79,70,229,.7);
  animation: splashPop .7s cubic-bezier(.2,.9,.3,1.3) both;
}
#splash .splash-name {
  margin-top: 1.25rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(1.6rem, 6vw, 2.4rem); color: #fff; animation: fadeUp .6s .15s both;
}
#splash .splash-text { margin-top: .5rem; color: #9aa6c4; font-size: .95rem; max-width: 28rem; animation: fadeUp .6s .28s both; }
#splash .splash-bar { margin: 1.6rem auto 0; width: 160px; height: 5px; border-radius: 9999px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.6); }
#splash .splash-bar span { display: block; height: 100%; width: 40%; border-radius: 9999px; background: linear-gradient(90deg, #818cf8, #c4b5fd); animation: splashLoad 1.1s ease-in-out infinite; }
@keyframes splashPop { 0% { transform: scale(.7) translateY(8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes splashLoad { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
html.splash-active, body.splash-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  #splash .splash-logo, #splash .splash-name, #splash .splash-text { animation: none; }
}


/* ============================================================
   Admin / Student sidebar — thin independent scrollbar
   ============================================================ */
.sb-scroll { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; overscroll-behavior: contain; }
.sb-scroll::-webkit-scrollbar { width: 8px; }
.sb-scroll::-webkit-scrollbar-track { background: transparent; border: 0; }
.sb-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
.sb-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); background-clip: content-box; }

/* ============================================================
   Brandmark ruleset — inline keyword-to-logo replacement
   ============================================================ */
.brandmark-inline {
  height: 1.15em;
  width: auto;
  max-width: 8em;
  display: inline-block;
  vertical-align: -0.2em;
  margin: 0 .12em;
  object-fit: contain;
}

/* ============================================================
   Hero carousel (Projects & Work page)
   ============================================================ */
.carousel { position: relative; overflow: hidden; border-radius: 22px; }
.carousel-track {
  display: flex;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.carousel-slide { flex: 0 0 100%; min-width: 100%; position: relative; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-caption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 40px 22px 18px;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 20, .82));
  color: #fff; text-align: left;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(10, 14, 30, .55); color: #fff;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background .2s;
}
.carousel-btn:hover { background: rgba(79, 70, 229, .85); }
.carousel-btn.is-prev { left: 12px; }
.carousel-btn.is-next { right: 12px; }
.carousel-dots {
  position: absolute; bottom: 10px; right: 16px; z-index: 5;
  display: flex; gap: 6px;
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  transition: all .25s;
}
.carousel-dot.is-active { width: 22px; background: #fff; }
