/* ============================================
   PROJECTS VINTAGE PARCHMENT OVERLAY
   ============================================ */

.parchment-projects-overlay {
  background: #f5f0e6 !important;
  background-image: radial-gradient(ellipse at center, #fcf9f2 0%, #ebe3d2 100%) !important;
  color: #1c1a17 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.paper-projects-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem 2rem;
  position: relative;
}

.projects-header-decorations {
  position: relative;
  width: 100%;
}

.compass-sketch-illustration {
  position: absolute;
  top: -2rem;
  left: -2.5rem;
  width: 100px;
  height: 120px;
  opacity: 0.88;
  pointer-events: none;
}

.projects-top-script-note {
  position: absolute;
  top: -1.2rem;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.projects-paper-header {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.projects-body-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
  position: relative;
}

.projects-spine-column {
  position: relative;
  width: 80px;
}

.projects-spine-svg {
  width: 80px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.projects-cards-column {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.paper-project-card-wrapper {
  position: relative;
}

.project-node-badge-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  position: relative;
}

.project-node-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ede4d3;
  border: 1.5px solid #3a342c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.project-node-circle svg {
  width: 22px;
  height: 22px;
}

.project-node-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: #7a7266;
  font-weight: 700;
}

.paper-project-card {
  background: #f6f1e7;
  background-image: radial-gradient(ellipse at center, #fcf9f3 0%, #ebe3d2 100%);
  border: 1px solid rgba(60, 50, 40, 0.18);
  border-radius: 14px;
  padding: 2.2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.project-card-body-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2rem;
  align-items: start;
}

.paper-project-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: #1c1a17;
  margin-bottom: 0.8rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.project-ext-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #5c5346;
  text-decoration: none;
  background: rgba(44, 40, 37, 0.06);
  border: 1px solid rgba(44, 40, 37, 0.16);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.project-ext-link:hover {
  color: #1c1a17;
  background: rgba(44, 40, 37, 0.12);
  border-color: rgba(44, 40, 37, 0.35);
  transform: translateY(-1px);
}

.project-ext-link.live-btn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #15803d;
  font-weight: 700;
  gap: 0.35rem;
}

.project-ext-link.live-btn:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.6);
  color: #166534;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0);
  }
}

.paper-project-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #3b352e;
  margin-bottom: 1.2rem;
}

.paper-project-bullets {
  margin-left: 1.2rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: #4a433a;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.paper-project-tech-footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tech-stack-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: #7a7266;
  font-weight: 700;
}

.paper-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-card-right-panel {
  background: rgba(244, 238, 226, 0.7);
  border: 1px dashed rgba(60, 50, 40, 0.22);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-meta-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #6e6659;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid rgba(60, 50, 40, 0.12);
  padding-bottom: 0.5rem;
}

.graph-illustration-box {
  position: relative;
  background: #fdfbf7;
  border: 1px solid rgba(60, 50, 40, 0.15);
  border-radius: 8px;
  padding: 0.8rem;
  overflow: hidden;
}

.code-snippet-tag {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(244, 238, 226, 0.95);
  border: 1px solid rgba(60, 50, 40, 0.2);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #3b352e;
}

.panel-insights-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.insights-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #7a7266;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.insight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: #3b352e;
}

