/* Kylin Website - Dark Sci-Fi Theme */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap');

:root {
  --mdb-primary: #00e5ff;
  --mdb-primary-rgb: 0, 229, 255;
  --mdb-body-bg: #0a0e1a;
  --mdb-body-color: #e0e6ed;
  --mdb-body-bg-rgb: 10, 14, 26;
  --mdb-body-color-rgb: 224, 230, 237;
  --sci-bg: #0a0e1a;
  --sci-bg-light: #101828;
  --sci-accent: #00e5ff;
  --sci-accent-rgb: 0, 229, 255;
  --sci-glass: rgba(15, 20, 40, 0.75);
  --sci-glass-border: rgba(0, 229, 255, 0.12);
  --sci-text: #e0e6ed;
  --sci-text-muted: #8a9ab5;
}

/* ===== Global ===== */
body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  background-color: var(--sci-bg);
  color: var(--sci-text);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(0, 229, 255, 0.03) 59px, rgba(0, 229, 255, 0.03) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(0, 229, 255, 0.03) 59px, rgba(0, 229, 255, 0.03) 60px);
  background-size: 60px 60px;
}

.text-muted {
  color: var(--sci-text-muted) !important;
}

a {
  color: var(--sci-accent);
}

a:hover {
  color: #62f0ff;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
  font-family: 'Source Code Pro', 'Roboto Mono', monospace;
}

/* ===== Hero section ===== */
#intro {
  position: relative;
}

#intro .mask {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(6, 10, 28, 0.92),
    rgba(0, 40, 60, 0.88) 50%,
    rgba(0, 229, 255, 0.25) 100%
  ) !important;
}

#intro .mask::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(0, 229, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  animation: grid-drift 20s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to   { background-position: 24px 24px; }
}

#intro h1 {
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

#intro h5 {
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.95rem;
}

/* ===== Buttons ===== */
.btn-outline-light {
  border-color: var(--sci-accent);
  color: var(--sci-accent);
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background-color: var(--sci-accent);
  color: var(--sci-bg);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

.btn-primary,
.bg-primary,
.text-primary,
a.text-primary:hover {
  --mdb-btn-bg: #00e5ff;
  --mdb-btn-color: #0a0e1a;
}

/* ===== Navbar ===== */
.navbar.navbar-dark {
  background: rgba(10, 14, 26, 0.7) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.navbar-brand strong {
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.navbar .nav-link {
  transition: color 0.2s, text-shadow 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-item.active .nav-link {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

/* ===== Main content flex grow ===== */
main {
  flex: 1;
}

/* ===== Section layout ===== */
.section-block {
  padding: 60px 0;
  background-color: var(--sci-bg);
}

.section-alt {
  background-color: var(--sci-bg-light);
}

/* ===== Section titles ===== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  padding-left: 16px;
  border-left: 4px solid var(--sci-accent);
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.section-title-center {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.section-title-center::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--sci-accent);
  margin: 10px auto 0;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  animation: glow-pulse 2.5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 229, 255, 0.4); }
  50%      { box-shadow: 0 0 16px rgba(0, 229, 255, 0.8); }
}

/* ===== Cards ===== */
.card {
  border: 1px solid var(--sci-glass-border);
  border-radius: 12px;
  background: var(--sci-glass);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-body {
  color: var(--sci-text);
}

.card-title {
  color: #fff;
}

.card-text {
  color: var(--sci-text-muted);
}

/* ===== Year block (publications / news) ===== */
.year-block {
  border-left: 3px solid var(--sci-accent);
  padding: 20px 24px;
  margin-bottom: 28px;
  background: rgba(0, 229, 255, 0.03);
  border-radius: 0 8px 8px 0;
  backdrop-filter: blur(4px);
}

.year-block h5 {
  font-weight: 700;
  color: var(--sci-accent);
  margin-bottom: 12px;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.year-block ul {
  margin-bottom: 0;
}

/* ===== Content card (download / about) ===== */
.content-card {
  background: var(--sci-glass);
  border: 1px solid var(--sci-glass-border);
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}

.content-card-highlight {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.06), rgba(0, 100, 140, 0.1));
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}

/* ===== Footer ===== */
footer {
  background-color: var(--sci-bg-light) !important;
  border-top: 2px solid var(--sci-accent);
  color: var(--sci-text-muted);
}

footer .text-center.p-3 {
  background-color: rgba(0, 229, 255, 0.05) !important;
}

footer a {
  color: var(--sci-accent) !important;
}

/* ===== Overrides for MDB text utilities on dark bg ===== */
.text-dark {
  color: var(--sci-text) !important;
}

strong {
  color: #fff;
}

.bg-light {
  background-color: var(--sci-bg-light) !important;
}

/* ===== Scrollbar (Webkit) ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--sci-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.4);
}

/* ===== Feature grid (6-card layout) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 991px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--sci-glass);
  border: 1px solid var(--sci-glass-border);
  border-radius: 10px;
  padding: 28px 24px;
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--sci-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15), 0 8px 28px rgba(0, 0, 0, 0.35);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  display: block;
  opacity: 0.9;
}

.feature-card h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.feature-card p {
  color: var(--sci-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ===== Feature tags ===== */
.feature-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-family: 'Source Code Pro', monospace;
  font-weight: 600;
  color: var(--sci-accent);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 4px;
  margin: 2px 3px 2px 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ===== Code panel ===== */
.code-panel {
  background: rgba(8, 12, 24, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-left: 3px solid var(--sci-accent);
  border-radius: 0 8px 8px 0;
  padding: 0;
  margin-bottom: 24px;
  overflow: hidden;
  font-family: 'Source Code Pro', 'Consolas', monospace;
}

.code-panel-label {
  display: block;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sci-accent);
  background: rgba(0, 229, 255, 0.06);
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
  letter-spacing: 1px;
  text-transform: none;
  font-family: 'Source Code Pro', monospace;
}

.code-panel pre {
  margin: 0;
  padding: 16px 20px;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--sci-text);
  background: transparent;
  overflow-x: auto;
  white-space: pre;
}

.code-panel pre .code-keyword {
  color: var(--sci-accent);
}

.code-panel pre .code-value {
  color: #a8d8a8;
}

.code-panel pre .code-comment {
  color: #5a6a80;
  font-style: italic;
}

/* ===== Output format block ===== */
.output-block {
  background: rgba(8, 12, 24, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 8px;
  padding: 20px 24px;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--sci-text-muted);
  overflow-x: auto;
}

.output-block .out-tag {
  color: var(--sci-accent);
  font-weight: 700;
}

.output-block .out-key {
  color: #c8d8e8;
}

.output-block .out-val {
  color: #a8d8a8;
}

/* ===== Section subtitle ===== */
.section-subtitle {
  color: var(--sci-text-muted);
  font-size: 0.95rem;
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;
}

/* ===== Tech list with tags ===== */
.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tech-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.06);
  color: var(--sci-text);
  font-size: 0.92rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tech-list li:last-child {
  border-bottom: none;
}

.tech-list li::before {
  content: '\25B8';
  color: var(--sci-accent);
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* ===== Quick-start two-column ===== */
.quickstart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 767px) {
  .quickstart-grid { grid-template-columns: 1fr; }
}
