/* ============================================================
   style.css — Kenny Patel resume, cyberpunk theme matching the
   live KiteStacks portal's own design tokens (see variables.css
   on the portal). Screen = full cyberpunk; print = clean/light.
   ============================================================ */

:root {
  --bg:         #05030f;
  --panel-bg:   rgba(8, 6, 22, 0.82);
  --cyan:       #00e5ff;
  --magenta:    #ff45c8;
  --purple:     #b040ff;
  --green:      #00e676;
  --blue:       #00b4ff;
  --yellow:     #ffd84a;
  --text:       #e6f3ff;
  --text-dim:   #6a8aaa;
  --text-muted: #3a5570;
  --font-display: 'Orbitron', sans-serif;
  --font-ui:      'Rajdhani', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg) radial-gradient(ellipse at top, rgba(176,64,255,0.1), transparent 60%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
}

.rs-page { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; padding: 60px 28px 80px; }

.rs-header { text-align: center; margin-bottom: 40px; }
.rs-name { font-family: var(--font-display); font-size: 40px; font-weight: 900; letter-spacing: 0.06em; }
.rs-name span { color: var(--magenta); }

.rs-subtitle {
  font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.25em;
  color: var(--cyan); margin-top: 10px; text-shadow: 0 0 12px rgba(0,229,255,0.4);
}

.rs-tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px;
}
.rs-tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; color: var(--text-dim);
  border: 1px solid rgba(230,243,255,0.15); border-radius: 20px; padding: 6px 14px;
  background: rgba(230,243,255,0.03); text-decoration: none; display: inline-block;
  cursor: pointer; transition: background 0.2s, box-shadow 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
}
.rs-tag:hover { color: var(--text); background: rgba(230,243,255,0.08); transform: translateY(-2px); }
.rs-tag-link {
  color: var(--cyan); border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.06);
  cursor: pointer; transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.rs-tag-link:hover { background: rgba(0,229,255,0.16); box-shadow: 0 0 14px rgba(0,229,255,0.3); transform: translateY(-2px); }

.rs-hero-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; margin-top: 22px;
}
.rs-hero-link {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-ui);
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em; color: var(--text);
  text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.rs-hero-link:hover { color: var(--cyan); border-color: var(--cyan); }

.rs-title {
  font-size: 14px; color: var(--text-dim); font-weight: 500; margin-top: 20px;
  max-width: 620px; margin-left: auto; margin-right: auto;
}
.rs-contact {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 14px;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
}
.rs-contact a { color: var(--text-dim); text-decoration: none; border-bottom: 1px dotted var(--text-muted); }
.rs-contact a:hover { color: var(--cyan); border-color: var(--cyan); }
.rs-print-only { display: none; }
.rs-pdf-only { display: none; }

.rs-section { margin-bottom: 36px; }
.rs-h2 {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--purple); border-bottom: 1px solid rgba(176,64,255,0.3); padding-bottom: 8px; margin-bottom: 18px;
}
.rs-summary { font-size: 15px; line-height: 1.7; color: var(--text); }

.rs-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-skill {
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan); border: 1px solid rgba(0,229,255,0.4);
  background: rgba(0,229,255,0.06); padding: 5px 12px; border-radius: 20px;
}

.rs-job { background: var(--panel-bg); border: 1px solid rgba(230,243,255,0.08); border-radius: 8px; padding: 18px 20px; margin-bottom: 14px; }
.rs-job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rs-job-title { font-family: var(--font-display); font-size: 16px; }
.rs-job-co { color: var(--cyan); font-size: 13px; margin-top: 2px; }
.rs-job-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); text-align: right; line-height: 1.5; }
.rs-job-bullets { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.65; color: var(--text); }
.rs-job-bullets li { margin-bottom: 6px; }

.rs-edu { background: var(--panel-bg); border: 1px solid rgba(230,243,255,0.08); border-radius: 8px; padding: 14px 20px; margin-bottom: 10px; }
.rs-edu-title { font-weight: 700; font-size: 14px; }
.rs-edu-co { color: var(--cyan); font-size: 13px; margin-top: 2px; }
.rs-edu-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.rs-badges-viewport {
  overflow: hidden; width: 100%;
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}
.rs-badges-track { display: flex; gap: 16px; width: max-content; animation: rs-badges-scroll 22s linear infinite; }
.rs-badges-track:hover { animation-play-state: paused; }
.rs-badges-dup { display: contents; }
@keyframes rs-badges-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.rs-badge {
  flex: 0 0 150px; background: var(--panel-bg); border: 1px solid rgba(230,243,255,0.08); border-radius: 8px;
  padding: 14px; text-align: center; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.rs-badge-featured { border-color: rgba(255,69,200,0.4); box-shadow: 0 0 20px rgba(255,69,200,0.1); }
.rs-badge img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 8px; }
.rs-badge-label { font-size: 11px; color: var(--text); line-height: 1.4; }
.rs-badge-label span { color: var(--text-muted); font-size: 10px; }
.rs-badge:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 0 18px rgba(0,229,255,0.25); }
.rs-badge-featured:hover { border-color: var(--magenta); box-shadow: 0 0 22px rgba(255,69,200,0.35); }

