/* ==========================================================================
   KANISK GAUTAM — MONOCHROME / GRAYSCALE PORTFOLIO & VERTICAL RAILWAY PATH
   ========================================================================== */

:root {
  --bg-deep: #0a0a0a;
  --bg-panel: #121212;
  --bg-elevated: #1a1a1a;
  --bg-titlebar: #222222;
  --border-subtle: #2e2e2e;
  --border-strong: #525252;
  --border-highlight: #ffffff;
  --text-main: #f5f5f5;
  --text-secondary: #d4d4d4;
  --text-muted: #8c8c8c;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.04), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.03), transparent 45%),
    var(--bg-deep);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==========================================================================
   UIVERSE.IO BY AADIUM CARD (GRAYSCALE LAYOUT)
   ========================================================================== */
/* From Uiverse.io by aadium */
.card {
  width: 250px;
  height: 300px;
  background: #121212;
  border: 1px solid #404040;
  font-size: 14px;
  font-family: monospace;
  overflow: auto;
}

.titlebar {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 21px;
  font-weight: 450;
  background-color: #222222;
  width: 100%;
  text-align: right;
}

.card button {
  width: 40px;
  height: 35px;
  margin-left: -5px;
  border: 0;
  outline: 0;
  background: transparent;
  transition: 0.2s;
}

button svg path,
button svg rect,
button svg polygon {
  fill: #ffffff;
}

button svg {
  width: 10px;
  height: 10px;
}

.close:hover {
  background-color: #e81123;
}

.maximize:hover {
  background-color: #ffffff22;
}

.minimize:hover {
  background-color: #ffffff22;
}

#pre {
  overflow: auto;
  width: 100%;
  padding: 10px;
  height: auto;
  color: #e5e5e5;
}

