/* ===================================================
   custom.css — Sitraka Portfolio Modern Design Layer
   Loaded AFTER main.css to cleanly override styles
   =================================================== */

/* ---------- 0. CRITICAL FIX: BG Z-INDEX ---------- */
/* The original template's #bg sits at z-index:1 and covers
   the entire viewport. We need to push it behind everything. */
#bg {
  z-index: -1 !important;
}

#bg::before,
#bg::after {
  z-index: -1 !important;
}

/* ---------- 1. GOOGLE FONT OVERRIDE ---------- */
body,
input,
select,
textarea {
  font-family: 'Inter', 'Source Sans Pro', sans-serif;
}

/* ---------- 2. ANIMATED GRADIENT BACKGROUND ---------- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#bg {
  background: linear-gradient(
    135deg,
    #0d0d1a 0%,
    #0f2027 15%,
    #1a0533 30%,
    #0b1a2e 50%,
    #0f0c29 70%,
    #0d0d1a 100%
  ) !important;
  background-size: 400% 400% !important;
  animation: gradientShift 20s ease infinite;
}

/* Override the original overlay from main.css */
#bg::before {
  background-image: none !important;
  background-color: transparent !important;
}

#bg::after {
  background-image: none !important;
  background-color: transparent !important;
}

/* Floating ambient orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.35) 0%, transparent 70%);
  top: -120px;
  left: -120px;
  animation: orb1 22s ease-in-out infinite alternate;
}

body::after {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 201, 255, 0.25) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  animation: orb2 28s ease-in-out infinite alternate;
}

@keyframes orb1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 60px) scale(1.15); }
}

@keyframes orb2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, -50px) scale(1.2); }
}

/* ---------- 3. WRAPPER ---------- */
#wrapper {
  position: relative;
  z-index: 1;
}

/* ---------- 4. HEADER — GLASSMORPHISM ---------- */
#header {
  background: rgba(12, 10, 30, 0.5) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.5s ease;
}

#header:hover {
  box-shadow:
    0 8px 50px rgba(123, 47, 255, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---------- 5. LOGO ICON ---------- */
#header .logo .icon {
  display: inline-block;
  transition: transform 0.4s ease;
}

#header .logo:hover .icon {
  transform: scale(1.15) rotate(6deg);
}

/* Glowing ring behind logo on header hover */
#header .logo::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #7b2fff, #00c9ff, #7b2fff);
  opacity: 0;
  z-index: -1;
  filter: blur(8px);
  transition: opacity 0.4s ease;
  animation: spinRing 5s linear infinite;
}

#header:hover .logo::after {
  opacity: 0.5;
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- 6. H1 GRADIENT TEXT ---------- */
#header h1 {
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 40%, #60c3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.55rem;
  font-weight: 700;
}

/* ---------- 7. NAV LINKS ---------- */
#header nav ul li a {
  position: relative;
  letter-spacing: 0.15rem;
  font-weight: 600;
  transition: color 0.25s ease, letter-spacing 0.3s ease;
}

#header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7b2fff, #00c9ff);
  border-radius: 2px;
  transition: width 0.3s ease, left 0.3s ease;
}

#header nav ul li a:hover {
  color: #c4b5fd;
  letter-spacing: 0.22rem;
  border-bottom-color: transparent;
}

#header nav ul li a:hover::after {
  width: 100%;
  left: 0;
}

/* ---------- 8. ARTICLE PANELS — GLASSMORPHISM ---------- */
#main article {
  background: rgba(8, 6, 22, 0.65) !important;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: panelReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ---------- 9. SECTION HEADINGS ---------- */