.rs-footer {
  text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  margin-top: 50px;
}

/* ---------- tag detail modal ---------- */
.tm-backdrop {
  position: fixed; inset: 0; background: rgba(5,3,15,0.85); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: rs-fade-up 0.2s ease-out both;
}
.tm-win {
  width: 100%; max-width: 460px; background: #0a0818; border: 1px solid rgba(0,229,255,0.35);
  border-radius: 10px; padding: 22px 24px; box-shadow: 0 0 50px rgba(0,229,255,0.15);
}
.tm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tm-title { font-family: var(--font-display); font-size: 15px; color: var(--cyan); letter-spacing: 0.05em; }
.tm-close { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; }
.tm-close:hover { color: var(--cyan); }
.tm-list { margin: 0; padding-left: 18px; }
.tm-list li { font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 10px; }
.tm-link {
  display: inline-block; margin-top: 4px; font-family: var(--font-mono); font-size: 12px;
  color: var(--magenta); text-decoration: none; border-bottom: 1px dotted var(--magenta);
}
.tm-link:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- cyberpunk animations ---------- */

/* drifting cyberpunk grid behind everything */
.rs-grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,229,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: rs-grid-drift 18s linear infinite;
  mask-image: radial-gradient(ellipse at top, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top, black, transparent 75%);
}
@keyframes rs-grid-drift {
  from { background-position: 0 0; }
  to   { background-position: 42px 42px; }
}

/* terminal cursor after the typewritten subtitle */
.rs-cursor { color: var(--cyan); animation: rs-cursor-blink 1s step-end infinite; }
@keyframes rs-cursor-blink { 50% { opacity: 0; } }

/* moving scanline overlay across the whole page */
.rs-scanline {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; mix-blend-mode: overlay;
  background: repeating-linear-gradient(
    to bottom, rgba(230,243,255,0.05) 0px, rgba(230,243,255,0.05) 1px,
    transparent 2px, transparent 4px
  );
}
.rs-scanline::after {
  content: ''; position: absolute; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(0,229,255,0.06), transparent);
  animation: rs-scan-sweep 7s linear infinite;
}
@keyframes rs-scan-sweep {
  0%   { top: -120px; }
  100% { top: 100%; }
}

/* glitch flicker on the name, settles after a couple seconds */
.rs-glitch { position: relative; display: inline-block; animation: rs-glitch-settle 2.4s ease-out 1; }
.rs-glitch::before, .rs-glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  overflow: hidden; opacity: 0;
}
.rs-glitch::before { color: var(--cyan); animation: rs-glitch-layer 2.4s ease-out 1; }
.rs-glitch::after  { color: var(--magenta); animation: rs-glitch-layer 2.4s ease-out 1 reverse; }
@keyframes rs-glitch-settle {
  0%   { text-shadow: 2px 0 var(--cyan), -2px 0 var(--magenta); }
  8%   { text-shadow: -3px 0 var(--cyan), 3px 0 var(--magenta); }
  16%  { text-shadow: 2px 0 var(--cyan), -2px 0 var(--magenta); }
  24%  { text-shadow: 0 0 var(--cyan), 0 0 var(--magenta); }
  40%  { text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta); }
  55%  { text-shadow: 0 0 transparent; }
  100% { text-shadow: 0 0 transparent; }
}
@keyframes rs-glitch-layer {
  0%   { opacity: 0.7; clip-path: inset(10% 0 70% 0); transform: translate(-2px, 0); }
  20%  { opacity: 0.7; clip-path: inset(60% 0 5% 0);  transform: translate(2px, 0); }
  40%  { opacity: 0.5; clip-path: inset(30% 0 40% 0); transform: translate(-1px, 0); }
  60%  { opacity: 0; }
  100% { opacity: 0; }
}