.curlies { color: #a3a3a3; }
.sc { color: #8c8c8c; }
.rounds { color: #ffffff; }
.operator { color: #d4d4d4; }
.s1 { color: #ffffff; }
.s2 { color: #b0b0b0; }
.s3 { color: #e0e0e0; }
.s4 { color: #cccccc; }
.s5 { color: #f5f5f5; }
.s6 { color: #d8d8d8; }

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: monospace;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: monospace;
  font-size: 0.88rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  max-width: 1340px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card.hero-uiverse-card {
  width: 100%;
  min-height: 380px;
  height: auto;
  background: #121212;
  border: 1px solid #3f3f3f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  border-radius: 6px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card.hero-uiverse-card.strict-uiverse-size {
  width: 250px;
  height: 300px;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 14px;
  user-select: none;
  background-color: #1f1f1f;
  border-bottom: 1px solid #333333;
}

.titlebar-label {
  font-family: monospace;
  font-size: 13px;
  color: #b5b5b5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-controls {
  display: inline-flex;
  align-items: center;
}

.card button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#pre {
  padding: 26px 28px 30px;
}

.code-topline {
  font-size: 13px;
  margin-bottom: 14px;
  color: #888888;
}

.hero-main-para {
  font-size: clamp(1.7rem, 2.75vw, 2.5rem);
  line-height: 1.26;
  font-weight: 800;
  margin: 0.75rem 0 1.4rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-sub-para {
  font-size: clamp(1.18rem, 1.75vw, 1.5rem);
  line-height: 1.42;
  font-weight: 600;
  margin-top: 0.75rem;
  padding: 0.9rem 1.15rem;
  background: #1b1b1b;
  border-left: 4px solid #ffffff;
  color: #dcdcdc;
  border-radius: 0 6px 6px 0;
}

.code-bottomline {
  margin-top: 18px;
  font-size: 13px;
  color: #888888;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-mono {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  font-family: monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0a0a0a;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mono:hover {
  transform: translateY(-2px);
  background: #e0e0e0;
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.btn-mono.secondary {
  background: #141414;
  color: #ffffff;
  border-color: #404040;
}

.btn-mono.secondary:hover {
  border-color: #ffffff;
  background: #1f1f1f;
}

/* Right Side Monochrome Portrait */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: #121212;
  border: 1px solid #404040;
  padding: 14px;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.portrait-titlebar {
  background: #1f1f1f;
  padding: 7px 12px;
  font-family: monospace;
  font-size: 12px;
  color: #d4d4d4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border: 1px solid #303030;
}

.portrait-img-wrap {
  position: relative;
  overflow: hidden;
  background: #080808;
  aspect-ratio: 1 / 1;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.08);
  transition: transform 0.5s ease;
  display: block;
}

.portrait-frame:hover .portrait-img {
  transform: scale(1.03);
}

.portrait-caption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 2px 0;
}

/* ==========================================================================
   SECTION 2: MAIN PROJECTS (5) + SKILLS TO THE RIGHT OF PROJECT 05
   ========================================================================== */
.projects-skills-section {
  max-width: 1340px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
}

.section-header {
  margin-bottom: 3rem;
}

.section-eyebrow {
  font-family: monospace;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 720px;
  margin-top: 0.45rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem;
  align-items: stretch;
}

.project-card {
  background: #121212;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: #737373;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.85);
}

.project-window-bar {
  background: #1c1c1c;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  font-size: 12px;
  color: #b5b5b5;
  border-bottom: 1px solid #2e2e2e;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: #525252;
}

.window-dots span:nth-child(1) { background: #737373; }
.window-dots span:nth-child(2) { background: #525252; }
.window-dots span:nth-child(3) { background: #a3a3a3; }

.project-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #080808;
  aspect-ratio: 16 / 10;
  cursor: zoom-in;
  border-bottom: 1px solid #262626;
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s ease;
  display: block;
}

.project-card:hover .project-thumb {
  transform: scale(1.03);
}

.thumb-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid #525252;
  color: #ffffff;
  font-family: monospace;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-thumb-wrap:hover .thumb-zoom-hint {
  opacity: 1;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.project-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-index {
  font-family: monospace;
  font-size: 0.78rem;
  color: #d4d4d4;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  padding: 2px 8px;
  border-radius: 4px;
}

.edit-placeholder-btn {
  font-family: monospace;
  font-size: 0.74rem;
  color: #b5b5b5;
  background: #1a1a1a;
  border: 1px dashed #4a4a4a;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-placeholder-btn:hover {
  color: #ffffff;
  border-color: #ffffff;
  border-style: solid;
}

.project-title {
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  outline: none;
}

.project-title[contenteditable="true"],
.project-desc[contenteditable="true"] {
  background: #1f1f1f;
  border: 1px dashed #ffffff;
  padding: 6px 8px;
  border-radius: 4px;
}

.project-desc {
  color: #bdbdbd;
  font-size: 0.94rem;
  line-height: 1.6;
  outline: none;
}

.project-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: #d4d4d4;
  background: #171717;
  padding: 0.75rem 0.95rem;
  border-radius: 6px;
  border-left: 3px solid #737373;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.project-tag {
  font-family: monospace;
  font-size: 0.75rem;
  color: #e5e5e5;
  background: #1e1e1e;
  border: 1px solid #383838;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   SKILLS CARD (PLACED DIRECTLY TO THE RIGHT OF PROJECT 05)
   ========================================================================== */
.skills-container {
  background: #121212;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.skills-container:hover,
.skills-container.cloud-highlight-active {
  border-color: #ffffff;
  box-shadow: 0 18px 48px rgba(255, 255, 255, 0.12);
}

.skills-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  flex: 1;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 1.15rem;
  background: #1a1a1a;
  border: 1px solid #383838;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.94rem;
  font-weight: 700;
  color: #e5e5e5;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.skill-chip .skill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #737373;
  transition: all 0.2s ease;
}

.skill-chip:hover {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
}

.skill-chip:hover .skill-dot {
  background: #0a0a0a;
}

/* Cloud Spend Highlight — HIDDEN by default, SHOWN & HIGHLIGHTED when hovering over skills */
.cloud-waste-highlight {
  margin-top: auto;
  padding: 1.2rem 1.35rem;
  background: #ffffff;
  color: #0a0a0a;
  border: 2px solid #ffffff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.skills-container:hover .cloud-waste-highlight,
.skills-container.cloud-highlight-active .cloud-waste-highlight {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
}

.cloud-waste-text {
  font-family: monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0a0a0a;
  line-height: 1.45;
}

.cloud-providers-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cloud-badge {
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  background: #141414;
  color: #ffffff;
}

/* ==========================================================================
   SECTION 3: NORMAL SCROLLABLE RAILWAY & PATNA CYCLE PATH
   ========================================================================== */
.railway-journey-section {
  position: relative;
  width: 100%;
  padding: 4rem 0 8rem;
  border-top: 1px solid var(--border-subtle);
  background: #09090b;
}

.railway-track-stage {
  position: relative;
  max-width: 1280px;
  height: 3300px;
  margin: 0 auto;
}

#railway-canvas-2d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#railway-canvas-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}

.railway-stops-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.rail-stop-card {
  position: absolute;
  width: min(420px, 40vw);
  background: #121214;
  border: 1px solid #38383d;
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
  pointer-events: auto;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.rail-stop-card.side-left {
  left: 2.5rem;
}

.rail-stop-card.side-right {
  right: 2.5rem;
}

.rail-stop-card.side-right.far-offset {
  right: 1rem;
}

.rail-stop-card.active-stop {
  border-color: #ffffff;
  transform: translateY(-4px);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.9),
    0 0 28px rgba(255, 255, 255, 0.14);
}

.rail-stop-badge {
  display: inline-block;
  font-family: monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0a0a0a;
  background: #ffffff;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 0.65rem;
  letter-spacing: 0.04em;
}

.rail-stop-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.55rem;
}

.rail-stop-text {
  font-family: monospace;
  font-size: 0.96rem;
  line-height: 1.62;
  color: #e4e4e7;
  background: #18181b;
  padding: 0.9rem 1.05rem;
  border-left: 3px solid #ffffff;
  border-radius: 0 6px 6px 0;
}

.rail-corridor-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #18181b;
  border: 1px solid #52525b;
  color: #f4f4f5;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  pointer-events: auto;
}

.rail-corridor-pill.patna-switch-pill {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
}

/* ==========================================================================
   LIGHTBOX MODAL FOR PROJECT SCREENSHOTS
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 1100px;
  width: 100%;
  background: #141414;
  border: 1px solid #525252;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
}

.lightbox-bar {
  background: #222222;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  color: #ffffff;
}

.lightbox-close {
  background: #ffffff;
  color: #0a0a0a;
  border: none;
  padding: 4px 12px;
  font-family: monospace;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
}

.lightbox-img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  background: #080808;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 980px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding-top: 6rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .rail-stop-card {
    width: calc(100vw - 3rem);
    left: 1.5rem !important;
    right: auto !important;
  }
}
