:root {
  --royal: #1B5CA8;
  --saffron: #FF8C00;
  --india: #A8D946;
  --ink: #1A1A2E;
  --mist: #F8F9FB;
  --grad: linear-gradient(135deg, #1B5CA8 0%, #2E7BC0 45%, #FF8C00 100%);
}

html,
body {
  background: #fff;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

.font-display {
  font-family: 'Fraunces', serif;
  letter-spacing: -0.02em;
}

.grad-text {
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  background: none;
  display: inline;
}

.grad-border {
  position: relative;
}

.grad-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(11, 78, 162, 0.08);
}

.glass-dark {
  background: rgba(10, 17, 36, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Custom Cursor */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Safely disable custom cursor on touch screens */
@media (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* Marquee Animation */
@keyframes marq {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marq 38s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Magnetic Button Glow */
.btn-royal {
  position: relative;
  overflow: hidden;
}

.btn-royal::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(from var(--a, 0deg), #0B4EA2, #FF6B00, #00B140, #0B4EA2);
  filter: blur(14px);
  opacity: 0.55;
  z-index: -1;
  animation: spin 7s linear infinite;
}

@keyframes spin {
  to {
    --a: 360deg;
  }
}

@property --a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* Page Loader */
#loader {
  position: fixed;
  inset: 0;
  background: #0A1124;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

#loader .ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #FF6B00;
  animation: spin 1s linear infinite;
}

/* Top Progress Bar */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0B4EA2, #FF6B00, #00B140);
  width: 0%;
  z-index: 1000;
  transition: width 0.15s linear;
}

.blob {
  filter: blur(60px);
  opacity: 0.45;
  border-radius: 50%;
  position: absolute;
}

.no-scroll::-webkit-scrollbar {
  display: none;
}

.tilt {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.navlink {
  position: relative;
}

.navlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--grad);
  transition: width 0.35s ease;
}

.navlink:hover::after,
.navlink.active::after {
  width: 100%;
}

/* Defensive line heights avoiding typography splitting bugs across viewports */
h1,
h2 {
  line-height: 1.25 !important;
  padding-bottom: 0.15em;
}

.split-line-wrapper {
  overflow: hidden;
  padding-bottom: 0.05em;
  margin-bottom: -0.05em;
}

section {
  scroll-margin-top: 90px;
}

/* Micro credentials metrics container */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(11, 78, 162, 0.08);
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 960px) {
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Form Validation Error Styles */
.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-bottom-color: #EF4444 !important;
  box-shadow: 0 1px 0 0 #EF4444 !important;
}

.is-invalid:focus,
input.is-invalid:focus,
textarea.is-invalid:focus,
select.is-invalid:focus {
  border-bottom-color: #F87171 !important;
  box-shadow: 0 2px 0 0 #F87171 !important;
}

.field-error-msg {
  display: block;
  font-size: 0.75rem;
  line-height: 1rem;
  color: #F87171;
  font-weight: 500;
  margin-top: 0.375rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.field-error-msg.hidden {
  display: none !important;
}

