:root {
  --color-orange: #ab9839;
  --color-navy: #000000b9;
  --color-deep: #0b192c;
  --color-black: #000000;
  --color-page: #f8fafc;
  --color-section: #eef3f8;
  --color-border: #dbe3ec;
  --shadow-orange: rgba(255, 101, 0, 0.22);
  --shadow-navy: rgba(11, 25, 44, 0.18);
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--color-page);
  color: var(--color-deep);
  scroll-behavior: smooth;
  transition: all 0.5s ease;
}

.dark,
.light {
  background: var(--color-page);
  color: var(--color-deep);
}

h1,
h2,
h3,
h4,
p,
a,
li,
span,
label,
input,
textarea,
button {
  color: var(--color-deep) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-navy);
}

.text-yellow {
  color: var(--color-orange) !important;
}

.text-blue {
  color: var(--color-navy) !important;
}

.bg-yellow {
  background: var(--color-orange) !important;
}

.border-yellow {
  border-color: var(--color-orange) !important;
}

.focus\:border-yellow:focus {
  border-color: var(--color-orange) !important;
}

.hover\:bg-yellow:hover {
  background: var(--color-orange) !important;
}

.hover\:text-black:hover {
  color: #000000 !important;
}

.hover\:text-blue:hover {
  color: var(--color-navy) !important;
}

.hover\:text-yellow:hover {
  color: var(--color-orange) !important;
}

.hover\:shadow-yellow\/20:hover {
  box-shadow: 0 20px 45px var(--shadow-orange);
}

.btn-filled {
  color: #ffffff !important;
}

.btn-outline {
  color: var(--color-orange) !important;
  background: #ffffff !important;
}

.btn-outline:hover {
  color: #ffffff !important;
  background: var(--color-orange) !important;
}

nav {
  background: rgba(11, 25, 44, 0.96) !important;
  border-color: rgba(255, 101, 0, 0.28) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

nav a,
nav h1 span:not(.text-yellow),
#mobile-menu a {
  color: #ffffff !important;
}

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

.bg-slate-900\/60,
.bg-slate-900\/40 {
  background: var(--color-section) !important;
}

.bg-slate-800\/80,
.testimonial-card {
  background: #ffffff !important;
  border: 1px solid var(--color-border);
  box-shadow: 0 12px 32px rgba(11, 25, 44, 0.08);
}

.testimonial-card {
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--color-orange);
}

.achievement-timeline {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 101, 0, 0.1);
  color: var(--color-orange) !important;
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline-scroll {
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 12px 4px 4px;
  scrollbar-width: none;
}

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

input,
textarea {
  background: #ffffff !important;
  border-color: var(--color-border) !important;
}

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

::-webkit-scrollbar-track {
  background: #ffffff;
}

::-webkit-scrollbar-thumb {
  background: var(--color-orange);
  border-radius: 10px;
}

.light ::-webkit-scrollbar-track {
  background: #cbd5e1;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -8px;
  left: 50%;
  background: var(--color-orange);
  transition: all 0.4s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-primary {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 101, 0, 0.38);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(255, 101, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 101, 0, 0);
  }
}

@keyframes blink {
  0%,
  100% {
    border-color: transparent;
  }

  50% {
    border-color: var(--color-orange);
  }
}

.cursor {
  border-right: 4px solid var(--color-orange);
  animation: blink 0.7s infinite;
}

#theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

#theme-toggle:hover {
  transform: scale(1.1);
  background: var(--color-orange);
}

#theme-toggle i {
  font-size: 24px;
  color: var(--color-orange);
  transition: all 0.4s ease;
}

.light #theme-toggle {
  background: rgba(248, 250, 252, 0.95);
}

.light #theme-toggle i {
  color: var(--color-navy);
}

#success-message {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.5s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#success-message.show {
  opacity: 1;
  top: 80px;
}

#mobile-menu {
  background: rgba(11, 25, 44, 0.98) !important;
}

#blueHideText {
  color: var(--color-orange) !important;
}

.live-demo-link {
  color: var(--color-orange) !important;
}

.education-roadmap {
  position: relative;
  display: grid;
  gap: 42px;
  max-width: 1000px;
  margin: 0 auto;
}

.education-roadmap::before {
  content: '';
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 50%;
  width: 4px;
  border-radius: 999px;
  background: var(--color-orange);
  transform: translateX(-50%);
}

.education-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  align-items: center;
  gap: 24px;
  text-align: left;
}

.education-step:nth-child(odd) .education-card {
  grid-column: 3;
}

.education-step:nth-child(even) .education-card {
  grid-column: 1;
  grid-row: 1;
}

.education-marker {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.education-marker i {
  font-size: 28px;
  color: var(--color-orange);
}

.education-marker img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
}

.education-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  width: 100%;
}

.education-card.featured {
  border-color: var(--color-orange);
  box-shadow: 0 18px 42px var(--shadow-orange);
}