/* staggered fade/slide-up entrance for the header and every card */
.rs-header, .rs-h2, .rs-summary, .rs-skills, .rs-job, .rs-edu, .rs-badge {
  animation: rs-fade-up 0.6s ease-out both;
}
.rs-header { animation-delay: 0.05s; }
.rs-job:nth-of-type(1)  { animation-delay: 0.10s; }
.rs-job:nth-of-type(2)  { animation-delay: 0.18s; }
.rs-job:nth-of-type(3)  { animation-delay: 0.26s; }
.rs-job:nth-of-type(4)  { animation-delay: 0.34s; }
.rs-job:nth-of-type(5)  { animation-delay: 0.42s; }
.rs-edu:nth-of-type(1)  { animation-delay: 0.10s; }
.rs-edu:nth-of-type(2)  { animation-delay: 0.18s; }
.rs-badge:nth-of-type(1) { animation-delay: 0.05s; }
.rs-badge:nth-of-type(2) { animation-delay: 0.12s; }
.rs-badge:nth-of-type(3) { animation-delay: 0.19s; }
.rs-badge:nth-of-type(4) { animation-delay: 0.26s; }
.rs-badge:nth-of-type(5) { animation-delay: 0.33s; }
@keyframes rs-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* scanning underline sweep on section headers */
.rs-h2 { position: relative; overflow: hidden; }
.rs-h2::after {
  content: ''; position: absolute; left: -40%; bottom: -1px; width: 40%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: rs-h2-sweep 3.5s ease-in-out infinite;
}
@keyframes rs-h2-sweep {
  0%   { left: -40%; }
  60%  { left: 100%; }
  100% { left: 100%; }
}

/* continuous pulse glow — featured cert badge + the one clickable tag */
.rs-badge-featured {
  animation: rs-fade-up 0.6s ease-out both, rs-pulse-magenta 2.4s ease-in-out 0.6s infinite;
}
@keyframes rs-pulse-magenta {
  0%, 100% { box-shadow: 0 0 20px rgba(255,69,200,0.1); }
  50%      { box-shadow: 0 0 32px rgba(255,69,200,0.4); }
}
.rs-tag-link { animation: rs-pulse-cyan 2.4s ease-in-out infinite; }
@keyframes rs-pulse-cyan {
  0%, 100% { box-shadow: none; }
  50%      { box-shadow: 0 0 14px rgba(0,229,255,0.35); }
}

@media (prefers-reduced-motion: reduce) {
  .rs-scanline, .rs-glitch::before, .rs-glitch::after, .rs-h2::after, .rs-grid-bg, .rs-cursor { display: none; }
  .rs-header, .rs-h2, .rs-summary, .rs-skills, .rs-job, .rs-edu, .rs-badge, .rs-glitch, .rs-badge-featured, .rs-tag-link, .rs-badges-track { animation: none; }
  .rs-badges-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); width: auto; transform: none; }
  .rs-badges-dup { display: none; }
}

@media (max-width: 640px) {
  .rs-page { padding: 90px 16px 60px; }
  .rs-name { font-size: 30px; }
  .rs-job-head { flex-direction: column; }
  .rs-job-meta { text-align: left; }
}

/* ---------- print: clean, light, resume-normal ---------- */
@media print {
  .no-print, .rs-scanline { display: none !important; }
  .rs-pdf-only { display: block !important; }
  *, *::before, *::after { animation: none !important; text-shadow: none !important; }
  body { background: #fff; color: #111; font-size: 12px; }
  .rs-page { max-width: 100%; padding: 0 20px; }
  .rs-name { color: #000; text-shadow: none; }
  .rs-name span { color: #000; }
  .rs-subtitle { color: #000; text-shadow: none; }
  .rs-title { color: #333; }
  .rs-contact { color: #444; }
  .rs-contact a { color: #000; }
  .rs-print-only { display: inline; }
  .rs-h2 { color: #000; border-color: #999; }
  .rs-summary { color: #222; }
  .rs-skill { color: #000; border-color: #999; background: none; }
  .rs-job, .rs-edu, .rs-badge { background: #fff; border-color: #ccc; box-shadow: none; page-break-inside: avoid; }
  .rs-job-title, .rs-edu-title { color: #000; }
  .rs-job-co, .rs-edu-co { color: #333; }
  .rs-job-meta, .rs-edu-meta { color: #555; }
  .rs-job-bullets { color: #222; }
  .rs-badge-label { color: #000; }
  .rs-badge-label span { color: #555; }
  .rs-badges-viewport { overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .rs-badges-track {
    display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    width: auto; gap: 16px; animation: none; transform: none;
  }
  .rs-badges-dup { display: none; }
  .rs-badge { flex: none; }
  .rs-footer { color: #888; }
}
