:root {
    --bg-dark: #0a0a0c;
    --bg-card: #141418;
    --bg-card-strong: #18181d;
    --primary: #fbbf24;
    --primary-dim: #b45309;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-green: #10b981;
    --border: #27272a;
    --border-strong: rgba(251, 191, 36, 0.22);
    --font-sans: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;
    --bg: var(--bg-dark);
    --bg-soft: var(--bg-card-strong);
    --panel: rgba(20, 20, 24, 0.94);
    --panel-strong: rgba(24, 24, 29, 0.98);
    --line: var(--border);
    --text: var(--text-main);
    --muted: var(--text-muted);
    --accent: var(--primary);
    --accent-strong: #f59e0b;
    --accent-cool: #67e8f9;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.09), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08), transparent 24%),
        var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.visual-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.035;
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 40px 40px;
}

.site-header {
    background-color: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    isolation: isolate;
}

.site-header a,
.site-header button,
.site-header nav {
    position: relative;
    z-index: 2;
}

.site-nav,
.site-nav ul,
.site-nav li,
.site-nav a {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-logo,
.brand-mark,
.footer-logo,
.profile-mark {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 0.05rem;
}

.brand-copy strong {
    color: var(--text-main);
    font-size: 1rem;
}

.brand-copy span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.menu-toggle {
    display: none;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
}

.nav-toggle {
    display: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.site-nav ul {
    display: flex;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

main {
    padding-top: 2rem;
}

.home-main {
    width: min(1440px, calc(100% - 3rem));
    margin: 0 auto;
}

.top-status-bar {
    width: min(1440px, calc(100% - 3rem));
    margin: 1rem auto 0;
    display: grid;
    grid-template-columns: 0.8fr 1.15fr 1.3fr;
    gap: 1rem;
    align-items: end;
    padding: 0.35rem 0 1.25rem;
    border-bottom: 1px solid rgba(251, 191, 36, 0.14);
}

.status-item {
    min-width: 0;
}

.status-item strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.35;
}

.status-item p {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.status-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.status-weather {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.status-weather strong {
    margin-top: 0;
}

.status-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0.7rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.status-meta i {
    color: var(--primary);
    margin-right: 0.35rem;
}

.status-line i {
    color: var(--primary);
}

#weather-title {
    color: var(--text-muted);
}

.home-main section {
    padding-left: 0;
    padding-right: 0;
}

.page-shell {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
}

section {
    padding: 5rem 8%;
}

.container,
.page-main {
    max-width: 1240px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 2rem;
    align-items: start;
}

.hero-text h1,
.page-hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.6rem);
    line-height: 1.05;
    margin-bottom: 1.25rem;
    color: #fff;
}

.text-primary {
    color: var(--primary);
}

.role,
.section-kicker,
.panel-label,
.eyebrow,
.hero-badge-label,
.stat-label,
.contact-label,
.service-index,
.capability-tag,
.timeline-year {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.8rem;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy {
    max-width: 42rem;
    margin-bottom: 1.75rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.native-name,
.hero-text,
.section-note {
    color: var(--text-muted);
}

.hero-actions,
.section-head-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.25rem;
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--primary);
    color: #09090b;
    border: 1px solid transparent;
}

.button-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.tool-shell,
.test-shell,
.utilities-shell,
.sites-shell,
.kb-shell {
    width: min(1360px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 0 0 4rem;
}

.hero-terminal {
    margin-top: 2rem;
}

.hero-visual {
    display: grid;
    gap: 1rem;
}

.terminal {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal-header {
    background: #1a1a1e;
    padding: 0.65rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-body {
    padding: 1.5rem;
    color: var(--accent-green);
    min-height: 200px;
}

.cursor {
    display: inline-block;
    width: 6px;
    height: 15px;
    background: var(--accent-green);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-stack {
    display: grid;
    gap: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.6rem;
    border-radius: 18px;
    transition: transform 0.3s, border-color 0.3s, background 0.3s;
}

.panel:hover {
    transform: translateY(-5px);
    border-color: var(--primary-dim);
}

.panel h3 {
    margin: 1rem 0 0.8rem;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

.panel p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-card,
.capability-card,
.contact-card,
.timeline-item,
.contact-form,
.tool-panel,
.lookup-panel,
.result-card,
.metric-card,
.test-panel,
.test-notes,
.info-card,
.kb-section,
.shortcut-card,
.sites-panel,
.site-card,
.utilities-panel,
.utility-link-card,
.hero-badge,
.stat-card,
.feature-band,
.timeline-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    color: var(--text-main);
}

.service-card,
.capability-card,
.contact-card,
.timeline-item,
.contact-form,
.tool-panel,
.lookup-panel,
.result-card,
.metric-card,
.test-panel,
.test-notes,
.info-card,
.kb-section,
.shortcut-card,
.sites-panel,
.site-card,
.utilities-panel,
.utility-link-card,
.hero-badge,
.stat-card,
.feature-band,
.timeline-panel {
    padding: 1.5rem;
}

.tool-panel h1,
.test-panel h1,
.utilities-panel h1,
.sites-panel h1,
.kb-panel h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
}

.compact-panel strong,
#nepal-time {
    display: block;
    margin-top: 0.85rem;
    color: #fff;
    font-size: 1.3rem;
}

.stat-panel h3 {
    margin-top: 0.85rem;
}

.section-head {
    max-width: 54rem;
    display: grid;
    gap: 0.85rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
}

.about-grid {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.profile-panel {
    overflow: hidden;
    padding: 0;
}

.profile-image {
    display: block;
    width: 100%;
    min-height: 22rem;
    object-fit: cover;
    object-position: 52% 24%;
    filter: grayscale(1) contrast(1.04);
}

.profile-info {
    display: grid;
    gap: 0.5rem;
    padding: 1.5rem;
}

.profile-mark {
    width: 4rem;
    height: auto;
}

.story-panel p + p {
    margin-top: 1rem;
}

.info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-hero,
.test-hero,
.utilities-hero,
.sites-hero,
.kb-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 1.25rem;
    align-items: start;
    margin: 2rem 0 1.5rem;
}

.exchange-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.exchange-item {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.exchange-item strong {
    color: var(--text-main);
}

.icon-panel {
    text-align: center;
}

.icon-panel i {
    font-size: 2.2rem;
    color: var(--primary);
}

.utility-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.utility-link {
    text-decoration: none;
    display: block;
}

.utility-link-card,
.site-card {
    text-decoration: none;
    display: block;
}

.utility-link-card:hover,
.site-card:hover,
.utility-link:hover {
    border-color: var(--primary-dim);
}

.highlight-text {
    color: var(--primary);
    margin-bottom: 0.9rem;
}

.contact-shell {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.contact-panel {
    margin-top: 1.5rem;
}

.contact-quote {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.contact-links {
    display: grid;
    gap: 0.9rem;
}

.contact-links i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.contact-links a {
    text-decoration: none;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    padding: 3rem 0 2rem;
}

.test-shell .page-shell,
.tool-shell .page-shell,
.utilities-shell .page-shell,
.sites-shell .page-shell,
.kb-shell .page-shell {
    width: 100%;
}

.section-dark {
    background: rgba(20, 20, 24, 0.4);
}

.page-hero p {
    max-width: 42rem;
    margin-top: 1rem;
    color: var(--text-muted);
}

.kb-block {
    padding: 2rem 0;
}

.command-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.command-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card-strong);
}

.cmd {
    color: var(--primary);
    font-family: var(--font-mono);
}

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

.site-footer {
    display: grid;
    gap: 1rem;
    padding: 2rem 8%;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.footer-card,
.footer-copy {
    background: transparent;
}

.footer-brand {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-brand strong {
    color: var(--text-main);
}

.footer-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links-row a {
    text-decoration: none;
}

.footer-note {
    font-size: 0.85rem;
}


@media (max-width: 1080px) {
    .hero,
    .about-grid,
    .info-grid,
    .utility-grid,
    .compact-grid,
    .page-hero,
    .tool-hero,
    .test-hero,
    .utilities-hero,
    .sites-hero,
    .kb-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .page-hero {
        align-items: start;
    }

    .home-main {
        width: min(100%, calc(100% - 2rem));
    }

    .top-status-bar {
        width: min(100%, calc(100% - 2rem));
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    nav {
        width: 100%;
    }

    nav ul,
    .site-nav ul {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.9rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    nav.is-open ul,
    .site-nav.is-open ul {
        display: flex;
    }

    section {
        padding: 4rem 5%;
    }

    .home-main {
        width: min(100%, calc(100% - 1rem));
    }

    .top-status-bar {
        width: min(100%, calc(100% - 1rem));
    }

    .home-main section {
        padding-left: 0;
        padding-right: 0;
    }

    .hero-text h1,
    .page-hero h1 {
        font-size: 2.5rem;
    }

    .command-item,
    .footer-brand,
    .section-head-inline {
        flex-direction: column;
        align-items: start;
    }
}

/* Insights Section Styles - Premium Design */
.insights-main {
  padding-top: var(--nav-height, 80px);
  background: var(--bg-main, #0f172a);
  min-height: 100vh;
}

.section-hero-compact {
  padding: 6rem 1rem 4rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.section-hero-compact h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.insights-section {
  padding: 2rem 0 8rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (max-width: 1280px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

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

.insight-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.insight-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--color-primary, #3b82f6);
}

.insight-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.insight-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.insight-card:hover .insight-image {
  transform: scale(1.05);
}

.insight-date {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.insight-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.insight-number {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  color: var(--color-primary, #3b82f6);
  opacity: 0.7;
  margin-bottom: 0.5rem;
  display: block;
}

.insight-card h3 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #fff;
}

.insight-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.insight-link {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s ease;
}

.insight-link:hover {
  gap: 0.8rem;
  color: var(--color-primary, #3b82f6);
}

/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-number {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  text-decoration: none;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-number:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.pagination-number.active {
  background: var(--color-primary, #3b82f6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.pagination-btn {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

.pagination-dots {
  color: #475569;
}

@media (max-width: 768px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .pagination {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  padding: 2rem;
}

.modal-content {
  margin: 2% auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: scale(1.1);
  color: var(--color-primary);
}

.modal-image-container {
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-meta {
  padding: 2.5rem 2.5rem 1rem;
}

.insight-date-static {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-primary);
  opacity: 0.8;
  margin-bottom: 0.5rem;
  display: block;
}

.modal-meta h2 {
  font-size: 2.5rem;
  margin-top: 0.5rem;
  color: #fff;
}

.modal-body {
  padding: 0 2.5rem 3rem;
  line-height: 1.8;
  color: #cbd5e1;
  font-size: 1.1rem;
}

.modal-signature {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-signature p {
  color: #fff;
  font-weight: 700;
}

.role-small {
  font-size: 0.8rem;
  opacity: 0.6;
}

.read-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

@media (max-width: 768px) {
  .modal {
    padding: 1rem;
  }
  .modal-meta h2 {
    font-size: 1.8rem;
  }
}