.education-date {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 101, 0, 0.11);
  color: var(--color-orange) !important;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.activity-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr) minmax(0, 0.65fr);
  gap: 20px;
  min-height: 360px;
}

/* Allow items to backfill gaps when there are fewer cards than the grid slots */
.activity-news-grid {
  grid-auto-flow: dense;
}

.activity-tile {
  min-height: 180px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px var(--shadow-navy);
}

.activity-tile:focus {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

.activity-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.activity-news-card {
  min-height: 185px;
  box-shadow: 0 16px 34px var(--shadow-navy);
}

.activity-news-card:not(.activity-news-featured) {
  min-height: 182px;
}

.activity-news-card:not(.activity-news-featured) h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.activity-news-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.activity-news-card:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.activity-news-card:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

.activity-news-card:nth-child(5) {
  grid-column: 3;
  grid-row: 2;
}

.activity-news-featured {
  grid-row: span 2;
  min-height: 390px;
}

/* If there is no 4th card, don't force the featured card to span two rows (avoids empty space).
   Uses :has() where supported; fallback will still show span if not supported by browser. */
.activity-news-grid:not(:has(.activity-news-card:nth-child(4))) .activity-news-featured {
  grid-row: auto;
}

.activity-news-featured h3 {
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.18;
}

.activity-overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(11, 25, 44, 0.05), rgba(11, 25, 44, 0.82));
}

.activity-overlay h3,
.activity-overlay p {
  color: #ffffff !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.36);
}

.activity-news-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 7px;
  background: var(--color-orange);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 800;
}

.reference-card {
  min-height: 360px;
  perspective: 1200px;
}

.reference-card-inner {
  position: relative;
  width: 100%;
  min-height: 360px;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.reference-card:hover .reference-card-inner {
  transform: rotateY(180deg);
}

.reference-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  backface-visibility: hidden;
  box-shadow: 0 12px 32px rgba(11, 25, 44, 0.08);
}

.reference-card-front {
  transform: rotateY(0);
}

.reference-card-back {
  transform: rotateY(180deg);
  background: var(--color-section);
}

.reference-quote-icon {
  font-size: 34px;
  margin-bottom: 18px;
  color: var(--color-orange);
}

.reference-quote {
  max-width: 260px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 600;
}

.reference-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--color-section);
  border: 1px solid var(--color-border);
  min-width: 0;
  font-size: 0.93rem;
  line-height: 1.35;
}

.reference-link i {
  flex: 0 0 18px;
  width: 18px;
  text-align: center;
  color: var(--color-orange);
}

.reference-link span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

#activity-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 20px 40px;
  overflow-y: auto;
  background: var(--color-page);
}

#activity-modal.show {
  display: flex;
}

#activity-modal-card {
  position: relative;
  width: min(100%, 1080px);
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
}

#activity-modal-close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 10000;
  background: #ffffff;
  box-shadow: 0 12px 28px var(--shadow-navy);
}

#activity-modal-image {
  width: 100%;
  max-height: 640px;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: var(--color-section);
}

#activity-modal-image.hidden {
  display: none;
}

.activity-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.activity-modal-meta p {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 101, 0, 0.24);
  border-radius: 999px;
  background: rgba(255, 101, 0, 0.09);
  color: var(--color-navy) !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.activity-modal-meta .hidden {
  display: none;
}

#activity-modal-gallery {
  display: flex;
  gap: 10px;
  padding: 12px 16px 0;
  overflow-x: auto;
  background: #ffffff;
}

#activity-modal-gallery.hidden {
  display: none;
}

.activity-gallery-thumb {
  width: 74px;
  height: 54px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 10px;
  opacity: 0.72;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.activity-gallery-thumb:hover,
.activity-gallery-thumb.active {
  border-color: var(--color-orange);
  opacity: 1;
}

.activity-gallery-thumb:focus {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.activity-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 960px) {
  .activity-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-news-featured,
  .activity-news-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .activity-news-featured {
    grid-column: 1 / -1;
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .activity-news-grid {
    grid-template-columns: 1fr;
  }

  .activity-news-card,
  .activity-news-featured {
    min-height: 260px;
  }

  .activity-overlay {
    padding: 18px;
  }

  #activity-modal {
    padding: 78px 16px 32px;
  }

  #activity-modal-close {
    top: 16px;
    right: 16px;
  }

  .education-roadmap {
    gap: 28px;
  }

  .education-roadmap::before {
    left: 26px;
    transform: none;
  }

  .education-step {
    grid-template-columns: 52px 1fr;
    gap: 16px;
  }

  .education-step:nth-child(odd) .education-card,
  .education-step:nth-child(even) .education-card {
    grid-column: 2;
    grid-row: 1;
  }

  .education-marker {
    grid-column: 1;
    width: 52px;
    height: 52px;
    border-width: 3px;
  }

  .education-marker i {
    font-size: 20px;
  }

  .education-marker img {
    width: 34px;
    height: 34px;
  }

  .education-card {
    padding: 20px;
  }
}


