:root {
  --bg: #ffffff;
  --panel: #0b0f14;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --accent: #2563eb;
  --code: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== HEADER ===== */
.repo-header {
  padding: 80px 24px 40px;
  max-width: 1100px;
  margin: auto;
}

.repo-header h1 {
  font-size: 2.4rem;
  font-weight: 600;
}

.repo-header p {
  color: var(--muted);
  margin-top: 10px;
}

/* ===== LAYOUT ===== */
.repo-layout {
  display: flex;
  max-width: 1200px;
  margin: auto;
  border-top: 1px solid var(--border);
}

/* ===== FILE LIST ===== */
.repo-files {
  width: 240px;
  border-right: 1px solid var(--border);
  padding: 24px;
}

.repo-files h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.repo-files ul {
  list-style: none;
  padding: 0;
}

.repo-files li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.repo-files li:hover {
  background: #f1f5f9;
}

.repo-files li.active {
  background: #e8efff;
  color: var(--accent);
  font-weight: 500;
}

/* ===== CODE PANEL ===== */
.code-panel {
  flex: 1;
  padding: 24px;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.code-header button {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.code-header button:hover {
  background: #f8fafc;
}

.code-view {
  background: var(--panel);
  color: var(--code);
  padding: 24px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== DISCLAIMER ===== */
.repo-disclaimer {
  max-width: 900px;
  margin: 80px auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== LOCKED FILE STYLE ===== */
.repo-files .locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.repo-files .locked:hover {
  color: #94a3b8;
}

/* ===============================
   MOBILE REPOSITORY BAR
================================ */
@media (max-width: 768px) {

  .repo-layout {
    flex-direction: column;
  }

  /* FILE LIST → BOTTOM BAR */
@media (max-width: 768px) {

  .repo-files {
    position: sticky;
    bottom: 0;
    margin-top: 12px;

    height: 64px;
    background: #0b0d12;
    border-top: 1px solid rgba(255,255,255,0.08);

    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 0 12px;
    z-index: 10;
  }
}

  .repo-files h3 {
    display: none;
  }

  .repo-files ul {
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .repo-files li {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    color: #e5e7eb;
    cursor: pointer;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .repo-files li.active {
    background: #2563eb;
    color: #ffffff;
  }

  .repo-files li.locked {
    opacity: 0.6;
  }

  /* CODE PANEL SPACE FOR BOTTOM BAR */
  .code-panel {
    padding-bottom: 90px;
  }
}

.repo-files li.locked::after {
  content: "🔒";
  margin-left: 6px;
  font-size: 0.75rem;
}

/* ===============================
   MOBILE CODE CONSOLE FIX
================================ */
@media (max-width: 768px) {

  /* CODE PANEL WRAPPER */
  .code-panel {
    flex: 1;
    padding: 12px;
    padding-bottom: 20px;
  }

  /* CODE VIEW (CONSOLE) */
  .code-view {
    max-height: 52vh;          /* 🔥 controls height */
    overflow-y: auto;          /* scroll inside console */
    font-size: 0.78rem;        /* mobile friendly text */
    line-height: 1.5;
    border-radius: 12px;
  }

  .code-view code {
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
  }
}

@media (max-width: 768px) {
  .code-view {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    background: #0b0d12;
  }
}

/* =================================
   MOBILE REPO BAR – FULL WIDTH FIX
================================= */
@media (max-width: 768px) {

  .repo-files {
    position: sticky;
    bottom: 0;

    width: 100vw;              /* 🔥 full screen width */
    max-width: 100vw;
    left: 0;

    height: 64px;
    background: #0b0d12;
    border-top: 1px solid rgba(255,255,255,0.08);

    display: flex;
    align-items: center;

    overflow-x: auto;          /* horizontal scroll */
    overflow-y: hidden;

    padding: 0 12px;
    margin: 0;

    z-index: 20;
    -webkit-overflow-scrolling: touch;
  }

  .repo-files ul {
    display: flex;
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: max-content;        /* 🔥 prevents cut-off */
  }

  .repo-files li {
    white-space: nowrap;       /* text break nahi hoga */
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    font-size: 0.8rem;
    flex-shrink: 0;
  }
}

/* ===== PRESENTATION SECTION ===== */
.project-presentation {
  max-width: 900px;
  margin: 120px auto;
  padding: 0 24px;
  text-align: center;
}

.presentation-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.presentation-sub {
  color: #475569;
  margin-bottom: 40px;
}

/* ===== SLIDER ===== */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #f8fafc;
}

.slide {
  display: none;
  position: absolute;
  inset: 0;
  animation: fade 1s ease;
}

.slide.active {
  display: block;
  position: relative;
}

.slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* Caption */
.slide-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ===== DOTS ===== */
.slider-dots {
  margin-top: 16px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  background: #cbd5f5;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: #2563eb;
}

/* Fade animation */
@keyframes fade {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* ===== MOBILE ===== */
/* ===== MOBILE PRESENTATION FIX ONLY ===== */
@media (max-width: 768px) {

  .presentation-section {
    padding: 1rem 0.5rem;
  }

  .presentation-wrapper {
    width: 100%;
  }

  .slides-container {
    width: 100%;
    aspect-ratio: 16 / 9;     /* 1919 x 1079 safe */
    height: auto;
    border-radius: 10px;
    overflow: hidden;
  }

  .slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* FULL image, no crop */
    background: #ffffff;
  }

  .slide-dots {
    margin-top: 0.6rem;
    gap: 8px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }
}

/* ===== AI LAB VISUAL ===== */
.ai-lab-visual {
  background: #05080f;
  padding: 4rem 1rem;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.lab-svg {
  width: 100%;
  max-width: 1000px;
  height: auto;
}

/* Grid */
.grid line {
  stroke: rgba(0, 170, 255, 0.08);
  stroke-width: 1;
}

/* Eye */
.eye-outline {
  fill: none;
  stroke: #00aaff;
  stroke-width: 2;
  animation: pulse 2.5s infinite;
}

.eye-core {
  fill: #00aaff;
  animation: eye-glow 2.5s infinite;
}

/* Computer */
.computer {
  fill: none;
  stroke: #00aaff;
  stroke-width: 2;
}

.computer-stand {
  fill: #00aaff;
}

/* Beam animation */
.beam {
  stroke: #00aaff;
  stroke-width: 2;
  stroke-dasharray: 12;
  animation: beam-flow 1.2s linear infinite;
  filter: drop-shadow(0 0 6px #00aaff);
}

/* Animations */
@keyframes beam-flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -24; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes eye-glow {
  0%, 100% { r: 12; }
  50% { r: 16; }
}

/* Mobile tuning */
@media (max-width: 768px) {
  .ai-lab-visual {
    padding: 2.5rem 0.5rem;
  }
}

/* ===== REAL EYE ===== */
.real-eye {
  animation: eye-breathe 3s ease-in-out infinite;
}

.eye-outline {
  fill: rgba(0, 170, 255, 0.03);
  stroke: #00aaff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(0,170,255,0.6));
}

.eye-iris {
  fill: #00aaff;
  opacity: 0.85;
  animation: iris-pulse 2.5s infinite;
}

.eye-pupil {
  fill: #020812;
}

/* Animations */
@keyframes eye-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes iris-pulse {
  0%, 100% { r: 14; opacity: 0.6; }
  50% { r: 17; opacity: 1; }
}

/* ===== LAB ROTATING TEXT ===== */
.lab-text {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  pointer-events: none;
}

.lab-text .text {
  position: absolute;
  opacity: 0;
  font-size: 1.05rem;
  letter-spacing: 0.4px;
  color: rgba(0, 170, 255, 0.85);
  text-shadow: 0 0 12px rgba(0,170,255,0.35);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: translateY(8px);
  white-space: nowrap;
}

.lab-text .text.active {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
  .lab-text {
    bottom: 35px;
  }

  .lab-text .text {
    font-size: 0.9rem;
    white-space: normal;
    padding: 0 18px;
  }
}