/* ========================
   Joker × Coding - Vivid Responsive Styles
   - Energetic purple <-> neon green animated gradient
   - Responsive grid + flex
   - Glows, hover, reveal animations
   ======================== */

/* Root colors & fonts */
:root{
  --bg-dark: #0b0010;
  --panel-dark: #100016;
  --white: #f4f4f8;
  --muted: #bfbfc6;

  --joker-purple: #8d00ff;
  --joker-green: #00ff7a;

  --glass: rgba(255,255,255,0.04);

  --font-heading: 'Playfair Display', serif;
  --font-mono: 'Roboto Mono', monospace;

  --max-width: 1200px;
  --radius: 10px;
}

/* Reset */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font-mono);
  color:var(--white);
  background:#050006;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

/* Animated background layer */
/* Animated Background – Dark & Light Themes */
.bg-animated {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(600px 400px at 10% 15%, rgba(141,0,255,0.12), transparent),
              radial-gradient(600px 400px at 90% 85%, rgba(0,255,122,0.10), transparent);
  animation: bg-shift-dark 12s ease-in-out infinite alternate;
  filter: blur(35px) saturate(130%);
  opacity: 0.9;
}

@keyframes bg-shift-dark {
  0% { background-position: 0% 0%; transform: scale(1); }
  50% { background-position: 100% 100%; transform: scale(1.05); }
  100% { background-position: 0% 0%; transform: scale(1); }
}

/* Light theme variant */
body.light-theme .bg-animated {
  background: radial-gradient(600px 400px at 20% 30%, rgba(106,27,154,0.10), transparent),
              radial-gradient(600px 400px at 80% 70%, rgba(0,200,83,0.10), transparent);
  animation: bg-shift-light 14s ease-in-out infinite alternate;
  filter: blur(45px) saturate(120%);
  opacity: 1;
}

@keyframes bg-shift-light {
  0% { background-position: 100% 0%; transform: scale(1); }
  50% { background-position: 0% 100%; transform: scale(1.05); }
  100% { background-position: 100% 0%; transform: scale(1); }
}

/* Container */
.container{
  max-width:var(--max-width);
  margin:0 auto;
  padding:0 20px;
  position:relative;
  z-index:5; /* above bg */
}

/* Header */
.site-header{
  position:fixed;
  top:12px;
  left:0;
  right:0;
  z-index:100;
  padding:8px 0;
  display:flex;
  justify-content:center;
  pointer-events:auto;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--panel-dark); /* ✅ solid background from your theme */
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1000;
}

/* Brand */
.logo{
  display:flex;
  align-items:baseline;
  text-decoration:none;
  color:var(--white);
  gap:8px;
  font-weight:700;
}
.logo-joker{font-size:1rem; opacity:0.9}
.logo-highlight{
  color:var(--joker-green);
  margin-left:4px;
  font-family:var(--font-heading);
  font-size:1.05rem;
  letter-spacing:0.4px;
}

