/* =============================================
   CSS VARIABLES – DARK (DEFAULT) & LIGHT MODE
   ============================================= */

:root {
  --bg-color: #050505;
  --text-color: #eaeaea;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(0, 245, 255, 0.12);
  --card-hover-shadow: 0 0 24px rgba(0,245,255,0.3), 0 0 48px rgba(124,255,0,0.15);
  --accent: #00ffcc;
  --neon-a: #00f5ff;
  --neon-b: #7cff00;
  --neon-gradient: linear-gradient(90deg, #00f5ff, #7cff00);
  --navbar-bg: rgba(0, 0, 0, 0.35);
  --navbar-scrolled: rgba(0, 0, 0, 0.6);
  --input-bg: #111;
  --input-border: #333;
  --scrollbar-track: rgba(255,255,255,0.05);
  --form-label-color: #aaa;
}

.light-mode {
  --bg-color: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --card-bg: rgba(255,255,255,0.85);
  --card-border: rgba(0, 170, 136, 0.2);
  --card-hover-shadow: 0 0 24px rgba(0,170,136,0.25), 0 0 48px rgba(0,170,136,0.12);
  --accent: #00aa88;
  --neon-a: #0ea5e9;
  --neon-b: #10b981;
  --neon-gradient: linear-gradient(90deg, #0ea5e9, #10b981);
  --navbar-bg: rgba(255,255,255,0.7);
  --navbar-scrolled: rgba(255,255,255,0.92);
  --input-bg: #fff;
  --input-border: #cbd5e1;
  --scrollbar-track: rgba(0,0,0,0.07);
  --form-label-color: #64748b;
}

::selection {
    background-color: green;  /* Highlight background */
    color: white;             /* Text color */
}

::-moz-selection {
    background-color: green;  /* For Firefox */
    color: white;
}

/* =============================================
   BASE RESET & BODY
   ============================================= */

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

html {
  scroll-behavior: auto;
}

/* =============================================
   PREMIUM BACKGROUND SYSTEM
   ----------------------------------------------
   Dark : deep navy → near-black gradient with
          subtle cyan / mint glow blobs.
   Light: icy white → soft cyan gradient with
          gentle aqua / mint glow blobs.
   ============================================= */

:root {
  --bg-grad:
    radial-gradient(1100px 700px at 12% -8%, rgba(0, 200, 255, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 100% 10%, rgba(60, 255, 170, 0.07), transparent 65%),
    radial-gradient(900px 800px at 50% 110%, rgba(80, 110, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #050a18 0%, #060b1c 40%, #04060f 100%);

  --grid-line: rgba(255, 255, 255, 0.035);
  --grid-mask: radial-gradient(ellipse at center, #000 35%, transparent 80%);

  --blob-1: radial-gradient(circle at 50% 50%, rgba(0, 220, 255, 0.45), rgba(0, 220, 255, 0) 65%);
  --blob-2: radial-gradient(circle at 50% 50%, rgba(80, 255, 180, 0.35), rgba(80, 255, 180, 0) 65%);
  --blob-3: radial-gradient(circle at 50% 50%, rgba(110, 130, 255, 0.30), rgba(110, 130, 255, 0) 65%);
}

.light-mode {
  --bg-grad:
    radial-gradient(1100px 700px at 10% -10%, rgba(14, 165, 233, 0.18), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(16, 185, 129, 0.12), transparent 65%),
    radial-gradient(900px 800px at 50% 110%, rgba(125, 200, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #f6fbff 0%, #eaf4ff 50%, #f1f9ff 100%);

  --grid-line: rgba(15, 23, 42, 0.045);
  --grid-mask: radial-gradient(ellipse at center, #000 40%, transparent 85%);

  --blob-1: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.35), rgba(56, 189, 248, 0) 65%);
  --blob-2: radial-gradient(circle at 50% 50%, rgba(45, 212, 191, 0.28), rgba(45, 212, 191, 0) 65%);
  --blob-3: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0) 65%);
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.4s ease;
  will-change: background-color;
  cursor: none;
}

/* Soft grid overlay (masked so it fades at edges) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: var(--grid-mask);
          mask-image: var(--grid-mask);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s;
}

/* Section separator soft glow line at the very bottom of viewport */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(0, 220, 255, 0.06), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(80, 255, 180, 0.05), transparent 70%);
  z-index: 0;
}

.light-mode body::after {
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(14, 165, 233, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(16, 185, 129, 0.07), transparent 70%);
}

/* Subtle noise texture (premium grain) */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  mix-blend-mode: overlay;
  transition: opacity 0.4s;
}

.light-mode .noise-overlay {
  opacity: 0.04;
  mix-blend-mode: multiply;
}

/* =============================================
   FLOATING GLOW BLOBS (animated background)
   ============================================= */

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.bg-decor .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.85;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.bg-decor .blob-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -120px;
  background: var(--blob-1);
  animation: floatBlob1 22s ease-in-out infinite alternate;
}

.bg-decor .blob-2 {
  width: 580px;
  height: 580px;
  bottom: -180px;
  right: -160px;
  background: var(--blob-2);
  animation: floatBlob2 26s ease-in-out infinite alternate;
}

.bg-decor .blob-3 {
  width: 460px;
  height: 460px;
  top: 38%;
  left: 55%;
  background: var(--blob-3);
  animation: floatBlob3 30s ease-in-out infinite alternate;
}

@keyframes floatBlob1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(80px, 60px, 0) scale(1.08); }
}

