/* ===========================================================
   0. GLOBAL DARK/LIGHT MODE
   Uses system theme (prefers-color-scheme)
   =========================================================== */

:root {
  --bg-light: #f5f7fc;
  --bg-dark: #0d1117;

  --text-light: #222;
  --text-dark: #e6e6e6;

  --card-light: rgba(255, 255, 255, 0.45);
  --card-dark: rgba(20, 26, 39, 0.55);

  --border-light: rgba(255, 255, 255, 0.35);
  --border-dark: rgba(255, 255, 255, 0.18);

  --circuit-glow: #29b6f6;
}

/* Light Mode */
@media (prefers-color-scheme: light) {
  body {
    background: var(--bg-light) !important;
    color: var(--text-light);
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background: var(--bg-dark) !important;
    color: var(--text-dark);
  }
}

/* ===========================================================
   1. MOVING WWDC GRADIENT ORBS
   =========================================================== */

.tech-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.tech-bg::before,
.tech-bg::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  animation: float-orb 18s infinite ease-in-out alternate;
}

/* Orb 1 */
.tech-bg::before {
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, #4A73FF 0%, transparent 70%);
}

/* Orb 2 */
.tech-bg::after {
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, #00E0FF 0%, transparent 70%);
  animation-delay: 3s;
}

@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.15); }
  100% { transform: translate(-20px, 20px) scale(1.05); }
}


/* ===========================================================
   2. FLOATING ANIMATED CIRCUIT LINES
   =========================================================== */

.circuit-lines {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.28;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 94%,
      #4d9dff22 96%
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 94%,
      #4d9dff22 96%
    );
  animation: circuit-scroll 28s linear infinite;
}

@keyframes circuit-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-180px); }
}


/* ===========================================================
   3. HERO SECTION (Tech-themed)
   =========================================================== */

.tech-wrapper {
  position: relative;
  z-index: 3;
}

.tech-hero {
  padding: 48px;
  border-radius: 22px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-dark);
  background: rgba(20, 26, 39, 0.45);
  margin-bottom: 40px;
  box-shadow:
    0 10px 40px rgba(0,0,0,0.25),
    inset 0 0 30px rgba(0,200,255,0.08);
}

.tech-title {
  font-size: 42px;
  font-weight: 800;
  color: #dff3ff;
  text-shadow: 0 0 18px #4da0ff66;
}

.tech-subtitle {
  font-size: 18px;
  color: #aac7ff;
  line-height: 1.6;
}

/* ===========================================================
   4. CHIP TAGS (animated)
   =========================================================== */

.chip-tag {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0, 80, 160, 0.35);
  border: 1px solid #4da6ff66;
  color: #9fd6ff;
  font-size: 14px;
  font-weight: 600;
  display: inline-block;
  margin: 3px;
  box-shadow:
    inset 0 0 14px #009dff55,
    0 0 10px #007bff55;
  transition: 0.25s ease;
}

.chip-tag:hover {
  transform: translateY(-2px);
  background: rgba(0, 80, 160, 0.55);
  box-shadow:
    inset 0 0 22px #00c2ff88,
    0 0 14px #29b6f6;
}


/* ===========================================================
   5. TECH CARDS
   =========================================================== */

.tech-card {
  padding: 26px;
  border-radius: 18px;
  margin-bottom: 25px;
  background: rgba(15, 20, 30, 0.55);
  border: 1px solid #385375aa;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 0 22px rgba(0,200,255,0.06),
    0 0 18px rgba(0,140,255,0.10);
}

.tech-card li {
  color: #cfe0ff;
  font-size: 16px;
  line-height: 1.65;
}

.tech-card p {
  color: #d8e7ff;
  font-size: 17px;
  line-height: 1.7;
}

/* ===========================================================
   COLLAPSIBLE — MATCHING `.view-projects` COLOR SCHEME
   =========================================================== */

.gh-collapse {
  margin: 20px 0;
}

/* Remove default arrow */
.gh-collapse summary::-webkit-details-marker {
  display: none;
}

/* Summary styled exactly like `.view-projects` */
.gh-collapse summary {
  cursor: pointer;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 12px;

  background: rgba(0, 120, 255, 0.35);
  border: 1px solid #4da6ff66;
  color: #dff3ff;
  font-weight: 600;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  box-shadow:
    inset 0 0 14px #009dff55,
    0 0 12px #007bff55;

  transition: 0.25s ease;
}

.gh-collapse summary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 22px #00c2ff88,
    0 0 16px #29b6f6;
}

/* ===========================================================
   CLEAN & SMOOTH COLLAPSE ANIMATION
   =========================================================== */

.collapse-outer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);

  transition:
    max-height 0.5s ease,
    opacity 0.35s ease,
    transform 0.35s ease;
}

.gh-collapse[open] .collapse-outer {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
}

/* Box inside collapse (white card) */
.gh-box {
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.93);
  border-left: 4px solid #1f6feb;
  color: #000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gh-box a {
  color: #1f6feb;
  font-weight: 600;
}
.gh-box a:hover {
  text-decoration: underline;
}
