/* ============================================================
   Chetan Injavarapu — Portfolio
   Black + cyan-blue theme · Space Grotesk + Inter
   Interactive 3D polyhedron hero · no terminal/code look
   ============================================================ */

:root {
  --bg: #04060c;
  --bg-soft: #080b15;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef3ff;
  --muted: #93a1c0;
  --muted-2: #64718f;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --sky: #38bdf8;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.1);
  --grad: linear-gradient(92deg, #22d3ee, #38bdf8, #3b82f6);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient cyan/blue glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(800px 420px at 85% -5%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(59, 130, 246, 0.1), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(34, 211, 238, 0.06), transparent 60%);
}

/* subtle starfield page background (main page only, kept dim so the car + globe stay dominant) */
body.star-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 30px 50px, rgba(255,255,255,0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 120px 180px, rgba(255,255,255,0.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 200px 90px, rgba(255,255,255,0.24) 0 1.5px, transparent 2px),
    radial-gradient(circle at 240px 220px, rgba(165,243,252,0.22) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80px 120px, rgba(255,255,255,0.12) 0 1px, transparent 1.5px),
    radial-gradient(circle at 300px 60px, rgba(255,255,255,0.10) 0 1px, transparent 1.5px),
    radial-gradient(circle at 200px 300px, rgba(255,255,255,0.14) 0 1.5px, transparent 2px),
    radial-gradient(circle at 380px 240px, rgba(255,255,255,0.09) 0 1px, transparent 1.5px);
  background-size: 260px 260px, 260px 260px, 260px 260px, 260px 260px, 430px 430px, 430px 430px, 430px 430px, 430px 430px;
  background-repeat: repeat;
}

main, header, footer { position: relative; z-index: 1; }

::selection { background: rgba(34, 211, 238, 0.3); }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(4, 6, 12, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--cyan); }
.nav-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--cyan); background: var(--accent-soft); }
/* Resume letters are highlighted (cyan) on every page — no button background or border */
.nav-links a.resume-cta {
  color: var(--cyan);
  background: transparent;
}
.nav-links a.resume-cta:hover { color: var(--cyan); background: transparent; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.25rem;
  padding: 6px 12px;
  cursor: pointer;
}
.theme-toggle {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 10px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 50%;
  font-size: 1.05rem; line-height: 1;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.theme-toggle:hover { background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 70px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 18px;
}
.eyebrow .wave { display: inline-block; animation: wave 2.2s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6.2vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 16px;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hl {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .role {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.hero p.lead { max-width: 620px; color: var(--muted); font-size: 1.06rem; margin-bottom: 34px; }
.hero p.lead strong { color: var(--text); font-weight: 600; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #031018;
  box-shadow: 0 14px 34px -12px rgba(34, 211, 238, 0.6);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.socials { display: flex; gap: 12px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.2s;
}
.socials a:hover {
  color: #031018;
  background: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(34, 211, 238, 0.6);
  text-decoration: none;
}
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Polyhedron stage ---------- */
.poly-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.poly-glow {
  position: absolute;
  width: 78%; height: 78%;
  top: 11%; left: 11%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.1) 55%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
#poly {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1;
  cursor: grab;
  touch-action: none;
}
#poly:active { cursor: grabbing; }
.poly-hint {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: rgba(34, 211, 238, 0.4); transform: translateY(-3px); }
.stat .num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.02em;
}
.stat .lbl { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

/* ---------- Sections ---------- */
section.block { padding: 76px 0; }

/* keep anchored sections clear of the fixed 66px nav when jumping from nav buttons.
   (#work and #contact already clear it via their own top padding, so they are left alone.) */
#about, #experience, #skills, #certifications { scroll-margin-top: 90px; }
.section-head { margin-bottom: 44px; max-width: 720px; }
.section-head .kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.04rem; }

/* ---------- Work / projects ---------- */
.work-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 34px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.work-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(34, 211, 238, 0.35);
}
.work-cover {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.work-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 160px at 50% 120%, rgba(0,0,0,0.35), transparent 70%);
}
.work-cover .w-num {
  font-family: var(--font-display);
  font-size: 5.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}
.work-cover .w-emoji {
  position: absolute;
  font-size: 3rem;
  z-index: 1;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.35));
}
.g1 { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.g2 { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.g3 { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.g4 { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.g5 { background: linear-gradient(135deg, #155e75, #22d3ee); }
.g6 { background: linear-gradient(135deg, #1e40af, #38bdf8); }
.g7 { background: linear-gradient(135deg, #082f49, #0ea5e9); }

.work-body { padding: 32px 34px 34px; }
.work-top { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.work-top .n {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--cyan);
  font-size: 1rem;
}
.work-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 700;
}
.work-body > p { color: var(--muted); margin: 12px 0 18px; max-width: 760px; }
.work-body > p strong { color: var(--text); font-weight: 600; }
.work-points { margin: 0 0 20px 2px; padding: 0; list-style: none; }
.work-points li {
  color: var(--muted);
  font-size: 0.96rem;
  padding-left: 24px;
  position: relative;
  margin-bottom: 9px;
}
.work-points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 600;
}
.work-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }

/* ---------- Main-page projects grid (small cards side by side) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.work-grid .work-item { margin-bottom: 0; }
.work-grid .work-cover { height: 170px; }
.work-grid .work-cover .w-num { font-size: 4rem; }
.work-grid .work-body { padding: 24px 24px 26px; }
.work-grid .work-points { display: none; }
.text-link {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.text-link:hover { color: var(--cyan); text-decoration: none; }
.text-link.ghost { color: var(--muted); border-bottom-color: var(--border-strong); }
.text-link.ghost:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 4px 0 6px; }
.tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
}

.center-cta { text-align: center; margin-top: 10px; }

/* filter buttons */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active { color: #031018; background: var(--cyan); border-color: var(--cyan); font-weight: 600; }
.work-item.hidden { display: none; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(34, 211, 238, 0.35);
}
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-left: 8px; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--border));
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 38px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
}
.tl-item:last-child { margin-bottom: 0; }
.tl-item .when {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}
.tl-item h3 { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.01em; font-weight: 700; }
.tl-item .where { color: var(--muted); margin-bottom: 12px; }
.tl-item ul { margin: 0; padding: 0; list-style: none; }
.tl-item ul li { color: var(--muted); margin-bottom: 8px; padding-left: 22px; position: relative; }
.tl-item ul li::before { content: "–"; position: absolute; left: 0; color: var(--cyan); }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.edu-card .when { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.edu-card h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.edu-card .school { color: var(--muted); margin-bottom: 14px; }
.edu-card .gpa {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 6px 16px;
  border-radius: 999px;
}

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-layout p { color: var(--muted); margin-bottom: 18px; font-size: 1.03rem; }
.about-layout p strong { color: var(--text); font-weight: 600; }
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 18px;
}
.info-card .ic-emoji { font-size: 1.9rem; margin-bottom: 12px; }
.info-card h3 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; margin-bottom: 6px; }
.info-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Profile terminal card ---------- */
.profile-tag { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.profile-card { background: #0a0f1e; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.profile-bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.profile-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.profile-bar .dot.red { background: #f87171; }
.profile-bar .dot.yellow { background: #facc15; }
.profile-bar .dot.green { background: #4ade80; }
.profile-rows { padding: 8px 20px 16px; }
.profile-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 13px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.profile-row:last-child { border-bottom: none; }
.pr-label { color: #64748b; font-size: 0.78rem; letter-spacing: 0.1em; }
.pr-value { color: var(--cyan); font-size: 0.86rem; text-align: right; word-break: break-all; }
.pr-link { text-decoration: none; }
.pr-link:hover { text-decoration: underline; }
.pr-badge { background: rgba(34,197,94,0.15); color: #4ade80; font-size: 0.72rem; letter-spacing: 0.06em; padding: 5px 10px; border-radius: 6px; white-space: nowrap; }

/* ---------- Resume page ---------- */
.resume-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 44px; }
.resume-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  max-width: 880px;
}
.resume-doc h1 { font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.02em; font-weight: 700; }
.resume-doc .r-sub { color: var(--cyan); font-weight: 600; margin: 6px 0 4px; }
.resume-doc .r-contact { color: var(--muted); font-size: 0.94rem; margin-bottom: 8px; }
.resume-doc .r-contact a { color: var(--muted); }
.resume-doc h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 8px;
  margin: 34px 0 18px;
  display: inline-block;
}
.resume-doc h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 2px; }
.resume-doc .r-meta { color: var(--muted-2); font-size: 0.88rem; margin-bottom: 10px; }
.resume-doc ul { margin: 0 0 8px 4px; padding: 0; list-style: none; }
.resume-doc ul li { color: var(--muted); font-size: 0.95rem; margin-bottom: 8px; padding-left: 20px; position: relative; }
.resume-doc ul li::before { content: "•"; position: absolute; left: 0; color: var(--cyan); }
.resume-doc .r-skill-line { color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; }
.resume-doc .r-skill-line strong { color: var(--text); font-weight: 600; }
.resume-doc p.r-skill-line { max-width: none; }

/* ---------- Case study ---------- */
.case-body { max-width: 780px; }
.case-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 38px 0 14px;
  letter-spacing: -0.015em;
}
.case-body p, .case-body li { color: var(--muted); }
.case-body p { margin-bottom: 16px; }
.case-body p strong { color: var(--text); font-weight: 600; }
.case-body ul { margin: 0 0 16px 4px; padding: 0; list-style: none; }
.case-body ul li { margin-bottom: 10px; padding-left: 24px; position: relative; }
.case-body ul li::before { content: "→"; position: absolute; left: 0; color: var(--cyan); }
.back-link { display: inline-block; margin-bottom: 28px; font-weight: 600; }

/* ---------- Contact CTA / footer ---------- */
.contact-cta { text-align: center; padding: 90px 0; }
.contact-cta .kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.contact-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 16px;
}
.contact-cta p { color: var(--muted); max-width: 560px; margin: 0 auto 32px; font-size: 1.05rem; }
.contact-cta .btn-row { justify-content: center; margin-bottom: 0; }

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 44px;
  color: var(--muted-2);
  font-size: 0.9rem;
}
.footer-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  #poly { width: min(340px, 90vw); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(4, 6, 12, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 4%;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 16px; }
  .hero { padding: 124px 0 56px; }
  .skills-grid { grid-template-columns: 1fr; }
  .work-body { padding: 26px 24px 28px; }
  .work-cover { height: 170px; }
  .work-cover .w-num { font-size: 4rem; }
}

/* ---------- Light mode: Golden daylight (Daybreak amber) ---------- */
html[data-theme="light"] {
  --bg: #faf7f2;
  --bg-soft: #fffdf9;
  --surface: rgba(0, 0, 0, 0.04);
  --surface-2: rgba(0, 0, 0, 0.07);
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.18);
  --text: #1c1917;
  --muted: #57534e;
  --muted-2: #78716c;
  --cyan: #ef3d1a;
  --blue: #c2410c;
  --sky: #f97316;
  --accent: #ef3d1a;
  --accent-soft: rgba(239, 61, 26, 0.10);
  --grad: linear-gradient(92deg, #ef2d1a, #ea580c, #f97316);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.16);
}

/* the fixed night glow is switched off in day mode; the sunset below carries the warmth */
html[data-theme="light"] body::before {
  background: none;
}
/* fixed gradient sunset, visible everywhere like the mockup: deep red top, orange middle, warm peach bottom. Clouds are strong enough to actually see. No stripes, no rays. */
html[data-theme="light"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 260px 70px at 12% 14%, rgba(255, 246, 230, 0.55), transparent 70%),
    radial-gradient(ellipse 200px 55px at 38% 10%, rgba(255, 246, 230, 0.50), transparent 70%),
    radial-gradient(ellipse 300px 60px at 68% 20%, rgba(255, 246, 230, 0.55), transparent 70%),
    radial-gradient(ellipse 220px 50px at 85% 34%, rgba(255, 246, 230, 0.45), transparent 70%),
    radial-gradient(ellipse 180px 45px at 25% 42%, rgba(255, 246, 230, 0.40), transparent 70%),
    radial-gradient(ellipse 340px 36px at 55% 58%, rgba(255, 246, 230, 0.35), transparent 70%),
    radial-gradient(ellipse 80% 35% at 50% 68%, rgba(251, 146, 60, 0.45), transparent 70%),
    linear-gradient(180deg, #991b1b 0%, #dc2626 6%, #ef2d1a 12%, #f97316 24%, #fb923c 44%, #fdba74 68%, #ffedd5 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
html[data-theme="light"] ::selection { background: rgba(234, 88, 12, 0.25); }
html[data-theme="light"] .nav { background: rgba(250, 247, 242, 0.85); }
html[data-theme="light"] .btn-primary { box-shadow: 0 14px 34px -12px rgba(234, 88, 12, 0.45); }
html[data-theme="light"] .socials a:hover { box-shadow: 0 10px 24px -8px rgba(234, 88, 12, 0.45); }
html[data-theme="light"] .poly-glow {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255, 244, 214, 0.95), rgba(251, 146, 60, 0.45) 55%, transparent 70%);
}

/* hero readability on the sunset: gradient word goes solid, lead darkens, stats stay translucent but their text goes dark so they still read */
html[data-theme="light"] .hero .grad-text {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
}
html[data-theme="light"] .hero .role { color: var(--text); }
html[data-theme="light"] .hero p.lead { color: #292524; }
html[data-theme="light"] .hero .stat .num { color: var(--text); }
html[data-theme="light"] .hero .stat .lbl { color: #292524; }
html[data-theme="light"] .stat:hover { border-color: rgba(234, 88, 12, 0.4); }
html[data-theme="light"] .work-item:hover,
html[data-theme="light"] .skill-card:hover { border-color: rgba(234, 88, 12, 0.35); }
html[data-theme="light"] .tl-item::before { box-shadow: 0 0 14px rgba(234, 88, 12, 0.4); }
html[data-theme="light"] .edu-card .gpa { border-color: rgba(234, 88, 12, 0.3); }
html[data-theme="light"] .profile-card { background: #fffdf9; }
html[data-theme="light"] .profile-row { border-bottom-color: rgba(0, 0, 0, 0.10); }
html[data-theme="light"] .pr-badge { background: rgba(34, 197, 94, 0.12); color: #15803d; }

/* project covers go warm: red-orange sunset gradients, no yellow */
html[data-theme="light"] .g1 { background: linear-gradient(135deg, #ef2d1a, #f97316); }
html[data-theme="light"] .g2 { background: linear-gradient(135deg, #dc2626, #ea580c); }
html[data-theme="light"] .g3 { background: linear-gradient(135deg, #f43f1d, #fb923c); }
html[data-theme="light"] .g4 { background: linear-gradient(135deg, #c2410c, #f04a1d); }
html[data-theme="light"] .g5 { background: linear-gradient(135deg, #ef2d1a, #ea580c); }
html[data-theme="light"] .g6 { background: linear-gradient(135deg, #f43f1d, #f97316); }
html[data-theme="light"] .g7 { background: linear-gradient(135deg, #dc2626, #f43f1d); }

@media (max-width: 680px) {
  html[data-theme="light"] .nav-links { background: rgba(250, 247, 242, 0.98); }
}

/* light-mode birds: small dark silhouettes flying across the sunset sky, day only.
   The layer sits above the sky (z-index 1) but below content, which shares z-index 1
   and comes later in the DOM, so birds fly behind text and cards. */
.birds { display: none; position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
html[data-theme="light"] .birds { display: block; }
.bird { position: absolute; left: 0; animation: birdFly linear infinite; }
.bird svg { display: block; width: 100%; height: auto; animation: birdFlap ease-in-out infinite; transform-origin: center; }
.b1 { top: 14%; width: 26px; animation-duration: 38s; animation-delay: 0s; }
.b1 svg { animation-duration: 0.55s; }
.b2 { top: 19%; width: 20px; animation-duration: 46s; animation-delay: -12s; }
.b2 svg { animation-duration: 0.65s; }
.b3 { top: 24%; width: 30px; animation-duration: 33s; animation-delay: -6s; }
.b3 svg { animation-duration: 0.5s; }
.b4 { top: 17%; width: 18px; animation-duration: 52s; animation-delay: -24s; }
.b4 svg { animation-duration: 0.7s; }
.b5 { top: 28%; width: 22px; animation-duration: 42s; animation-delay: -18s; animation-direction: reverse; }
.b5 svg { animation-duration: 0.6s; }
.b6 { top: 44%; width: 24px; animation-duration: 40s; animation-delay: -8s; }
.b6 svg { animation-duration: 0.6s; }
.b7 { top: 52%; width: 19px; animation-duration: 48s; animation-delay: -20s; }
.b7 svg { animation-duration: 0.5s; }
.b8 { top: 61%; width: 27px; animation-duration: 36s; animation-delay: -30s; animation-direction: reverse; }
.b8 svg { animation-duration: 0.7s; }
@keyframes birdFly { from { transform: translateX(-10vw); } to { transform: translateX(110vw); } }
@keyframes birdFlap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.45); } }
@media (prefers-reduced-motion: reduce) { html[data-theme="light"] .birds { display: none; } }