@keyframes floatBlob2 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-90px, -70px, 0) scale(1.1); }
}

@keyframes floatBlob3 {
  0%   { transform: translate3d(-50%, -50%, 0) scale(1); }
  100% { transform: translate3d(-58%, -42%, 0) scale(1.12); }
}

/* Mobile: lighter blobs and reduced blur for performance */
@media (max-width: 768px) {
  .bg-decor .blob { filter: blur(55px); opacity: 0.65; }
  .bg-decor .blob-1 { width: 320px; height: 320px; }
  .bg-decor .blob-2 { width: 360px; height: 360px; }
  .bg-decor .blob-3 { width: 300px; height: 300px; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bg-decor .blob { animation: none; }
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */

#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-a);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: background 0.3s, transform 0.15s;
  box-shadow: 0 0 8px var(--neon-a), 0 0 16px var(--neon-a);
  will-change: transform;
}

#cursor-ring {
  width: 38px;
  height: 38px;
  border: 2px solid var(--neon-a);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  z-index: 9998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
  opacity: 0.6;
  will-change: transform;
}

body.cursor-hover #cursor-ring {
  width: 54px;
  height: 54px;
  opacity: 0.9;
  border-color: var(--neon-b);
  box-shadow: 0 0 16px var(--neon-b);
}

body.cursor-hover #cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
}

@media (max-width: 768px) {
  #cursor-dot, #cursor-ring { display: none; }
  body { cursor: auto; }
}

/* =============================================
   LOADER
   ============================================= */

#loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 9000;
  transition: opacity 0.7s ease, visibility 0.7s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-neon {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 28px;
  background: var(--neon-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: flicker 1.5s infinite alternate;
  letter-spacing: 0.05em;
}

@keyframes flicker {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.65; }
}

.loader-bar-container {
  width: 260px;
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--neon-gradient);
  border-radius: 999px;
  transition: width 0.2s ease;
  box-shadow: 0 0 12px var(--neon-a);
}

#loader-percent {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 0.9rem;
}

/* =============================================
   NAVBAR
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: calc(100% - 40px);
  max-width: 1100px;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0);
  transition:
    transform 0.8s cubic-bezier(0.4,0,0.2,1),
    background 0.4s ease,
    box-shadow 0.4s ease;
}

.navbar.show {
  transform: translateX(-50%) translateY(20px);
}

.navbar.scrolled {
  background: var(--navbar-scrolled);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 20px rgba(0,245,255,0.15), 0 0 40px rgba(124,255,0,0.08);
}

.light-mode .navbar.scrolled {
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  gap: 16px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s, text-shadow 0.3s;
  opacity: 0.8;
}

.nav-link:hover {
  opacity: 1;
  color: var(--text-color);
  text-shadow: 0 0 8px rgba(0,245,255,0.6);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  height: 2px; width: 0%;
  background: var(--neon-gradient);
  border-radius: 2px;
  transition: width 0.35s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  opacity: 1;
}

/* Theme toggle button */
.theme-toggle {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: rgba(0,245,255,0.12);
  box-shadow: 0 0 12px rgba(0,245,255,0.4);
  transform: scale(1.08);
}