/* Nav */
.main-nav{margin-left:auto; display:flex; align-items:center; gap:12px}
.nav-list{
  display:flex;
  gap:14px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-list a{
  color:var(--muted);
  text-decoration:none;
  font-weight:700;
  padding:8px 10px;
  border-radius:8px;
  transition: all .22s ease;
  position:relative;
}
.nav-list a:hover, .nav-list a.active{
  color:var(--white);
  text-shadow:0 0 10px rgba(0,255,122,0.25);
  transform:translateY(-2px);
}
.nav-list a::after{
  content:'';
  position:absolute;
  left:8px; right:8px; bottom:-8px;
  height:3px; border-radius:4px;
  background:linear-gradient(90deg,var(--joker-green),var(--joker-purple));
  transform:scaleX(0); transform-origin:left center;
  transition: transform .25s ease;
}
.nav-list a:hover::after, .nav-list a.active::after{ transform:scaleX(1) }

/* Hamburger for mobile */
.nav-toggle{
  display:none;
  background:transparent;
  border:0;
  cursor:pointer;
  padding:8px;
  border-radius:8px;
}
.hamburger{
  width:22px; height:2px; background:var(--white); display:block; position:relative;
  box-shadow:0 2px 8px rgba(141,0,255,0.08);
}
.hamburger::before, .hamburger::after{
  content:''; position:absolute; left:0; right:0; height:2px; background:var(--white); display:block;
}
.hamburger::before{ top:-6px }
.hamburger::after{ bottom:-6px }

/* Header controls (theme) */
.header-controls{ margin-left:8px }
.control-btn{
  background:linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border:1px solid rgba(255,255,255,0.04);
  color:var(--white);
  padding:8px;
  border-radius:8px;
  cursor:pointer;
}

/* Hero */
.hero-section{
  padding:160px 0 80px;
  min-height:85vh;
  display:flex;
  align-items:center;
  position:relative;
  z-index:2;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:36px;
  align-items:center;
}
.hero-left{ max-width:720px }
.hero-title{
  font-family:var(--font-heading);
  font-size:2.6rem;
  margin:0 0 10px;
  color:var(--white);
  line-height:1.02;
  text-shadow: 0 6px 30px rgba(141,0,255,0.08);
}
.highlight{
  color:var(--joker-green);
  text-shadow:0 0 20px rgba(0,255,122,0.12);
}
.hero-subtitle{ color:var(--joker-green); font-size:1.05rem; margin-bottom:10px; font-weight:700 }
.hero-tagline{ margin:18px 0 22px; color:var(--muted); font-size:1rem; min-height:30px }

/* CTA buttons */
.hero-cta{
  margin-bottom: 10px;
  padding: 10px;
}

.btn{ display:inline-block; text-decoration:none; padding:10px 16px; border-radius:8px; font-weight:700; transition:transform .18s ease, box-shadow .18s ease}
.primary-btn{
  background:linear-gradient(90deg,var(--joker-purple),var(--joker-green));
  color:#050006;
  box-shadow:0 10px 30px rgba(141,0,255,0.12);
  border:0;
}
.primary-btn:hover{ transform:translateY(-4px); box-shadow:0 16px 40px rgba(0,255,122,0.12) }

.secondary-btn{
  background:transparent; color:var(--joker-green); border:1px solid rgba(0,255,122,0.12);
}
.secondary-btn:hover{ background:rgba(0,255,122,0.06); transform:translateY(-4px) }

/* Light theme fix for buttons */
body.light-theme .github-btn,
body.light-theme .cv-btn,
body.light-theme .primary-btn,
body.light-theme .scroll-to-top,
body.light-theme .project-tag {
  color: #ffffff;
}

/* Hero right visuals */
.hero-right{ display:flex; flex-direction:column; gap:16px; align-items:center }
.avatar-orb {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(141,0,255,0.12), rgba(0,255,122,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floaty 6s ease-in-out infinite;
  border: 2px solid rgba(141, 0, 255, 0.25);
  box-shadow: 0 0 40px rgba(141, 0, 255, 0.15);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%; /* 👈 shifts the focus slightly downward */
  border-radius: 50%;
  filter: brightness(1.1) contrast(1.05) saturate(1.1);
  z-index: 2;
  transform: scale(1.05); /* 👈 zooms out slightly */
}

.orb-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.avatar-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(0, 255, 122, 0.25),
              0 0 80px rgba(141, 0, 255, 0.25);
  z-index: 0;
  mix-blend-mode: screen;
}

@keyframes floaty{ 0%{transform:translateY(0)} 50%{transform:translateY(-10px) rotate(1deg)} 100%{transform:translateY(0)} }
.avatar-face{ font-size:56px; filter:drop-shadow(0 8px 30px rgba(0,255,122,0.08)) }

/* small orbs */
.orbs-small{ display:flex; gap:8px; margin-top:6px }
.orb{ width:14px; height:14px; border-radius:50%; background:linear-gradient(90deg,var(--joker-green),var(--joker-purple)); box-shadow:0 6px 18px rgba(141,0,255,0.08); animation:orbPulse 2.8s infinite }
.s1{ animation-delay:.1s }
.s2{ animation-delay:.4s }
.s3{ animation-delay:.7s }
@keyframes orbPulse{ 0%{transform:scale(.85)}50%{transform:scale(1.12)}100%{transform:scale(.85)} }

/* Sections */
.section{ padding:72px 0; position:relative; z-index:4 }
.section--alt{ background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.06)); border-top:1px solid rgba(255,255,255,0.02) }
.section-title{
  font-family:var(--font-heading); font-size:1.8rem; color:var(--joker-purple); margin-bottom:24px; text-align:center;
  position:relative;
}
.section-title::after{ content:''; display:block; width:64px; height:4px; margin:12px auto 0; border-radius:4px; background:linear-gradient(90deg,var(--joker-green),var(--joker-purple)) }