.insight-bar {
  flex: 1;
  height: 6px;
  background: rgba(60, 50, 40, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.insight-bar .bar-fill {
  display: block;
  height: 100%;
  background: #3a342c;
  border-radius: 3px;
}

.insight-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #6e6659;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}

.architecture-diagram-box {
  background: #fdfbf7;
  border: 1px solid rgba(60, 50, 40, 0.15);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arch-flow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.arch-node svg {
  width: 22px;
  height: 22px;
  stroke: #4a433a;
}

.arch-node span {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: #3b352e;
}

.arch-arrow {
  font-family: var(--font-serif);
  color: #8c8273;
  font-size: 0.9rem;
}

.arch-storage-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  border-top: 1px dashed rgba(60, 50, 40, 0.15);
  padding-top: 0.6rem;
}

.arch-subnode {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: #5c5448;
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fdfbf7;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(60, 50, 40, 0.12);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #3b352e;
  font-weight: 600;
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #3a342c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.ai-models-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ai-model-box {
  background: #f4eee2;
  border: 1px solid rgba(60, 50, 40, 0.15);
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.model-icon {
  font-size: 1.1rem;
}

.model-title {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: #1c1a17;
}

.model-sub {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  color: #7a7266;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-val {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #1c1a17;
}

.metric-label {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: #7a7266;
}

.projects-footer-script {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  position: relative;
}

.footer-script-text {
  font-family: var(--font-handwriting);
  font-size: 1.85rem;
  color: #4a433a;
  transform: rotate(-1.5deg);
}

/* ---------- Authentic Vintage Book Responsive Styling (Projects Overlay) ---------- */

.parchment-projects-overlay .paper-close {
  position: fixed;
  top: calc(0.9rem + var(--sat));
  right: calc(0.9rem + var(--sar));
  z-index: 3000;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(245, 240, 230, 0.95) !important;
  border: 1px solid rgba(70, 58, 45, 0.25) !important;
  box-shadow: 0 3px 12px rgba(40, 30, 20, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #1c1a17 !important;
  transition: all 0.2s ease;
}

.parchment-projects-overlay .paper-close:hover,
.parchment-projects-overlay .paper-close:active {
  background: #1c1a17 !important;
  color: #f5f0e6 !important;
  border-color: #1c1a17 !important;
}

@media (max-width: 1024px) {
  .paper-projects-layout {
    padding: calc(3.8rem + var(--sat)) 1.5rem calc(4rem + var(--sab)) 1.5rem;
  }

  .project-card-body-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 768px) {
  .paper-projects-layout {
    padding: calc(3.5rem + var(--sat)) 1.1rem calc(4rem + var(--sab)) 1.1rem;
  }

  .projects-body-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin-top: 1.2rem;
  }

  .projects-spine-column {
    display: none;
  }

  .compass-sketch-illustration {
    display: block;
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    width: 36px;
    height: 36px;
    opacity: 0.7;
  }

  .projects-top-script-note {
    display: block;
    position: static;
    margin-top: 0.3rem;
    font-size: 1.05rem;
    color: #4a433a;
  }

  .paper-projects-header {
    margin-bottom: 1.4rem;
    padding: 0 0.2rem;
    text-align: center;
    position: relative;
  }

  .projects-main-title {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0.2rem 0;
  }

  .projects-subtitle-script {
    font-size: 1.15rem;
  }

  .projects-cards-column {
    gap: 1.8rem;
  }

  .project-node-badge-group {
    gap: 0.45rem;
    margin-bottom: 0.45rem;
  }

  .project-node-circle {
    width: 32px;
    height: 32px;
  }

  .project-node-circle svg {
    width: 16px;
    height: 16px;
  }

  .project-node-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  /* Compact Project Card */
  .paper-project-card {
    background: rgba(238, 230, 215, 0.45);
    border: 1px solid rgba(70, 58, 45, 0.15);
    border-radius: 8px;
    padding: 0.95rem 0.85rem;
    box-shadow: none;
    margin-bottom: 0.8rem;
    position: relative;
  }

  .project-card-body-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .paper-project-title {
    font-size: 1.12rem;
    line-height: 1.25;
    margin: 0 0 0.35rem 0;
    font-weight: 700;
  }

  .project-ext-link {
    font-size: 0.95rem;
  }

  .paper-project-desc {
    font-size: 0.76rem;
    line-height: 1.45;
    color: #3b352e;
    margin-bottom: 0.5rem;
  }

  .paper-project-bullets {
    margin-left: 0.9rem;
    font-size: 0.72rem;
    line-height: 1.4;
    gap: 0.28rem;
    margin-bottom: 0.6rem;
  }

  .tech-stack-label {
    font-size: 0.55rem;
    margin-bottom: 0.15rem;
    letter-spacing: 0.12em;
  }

  .paper-tech-pills {
    gap: 0.25rem;
  }

  .paper-pill,
  .project-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.12rem 0.38rem;
    background: rgba(60, 50, 40, 0.06);
    color: #3b352e;
    border: 1px solid rgba(70, 58, 45, 0.12);
    border-radius: 4px;
  }

  /* Compact Right Panel for Architecture & Metrics */
  .project-card-right-panel {
    background: rgba(232, 224, 208, 0.45);
    border: 1px dashed rgba(70, 58, 45, 0.18);
    border-radius: 6px;
    padding: 0.7rem 0.6rem;
    gap: 0.55rem;
  }

  .panel-meta-title {
    font-size: 0.55rem;
    padding-bottom: 0.25rem;
    margin-bottom: 0.1rem;
    letter-spacing: 0.12em;
  }

  .graph-illustration-box {
    padding: 0.45rem;
    border-radius: 6px;
  }

  .code-snippet-tag {
    font-size: 0.55rem;
    padding: 0.15rem 0.35rem;
    bottom: 0.3rem;
    right: 0.3rem;
  }

  .insights-title {
    font-size: 0.55rem;
    margin-bottom: 0.1rem;
  }

  .insight-item {
    font-size: 0.7rem;
    gap: 0.35rem;
  }

  .insight-bar {
    height: 4px;
  }

  .insight-val {
    font-size: 0.65rem;
    min-width: 38px;
  }

  .architecture-diagram-box {
    padding: 0.55rem 0.45rem;
    gap: 0.45rem;
    border-radius: 6px;
  }

  .arch-flow-row {
    gap: 0.25rem;
  }

  .arch-node svg {
    width: 16px;
    height: 16px;
  }

  .arch-node span {
    font-size: 0.62rem;
  }

  .arch-arrow {
    font-size: 0.7rem;
  }

  .arch-storage-row {
    gap: 1rem;
    padding-top: 0.35rem;
  }

  .arch-subnode {
    font-size: 0.65rem;
    gap: 0.25rem;
  }

  .stepper-row {
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
  }

  .step-item {
    font-size: 0.66rem;
    gap: 0.2rem;
  }

  .step-circle {
    width: 15px;
    height: 15px;
    font-size: 0.58rem;
  }

  .ai-models-row {
    gap: 0.3rem;
    margin-top: 0.3rem;
  }

  .ai-model-box {
    padding: 0.3rem 0.2rem;
    border-radius: 4px;
  }

  .model-icon {
    font-size: 0.8rem;
  }

  .model-title {
    font-size: 0.62rem;
  }

  .model-sub {
    font-size: 0.55rem;
  }

  .metrics-grid {
    gap: 0.3rem;
  }

  .metric-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1c1a17;
  }

  .metric-label {
    font-size: 0.55rem;
    color: #6e6659;
  }

  .projects-footer-script {
    margin-top: 2rem;
    gap: 0.4rem;
  }

  .footer-script-text {
    font-size: 1.15rem;
  }

  .paper-plane-sketch {
    display: block;
    width: 32px;
    height: 32px;
    opacity: 0.75;
  }
}

@media (max-width: 480px) {
  .paper-projects-layout {
    padding: calc(3.2rem + var(--sat)) 0.85rem calc(3.5rem + var(--sab)) 0.85rem;
  }

  .projects-main-title {
    font-size: 1.55rem;
  }
}