.light-mode .theme-toggle {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
}

.theme-icon { display: block; }
.theme-icon.hidden { display: none; }

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--neon-gradient);
  display: block;
  transition: 0.4s;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    background: var(--navbar-scrolled);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: 0.4s ease;
    border-radius: 0 0 18px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-container { padding: 12px 18px; }
}

/* =============================================
   NEON TEXT
   ============================================= */

.neon {
  background: var(--neon-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================
   SECTION HEADING
   ============================================= */

.section-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.neon-heading {
  background: linear-gradient(90deg, var(--neon-a), var(--neon-b), var(--neon-a));
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: neonFlow 6s linear infinite;
}

@keyframes neonFlow {
  0% { background-position: 0%; }
  100% { background-position: 200%; }
}

.section-heading::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--neon-gradient);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,245,255,0.7);
}

/* =============================================
   SECTIONS
   ============================================= */

.section {
  padding: 100px 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.content {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 1rem;
}

/* =============================================
   HERO
   ============================================= */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 80px 20px 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.open-to-work {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0,255,153,0.1);
  border: 1px solid rgba(0,255,153,0.3);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  animation: glowBadge 2s infinite alternate;
}

.light-mode .open-to-work {
  background: rgba(0,200,120,0.08);
  border-color: rgba(0,200,120,0.25);
  color: #0f172a;
}

@keyframes glowBadge {
  0% { box-shadow: 0 0 6px rgba(0,255,153,0.3); }
  100% { box-shadow: 0 0 18px rgba(0,255,153,0.6); }
}

.open-to-work .dot {
  width: 9px;
  height: 9px;
  background: #00ff99;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.7); opacity: 0.5; }
}

.open-to-work span:last-child {
  background: linear-gradient(90deg, #00f5ff, #7cff00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.light-mode .open-to-work span:last-child {
  background: linear-gradient(90deg, #0ea5e9, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow: hidden;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 4px;
  min-height: 1.8em;
}

.cursor {
  display: inline-block;
  background-color: var(--neon-a);
  width: 2px;
  height: 1em;
  vertical-align: text-bottom;
  animation: blink 0.7s infinite;
  margin-left: 2px;
}

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

/* =============================================
   BUTTONS
   ============================================= */

.btn-neon {
  padding: 13px 32px;
  border-radius: 999px;
  background: var(--neon-gradient);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  position: relative;
  z-index: 2;
}

.btn-neon:hover {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(0,245,255,0.6), 0 0 40px rgba(124,255,0,0.4);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.hero-btn { margin-top: 4px; }

.scroll-btn {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  padding: 12px;
  border: 1px solid rgba(0,245,255,0.25);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--neon-a);
  box-shadow: 0 0 10px rgba(0,245,255,0.3);
  animation: scrollBounce 2.5s ease-in-out infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}

.scroll-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px var(--neon-a), 0 0 40px var(--neon-b);
}

.light-mode .scroll-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(14,165,233,0.3);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* =============================================
   CARDS (Education)
   ============================================= */

.cards-grid {
  max-width: 800px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 28px 32px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  text-align: left;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(0,245,255,0.3);
}

.light-mode .card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-school {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-year {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.card-desc {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* =============================================
   SKILLS CAROUSEL
   ============================================= */

.skills-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 40px auto 0;
}

.skills-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 16px 48px;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-a) var(--scrollbar-track);
  -webkit-overflow-scrolling: touch;
}

.skills-carousel::-webkit-scrollbar { height: 6px; }
.skills-carousel::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
}
.skills-carousel::-webkit-scrollbar-thumb {
  background: var(--neon-gradient);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}

@media (min-width: 768px) {
  .skills-carousel { scrollbar-width: none; }
  .skills-carousel::-webkit-scrollbar { display: none; }
}