h2.major {
  border-bottom: 2px solid transparent !important;
  border-image: linear-gradient(90deg, #7b2fff, #00c9ff, transparent) 1 !important;
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h3.major {
  border-bottom: 1px solid transparent !important;
  border-image: linear-gradient(90deg, rgba(123, 47, 255, 0.5), transparent) 1 !important;
}

article h3:not(.major) {
  color: #c4b5fd;
  font-weight: 700;
  letter-spacing: 0.12rem;
}

/* ---------- 10. SKILL BADGES ---------- */
article p b,
article p strong {
  background: linear-gradient(135deg, rgba(123, 47, 255, 0.2), rgba(0, 201, 255, 0.1));
  border: 1px solid rgba(123, 47, 255, 0.3);
  border-radius: 6px;
  padding: 3px 10px;
  color: #d8b4fe;
  font-size: 0.92em;
}

/* ---------- 11. CODE BLOCKS ---------- */
pre code {
  background: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid rgba(123, 47, 255, 0.25);
  border-radius: 12px;
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(123, 47, 255, 0.05);
  color: #86efac;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
}

code {
  background: rgba(123, 47, 255, 0.12) !important;
  border: 1px solid rgba(123, 47, 255, 0.25);
  border-radius: 5px;
  color: #d8b4fe;
}

/* ---------- 12. BUTTONS — GLOW HOVER ---------- */
.button.primary,
input[type="submit"].primary {
  background: linear-gradient(135deg, #7b2fff 0%, #5b21b6 100%) !important;
  border: none !important;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(123, 47, 255, 0.35);
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: 0.12rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.button.primary:hover,
input[type="submit"].primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 30px rgba(123, 47, 255, 0.55),
    0 0 0 1px rgba(123, 47, 255, 0.4);
  filter: brightness(1.12);
}

.button:not(.primary),
input[type="reset"] {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.button:not(.primary):hover,
input[type="reset"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 181, 253, 0.5) !important;
}

/* ---------- 13. FORM FIELDS — GLOW ---------- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  background: rgba(123, 47, 255, 0.06) !important;
  border-color: #7b2fff !important;
  box-shadow:
    0 0 0 2px rgba(123, 47, 255, 0.25),
    0 0 20px rgba(123, 47, 255, 0.12) !important;
  outline: none;
}

/* ---------- 14. SOCIAL ICONS ---------- */
ul.icons li a {
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

ul.icons li a:hover {
  transform: translateY(-4px) scale(1.12);
  color: #c4b5fd;
  box-shadow: 0 6px 20px rgba(123, 47, 255, 0.4);
  border-bottom-color: transparent;
}

/* ---------- 15. FOOTER ---------- */
#footer {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
}

#footer a {
  color: rgba(167, 139, 250, 0.55);
  border-bottom-color: transparent;
  transition: color 0.25s ease;
}

#footer a:hover {
  color: #a78bfa;
}

/* ---------- 16. HR DIVIDERS ---------- */
article hr {
  border: none !important;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 47, 255, 0.4), rgba(0, 201, 255, 0.35), transparent);
  margin: 2.5rem 0;
}

/* ---------- 17. SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7b2fff, #00c9ff);
  border-radius: 3px;
}

/* ---------- 18. IMAGES ---------- */
.image.main img {
  border-radius: 14px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(123, 47, 255, 0.15);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.image.main:hover img {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(123, 47, 255, 0.35),
    0 0 20px rgba(123, 47, 255, 0.15);
  transform: scale(1.008);
}

/* Remove the original overlay on images */
.image::before {
  opacity: 0.25 !important;
}

/* ---------- 19. CALCULATOR RESULT ---------- */
#result:not(:empty) {
  background: rgba(123, 47, 255, 0.08);
  border: 1px solid rgba(123, 47, 255, 0.25);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 20. LIST STYLING ---------- */
article ul:not(.actions):not(.icons) li {
  position: relative;
  transition: color 0.2s ease;
}

article:not(#luxaiops) ul:not(.actions):not(.icons) li::marker {
  color: #7b2fff;
}

#luxaiops ul:not(.actions):not(.icons) li::marker {
  color: #10b981;
}

article ul:not(.actions):not(.icons) li:hover {
  color: #d8b4fe;
}

#luxaiops ul:not(.actions):not(.icons) li:hover {
  color: #a7f3d0;
}

/* ---------- 21. LINKS IN ARTICLES ---------- */
article a {
  color: #c4b5fd;
  border-bottom-color: rgba(196, 181, 253, 0.3);
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

article a:hover {
  color: #e9d5ff;
  border-bottom-color: transparent;
}

/* ---------- 22. CLOSE BUTTON STYLING ---------- */
#main article .close {
  transition: color 0.3s ease, transform 0.3s ease;
}

#main article .close:hover {
  color: #c4b5fd;
  transform: rotate(90deg);
}

/* ---------- 23. PARTICLES CANVAS ---------- */
#particles-canvas {
  z-index: 0;
}

/* ---------- 24. LUXAIOPS SECTION CUSTOM STYLING ---------- */
#luxaiops.active {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(74, 222, 128, 0.15),
    0 0 40px rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.2) !important;
}

#luxaiops h2.major {
  border-image: linear-gradient(90deg, #10b981, #0ea5e9, transparent) 1 !important;
  background: linear-gradient(135deg, #ffffff 0%, #6ee7b7 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#luxaiops h3.major {
  border-image: linear-gradient(90deg, rgba(16, 185, 129, 0.5), transparent) 1 !important;
}

#luxaiops article h3:not(.major) {
  color: #6ee7b7;
}

#luxaiops hr {
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), rgba(14, 165, 233, 0.35), transparent);
}

#luxaiops a {
  color: #6ee7b7;
  border-bottom-color: rgba(110, 231, 183, 0.3);
}

#luxaiops a:hover {
  color: #a7f3d0;
}

#luxaiops .button.primary {
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

#luxaiops .button.primary:hover {
  box-shadow:
    0 8px 30px rgba(16, 185, 129, 0.55),
    0 0 0 1px rgba(16, 185, 129, 0.4);
}
