/* ============================================================
   RFADELCLOUD.COM/PRO — Professional Light Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg:          #fdf8f2;
  --bg-alt:      #f5ede0;
  --surface:     #ffffff;
  --text:        #1a202c;
  --text-muted:  #718096;
  --accent:      #0066cc;
  --accent-dark: #0052a3;
  --accent-light:#ebf4ff;
  --border:      #e2e8f0;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:   0 12px 24px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --font-head:   'Poppins', sans-serif;
  --font-body:   'Inter', sans-serif;
  --radius:      8px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Background Canvas ---------- */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Ensure all content sits above canvas */
nav, section, footer, .theme-switcher { position: relative; z-index: 1; }

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--accent-dark); }

section { position: relative; }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Navigation ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(250, 251, 252, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: box-shadow var(--transition);
}

nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: calc(100% - 1.4rem);
}

/* ---------- Hero ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 2rem 4rem;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Subtle background decoration */
#hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 700px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.85;
}

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 1.2rem;
}

.hero-typed {
  font-size: 1rem;
  color: var(--text-muted);
  min-height: 1.6em;
  margin-bottom: 2.5rem;
}

.hero-typed .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.7s infinite;
  vertical-align: middle;
  border-radius: 1px;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

/* ---------- Section Layout ---------- */
.section-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}

.section-line {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 2.5rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text p {
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* Animated left accent bar */
.stat-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px;
  height: 0%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover::before {
  height: 100%;
}

.stat-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(4px) scale(1.02);
  border-color: var(--accent);
}

.stat-item:hover .stat-label {
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  transition: color 0.25s ease;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Skills — Network Layout ---------- */
.network-wrapper {
  position: relative;
}

#network-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  position: relative;
}

/* WiFi signal icon — injected by JS as inline SVG */
.wifi-icon {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  pointer-events: none;
}

.wifi-icon .wifi-arc {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  opacity: 0.35;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.wifi-icon .wifi-dot {
  fill: var(--accent);
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.skill-category:hover .wifi-arc,
.skill-category:hover .wifi-dot {
  opacity: 1;
}

.skill-category:hover .wifi-icon {
  filter: drop-shadow(0 0 4px rgba(0,102,204,0.6));
}

.skill-category:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(0,102,204,0.4);
}

.skill-category-name {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  padding-right: 1rem;
  border-bottom: 1px solid var(--border);
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.skill-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: default;
}

.skill-tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

.skill-tag a {
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
}

.skill-tag:hover a { color: #fff; }

/* ---------- Experience ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -1.87rem;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 3px solid var(--bg-alt);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent);
  transition: transform var(--transition);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.15rem;
}

.job-company {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.job-dates {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.job-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.job-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.job-bullets { list-style: none; padding: 0; }

.job-bullets li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.65;
}

.job-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  border-top: 3px solid var(--accent);
}

.edu-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.edu-school {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.edu-program {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.edu-dates {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.edu-bullets { list-style: none; padding: 0; }

.edu-bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.35rem;
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.55;
}

.edu-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.project-status {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.project-status.active {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.project-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  padding-right: 5rem;
  line-height: 1.3;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.project-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.contact-intro {
  max-width: 520px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.6rem 1.4rem;
  transition: all var(--transition);
}

.contact-link:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.3);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
}

/* ---------- Theme Switcher ---------- */
.theme-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e0e0e0;
  background: #0a0a0f;
  border: 1px solid rgba(255, 235, 11, 0.3);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  transition: all 0.25s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-decoration: none;
}

.theme-switcher:hover {
  color: #FFEB0B;
  border-color: #FFEB0B;
  box-shadow: 0 0 12px rgba(255, 235, 11, 0.3);
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 0; }
  .nav-links a { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
  .job-header { flex-direction: column; }
  .theme-switcher { bottom: 1rem; right: 1rem; font-size: 0.72rem; }
}