.skill-card {
  min-width: 160px;
  flex-shrink: 0;
  padding: 28px 20px;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  text-align: center;
  cursor: default;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 0 20px rgba(0,245,255,0.25), 0 0 40px rgba(124,255,0,0.12);
  border-color: rgba(0,245,255,0.3);
}

.skill-card img, .skill-card svg {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.skill-card:hover img,
.skill-card:hover svg {
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px rgba(0,245,255,0.5));
}

.skill-card p {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-color);
}

.btn-circle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--neon-gradient);
  color: #000;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-circle:hover {
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 16px rgba(0,245,255,0.5);
}

.btn-circle-left { left: 0; }
.btn-circle-right { right: 0; }

/* =============================================
   PROJECT CARDS
   ============================================= */

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 960px;
  margin: 40px auto 0;
}

.project-card {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 30px 26px;
  width: 100%;
  max-width: 420px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(0,245,255,0.35);
}

.project-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  line-height: 1.3;
}

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

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: rgba(0,245,255,0.08);
  border: 1px solid rgba(0,245,255,0.2);
  color: var(--neon-a);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background 0.25s, box-shadow 0.25s;
}

.tech-tag:hover {
  background: rgba(0,245,255,0.16);
  box-shadow: 0 0 8px rgba(0,245,255,0.35);
}

.light-mode .tech-tag {
  background: rgba(14,165,233,0.08);
  border-color: rgba(14,165,233,0.2);
  color: #0ea5e9;
}

.project-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.proj-btn-primary {
  background: var(--neon-gradient);
  color: #000;
}

.proj-btn-primary:hover {
  transform: scale(1.06);
  box-shadow: 0 0 18px var(--neon-a), 0 0 28px var(--neon-b);
}

.proj-btn-secondary {
  background: rgba(255,255,255,0.07);
  color: var(--text-color);
  border: 1px solid rgba(255,255,255,0.12);
}

.proj-btn-secondary:hover {
  background: rgba(255,255,255,0.13);
  transform: scale(1.04);
}

.light-mode .proj-btn-secondary {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
  color: var(--text-color);
}

@media (max-width: 640px) {
  .projects-grid { padding: 0 16px; }
  .project-card { max-width: 100%; }
}

/* =============================================
   CONTACT INFO
   ============================================= */

.contact-info-grid {
  max-width: 880px;
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 0 20px;
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 720px) {
  .contact-info-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .contact-item { justify-content: center; }
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.contact-sub {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-icon {
  color: var(--neon-a);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* =============================================
   CONTACT FORM
   ============================================= */

.contact-form {
  max-width: 560px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--neon-a);
  box-shadow: 0 0 0 3px rgba(0,245,255,0.12);
}

.form-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--form-label-color);
  pointer-events: none;
  font-size: 0.95rem;
  transition: 0.3s ease all;
  background: transparent;
}

.form-group textarea ~ label {
  top: 16px;
  transform: none;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 0.8rem;
  color: var(--neon-a);
  background: var(--input-bg);
  padding: 0 5px;
  transform: none;
}

/* =============================================
   SCROLL UP
   ============================================= */

.scroll-up-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
  text-align: center;
  padding: 32px 24px 40px;
  color: var(--text-dim);
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.light-mode .footer {
  border-top-color: rgba(0,0,0,0.06);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
  color: var(--text-color);
  text-decoration: none;
}