/* About grid */
.about-grid{ display:grid; grid-template-columns: 1fr 320px; gap:28px; align-items:start }
.about-text p{ color:var(--muted); line-height:1.7; margin-bottom:12px; font-size:1rem }
.about-list{ list-style:none; padding:0; display:flex; flex-direction:column; gap:10px }
.about-list li{ background:linear-gradient(90deg, rgba(141,0,255,0.04), rgba(0,255,122,0.02)); padding:10px 12px; border-radius:8px; color:var(--white); font-weight:700 }

/* Skills */
.skills-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:18px }
.skill-card{ background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.04)); border-radius:12px; padding:16px; border:1px solid rgba(141,0,255,0.04) }
.skill-card h3{ margin:0 0 10px; color:var(--joker-green) }
.badges{ display:flex; gap:8px; flex-wrap:wrap }
.badges img{ height:42px; border-radius:6px; transition:transform .18s, filter .18s }
.badges img:hover{ transform:translateY(-6px) scale(1.04); filter:brightness(1.05) }

/* Projects */
.project-card{ background:linear-gradient(180deg, rgba(0,0,0,0.02), rgba(255,255,255,0.01)); padding:20px; border-radius:12px; border:1px solid rgba(141,0,255,0.04); margin-top:8px }
.project-head{ display:flex; justify-content:space-between; align-items:center; gap:12px }
.project-tag{ background:linear-gradient(90deg,var(--joker-green),var(--joker-purple)); color:#050006; padding:6px 10px; border-radius:999px; font-weight:800; font-size:.85rem }

/* Passions */
.passions-list{ display:flex; gap:14px; flex-wrap:wrap; list-style:none; padding:0; justify-content:center; margin-top:18px }
.passions-list li{ background:rgba(255,255,255,0.02); padding:10px 14px; border-radius:999px; font-weight:700 }

/* Footer */
.site-footer{ padding:28px 0; text-align:center; color:var(--muted); border-top:1px solid rgba(255,255,255,0.02) }
.footer-quote{ margin-top:8px; display:flex; gap:8px; justify-content:center; align-items:center }

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, var(--joker-purple), var(--joker-green));
  color: #050006;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(141, 0, 255, 0.12);
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s ease;
  z-index: 9999; /* ✅ keep it above everything */
}

.scroll-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto; /* ✅ allows clicking as soon as visible */
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 255, 122, 0.2);
}

/* Reveal animation */
.reveal{ opacity:0; transform:translateY(12px) scale(.995); transition:all .6s cubic-bezier(.2,.9,.2,1); will-change:transform,opacity }
.reveal.visible{ opacity:1; transform:none }

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr 300px; gap:20px }
  .skills-grid{ grid-template-columns: repeat(2,1fr) }
  .about-grid{ grid-template-columns: 1fr; }
  .nav-list{ gap:10px }
}
@media (max-width: 720px){
  .header-inner{ padding:10px; gap:8px }
  .nav-list{ display:none; position:absolute; top:64px; right:12px; background:linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.9)); padding:10px; border-radius:12px; flex-direction:column; width:200px; box-shadow:0 12px 40px rgba(0,0,0,0.6) }
  .nav-list.open{ display:flex }
  .nav-toggle{ display:block }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-right{ order:-1; align-items:center; margin-bottom:8px }
  .avatar-orb{ width:200px; height:200px }
  .skills-grid{ grid-template-columns:1fr }
  .project-card{ padding:16px }
  .section{ padding:56px 0 }
}

/* Extra vivid animated gradient glow on hover for interactive elements */
.btn:hover{ box-shadow:0 18px 50px rgba(141,0,255,0.12) }
a{ color:inherit }

/* Accessibility helpers */
.sr-only{ position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap }

/* Light theme adjustments */
body.light-theme {
  background: var(--bg-dark);
  color: var(--white);
}
body.light-theme .section--alt {
  background: rgba(0,0,0,0.03);
}
body.light-theme a,
body.light-theme .nav-list a {
  color: var(--muted);
}
body.light-theme .nav-list a:hover {
  color: var(--joker-purple);
}
body.light-theme .section-title {
  color: var(--joker-purple);
}

/* --- Light theme adjustments for key buttons --- */
body.light-theme .primary-btn,
body.light-theme .scroll-to-top,
body.light-theme .project-tag {
  color: #ffffff; /* ✅ force white text */
}

body.light-theme .secondary-btn {
  color: var(--joker-purple);
  border-color: var(--joker-purple);
}

body.light-theme .secondary-btn:hover {
  background: var(--joker-purple);
  color: #ffffff;
}

*, *::before, *::after {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.light-theme .header-inner {
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

