/* ═══════════════════════════════════════════════════════════
   PROJECTS PAGE — page-specific styles
   Requires: styles.css
═══════════════════════════════════════════════════════════ */

/* ── SCROLLBAR ── */
::-webkit-scrollbar        { width: 3px; }
::-webkit-scrollbar-track  { background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--gold-dim); }

/* ── PROGRESS BAR (top) ── */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--gold);
  z-index: 250;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── PAGE INTRO / HEADER ── */
.intro {
  padding: calc(var(--nav-h) + 80px) 0 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.intro-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.intro-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.intro-h1 {
  font-family: var(--font-display);
  font-size: clamp(54px, 18vw, 140px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--text);
  position: relative;
  margin-bottom: 28px;
}

.intro-h1 .dot { color: var(--gold); }

.intro-sub {
  font-size: clamp(14px, 1.8vw, 18px);
  font-style: italic;
  font-weight: 300;
  color: var(--sub);
  margin-top: 16px;
  max-width: 520px;
  line-height: 1.6;
  font-family: var(--font-serif);
}

.intro-count {
  position: absolute;
  right: 36px;
  bottom: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--faint);
  text-transform: uppercase;
}

.intro-jump-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.jump-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.jump-pill:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
  background: var(--surface-2);
}

.jump-pill .pill-num {
  color: var(--gold);
  font-weight: 600;
}

/* ── PROJECT SECTION ── */
.project {
  border-bottom: 1px solid var(--border);
  border-left: 2px solid var(--border);
  padding: 80px 28px 70px 32px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), border-left-color 0.8s ease;
}

.project.visible {
  opacity: 1;
  transform: translateY(0);
  border-left-color: var(--gold);
}

/* Ghost background number */
.bg-num {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(120px, 22vw, 220px);
  color: rgba(var(--accent-rgb), 0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

/* ── PROJECT TOP ROW ── */
.proj-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
}

.proj-top-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.proj-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
  padding-top: 6px;
  white-space: nowrap;
  text-transform: uppercase;
}

.proj-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--text);
}

.proj-meta { text-align: right; flex-shrink: 0; }
.proj-year { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--faint); display: block; margin-bottom: 10px; text-transform: uppercase; }

.proj-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius);
  text-transform: uppercase;
}

.proj-badge-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── HOOK (big italic quote) ── */
.proj-hook {
  font-size: clamp(17px, 2vw, 24px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text);
  max-width: 100%;
  margin-bottom: 48px;
  padding: 24px 28px;
  border-left: 3px solid var(--gold);
  background: var(--surface-2);
  border-radius: var(--radius);
  position: relative;
  font-family: var(--font-serif);
}

.hook-quote {
  display: none;
}

/* ── 3-COLUMN CONTENT GRID ── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.proj-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.proj-col:not(:last-child) {
  border-right: 1px solid var(--border-2);
  padding-right: 32px;
}

.field { display: flex; flex-direction: column; gap: 16px; }

.field-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.field-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.field-body {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(240, 247, 242, 0.90);
  font-family: var(--font-serif);
}

body.light .field-body { color: #06150b; }

/* Tech tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--faint);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius);
  text-transform: uppercase;
}

/* Big outcome number */
.outcome-big {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

/* ── PROJECT FOOTER / REPO LINK ── */
.proj-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.repo-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--faint);
  text-transform: uppercase;
}

.repo-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.repo-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.repo-link .arr { transition: transform 0.25s ease; }
.repo-link:hover .arr { transform: translate(4px, -4px); }

/* ── PAGE FOOTER ── */
footer.projects-footer {
  padding: 48px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}

.ft-name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--gold);
}

.ft-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-align: center;
  flex: 1;
  text-transform: uppercase;
}

.ft-contact {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-decoration: none;
  transition: color 0.2s;
  text-transform: uppercase;
}

.ft-contact:hover { color: var(--gold); }

/* ── RESPONSIVE & WIDE-SCREEN / LANDSCAPE OPTIMIZATIONS ── */
@media (min-width: 1280px) {
  .project {
    padding: 96px 40px 80px 48px;
  }
  .proj-grid {
    gap: 48px;
  }
  .proj-col:not(:last-child) {
    padding-right: 48px;
  }
  .field-body {
    font-size: 15px;
    line-height: 1.8;
  }
  .outcome-big {
    font-size: 64px;
  }
}

@media (min-width: 1600px) {
  .project {
    padding: 110px 54px 92px 64px;
  }
  .proj-grid {
    gap: 60px;
  }
  .proj-col:not(:last-child) {
    padding-right: 60px;
  }
  .field-body {
    font-size: 16px;
    line-height: 1.85;
  }
  .outcome-big {
    font-size: 72px;
  }
}

@media (max-width: 960px) {
  .project { padding: 60px 20px 50px 24px; }
  .proj-grid { grid-template-columns: 1fr; gap: 32px; }
  .proj-col:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border-2);
    padding-right: 0;
    padding-bottom: 28px;
  }
}

@media (max-width: 700px) {
  .intro { padding: calc(var(--nav-h) + 40px) 0 36px; }
  .project { padding: 48px 16px 40px 18px; }
  .proj-top { flex-direction: column; gap: 12px; }
  .proj-meta { text-align: left; }
  footer.projects-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ── COMPREHENSIVE MOBILE & TOUCH REDESIGN (<= 768px) ── */
@media (max-width: 768px) {
  .intro-h1 {
    font-size: clamp(42px, 12vw, 72px);
    line-height: 1.0;
  }

  .intro-sub {
    font-size: 15px;
    line-height: 1.65;
    max-width: 100%;
  }

  /* Horizontal swipeable project jump bar */
  .intro-jump-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    margin-right: -16px;
    padding-right: 16px;
    gap: 8px;
  }

  .intro-jump-bar::-webkit-scrollbar {
    display: none;
  }

  .jump-pill {
    flex-shrink: 0;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 11px;
  }

  /* Project Cards */
  .project {
    padding: 36px 16px 32px 18px !important;
    border-radius: 8px;
  }

  .proj-title {
    font-size: 22px;
    line-height: 1.25;
  }

  .field {
    padding: 16px 14px;
  }

  .field-title {
    font-size: 14px;
  }

  .field-body {
    font-size: 13.5px;
    line-height: 1.6;
  }

  .outcome-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .repo-link {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Flagship UAV panel */
  .hardware-panel-card {
    padding: 32px 16px 28px 18px !important;
  }
}

/* ── Category Filter Chips in Intro ── */
.proj-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 24px;
}
.proj-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--faint);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.proj-chip:hover {
  border-color: var(--nature);
  color: var(--nature);
  transform: translateY(-1px);
}
.proj-chip.active {
  background: var(--nature);
  color: #030705;
  border-color: var(--nature);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}
body.light .proj-chip {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}
body.light .proj-chip.active {
  background: var(--nature);
  color: #ffffff;
  border-color: var(--nature);
}
@media (max-width: 600px) {
  .proj-filter-bar {
    gap: 6px;
    margin: 16px 0 20px;
  }
  .proj-chip {
    font-size: 10px;
    padding: 5px 11px;
  }
}