.social-btn:hover {
  transform: scale(1.2) translateY(-4px);
  box-shadow: 0 0 16px var(--neon-a), 0 0 32px var(--neon-b);
  border-color: rgba(0,245,255,0.5);
  color: var(--neon-a);
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* =============================================
   ANIM HELPERS (for GSAP)
   ============================================= */

.anim-card,
.anim-fade {
  opacity: 1;
  transform: translateY(0);
  will-change: opacity, transform;
}

/* =============================================
   TEXT CENTER / MARGIN UTILITY
   ============================================= */

.text-center { text-align: center; }
.mb-8 { margin-bottom: 2rem; }

/* =============================================
   HORIZONTAL SLIDERS (Skills + Projects)
   - No autoplay, no infinite loop
   - Desktop: drag with mouse + arrow buttons (visible on hover/drag)
   - Mobile : native horizontal touch scroll, arrows hidden
   ============================================= */

/* Projects wrapper: tight to the cards so arrows sit close to them, not at the screen edge */
.projects-wrapper {
  position: relative;
  width: 100%;
  max-width: 880px;            /* ~2 cards (360+30+360 = 750) + arrow gutters */
  margin: 40px auto 0;
}

/* Projects carousel uses the same scroll-container pattern as Skills.
   Horizontal padding leaves space for the arrow buttons. */
.projects-carousel {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 16px 56px;          /* arrow gutter on each side */
  scrollbar-width: thin;
  scrollbar-color: var(--neon-a) var(--scrollbar-track);
  -webkit-overflow-scrolling: touch;
  justify-content: safe center; /* center 2 cards; falls back to start when overflowing */
}
.projects-carousel::-webkit-scrollbar { height: 6px; }
.projects-carousel::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 10px;
}
.projects-carousel::-webkit-scrollbar-thumb {
  background: var(--neon-gradient);
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}
@media (min-width: 768px) {
  .projects-carousel { scrollbar-width: none; }
  .projects-carousel::-webkit-scrollbar { display: none; }
}

/* Cards inside the projects carousel keep their original look,
   but stay fixed-width so they don't stretch */
.projects-carousel .project-card {
  flex: 0 0 auto;
  width: 360px;
  max-width: 100%;
  margin: 0;
}

/* Tablet / mobile: 1 card visible, full-width wrapper, natural left-aligned scroll */
@media (max-width: 880px) {
  .projects-wrapper {
    max-width: 100%;
    padding: 0 16px;
  }
  .projects-carousel {
    padding: 16px 8px;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .projects-carousel { gap: 20px; }
  .projects-carousel .project-card { width: 280px; }
}

/* -------- Desktop only (hover-capable, fine pointer) -------- */
@media (hover: hover) and (pointer: fine) {

  /* Show grab cursor + opt out of native horizontal scroll
     so JS drag drives the slider smoothly */
  .skills-carousel,
  .projects-carousel {
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }
  .skills-carousel.is-dragging,
  .projects-carousel.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
  }
  .skills-carousel.is-dragging .skill-card,
  .skills-carousel.is-dragging .skill-card *,
  .projects-carousel.is-dragging .project-card,
  .projects-carousel.is-dragging .project-card * {
    pointer-events: none;
  }

  /* Arrows always visible on desktop, with a subtle dim state until hover/drag */
  .skills-wrapper .btn-circle,
  .projects-wrapper .btn-circle {
    opacity: 0.55;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  }
  .skills-wrapper:hover .btn-circle,
  .projects-wrapper:hover .btn-circle,
  .skills-wrapper.is-dragging .btn-circle,
  .projects-wrapper.is-dragging .btn-circle,
  .btn-circle:hover,
  .btn-circle:focus-visible {
    opacity: 1;
  }
}

/* -------- Mobile / touch devices -------- */
/* Arrows stay visible AND swipe still works.
   Smaller, snug to the slider edge, on top of the cards via z-index. */
@media (max-width: 880px) {

  /* Make sure arrows are not clipped by any parent overflow */
  .skills-wrapper,
  .projects-wrapper {
    overflow: visible;
  }

  /* Smaller, touch-friendly arrows tucked inside the slider area */
  .skills-wrapper .btn-circle,
  .projects-wrapper .btn-circle {
    display: flex;
    width: 36px;
    height: 36px;
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }
  .skills-wrapper .btn-circle svg,
  .projects-wrapper .btn-circle svg {
    width: 12px;
    height: 12px;
  }
  .skills-wrapper .btn-circle-left,
  .projects-wrapper .btn-circle-left { left: 4px; }
  .skills-wrapper .btn-circle-right,
  .projects-wrapper .btn-circle-right { right: 4px; }

  /* Carousel side padding leaves room for the arrows so they
     don't overlap card content on the first/last cards */
  .skills-carousel,
  .projects-carousel {
    padding-left: 48px;
    padding-right: 48px;
  }
}