/* =========================
   CSS VARIABLES
========================= */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* =========================
   RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   HEADER & NAVIGATION
========================= */
header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 28px 16px;
  text-align: center;
}

header h1 {
  font-size: 1.7rem;
  font-weight: 700;
}

header p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 6px;
}

header a {
  color: #fff;
  text-decoration: none;
}

nav {
  margin-top: 10px;
}

nav a {
  color: #e0e7ff;
  font-size: 0.85rem;
  margin: 0 8px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

nav a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* =========================
   LAYOUT
========================= */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

/* =========================
   CARD
========================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

/* =========================
   GRID (TOOLS)
========================= */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

/* =========================
   TOOL CARD
========================= */
.tool-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.tool-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.tool-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* =========================
   INPUTS & TEXTAREA
========================= */
textarea,
input,
select {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  outline: none;
  background: #fff;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
}

/* =========================
   BUTTONS
========================= */
button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s ease, transform 0.15s ease;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

button:active {
  transform: scale(0.98);
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  padding: 22px 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* =========================
   RESPONSIVE (DESKTOP TWEAKS)
========================= */
@media (min-width: 768px) {
  header h1 {
    font-size: 1.9rem;
  }

  .tool-card h3 {
    font-size: 1.05rem;
  }
}

/* =========================
   ACCESSIBILITY
========================= */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(37,99,235,0.4);
  outline-offset: 2px;
}

/* ===== Contact Page ===== */
.contact-form {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.social-icons {
  display: flex;
  gap: 14px;
  font-size: 1.25rem;
}

.social-icons a {
  color: var(--primary);
}

.social-icons a:hover {
  opacity: 0.8;
}

/* =====================================================
   🌐 UNIVERSAL GRID – ALL DEVICES
===================================================== */
@media (max-width: 640px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* =====================================================
   🧠 HACKER / CYBER BACKGROUND & POWER LOOK
===================================================== */

/* 🌌 Dark tech background */
body {
  background:
    linear-gradient(180deg, rgba(2,6,23,0.94), rgba(2,6,23,0.98)),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.035) 0px,
      rgba(255,255,255,0.035) 1px,
      transparent 1px,
      transparent 28px
    ),
    radial-gradient(900px 400px at 15% 0%, rgba(37,99,235,0.18), transparent 45%),
    radial-gradient(900px 400px at 85% 10%, rgba(56,189,248,0.14), transparent 45%);
}

/* 🧱 Floating light cards */
.card,
.tool-card {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(148,163,184,0.25);
  backdrop-filter: blur(6px) saturate(120%);
}

/* ✨ Inner light reflection */
.tool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

/* 🚀 Hacker hover glow */
@media (hover: hover) {
  .tool-card:hover {
    box-shadow:
      0 22px 44px rgba(15,23,42,0.55),
      0 0 0 1px rgba(56,189,248,0.35),
      0 0 22px rgba(56,189,248,0.35);
    transform: translateY(-6px);
  }

  button:hover {
    box-shadow:
      0 10px 28px rgba(37,99,235,0.6),
      0 0 14px rgba(56,189,248,0.45);
  }
}

/* 🧭 Section titles readable on dark */
.section-title,
.container > h2 {
  color: #e5e7eb;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

/* 🟦 Header cyber enhancement */
header {
  background:
    linear-gradient(135deg, #020617, #0f172a 55%, #020617),
    radial-gradient(400px 200px at 50% -20%, rgba(56,189,248,0.35), transparent 60%);
  border-bottom: 1px solid rgba(148,163,184,0.25);
}

/* ⚡ Command-style buttons */
button {
  letter-spacing: 0.3px;
}

button:active {
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
}

/* 🧩 Footer readable */
footer {
  color: #cbd5f5;
}

/* =====================================================
   🫀 LIFE INJECTION – MAKE UI FEEL ALIVE
   Subtle • Hacker-style • Non-cringe
===================================================== */

/* 🌊 Ambient breathing background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 30% 20%, rgba(56,189,248,0.12), transparent 60%),
    radial-gradient(600px 300px at 70% 80%, rgba(37,99,235,0.12), transparent 60%);
  animation: ambientShift 18s ease-in-out infinite;
  z-index: -1;
}

@keyframes ambientShift {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(-20px);
    opacity: 0.85;
  }
}

/* 🫀 Tool cards slow pulse */
.tool-card {
  animation: cardPulse 9s ease-in-out infinite;
}

@keyframes cardPulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* ⌨️ Hacker terminal cursor on section titles */
.section-title::after {
  content: "_";
  margin-left: 6px;
  color: #38bdf8;
  animation: blinkCursor 1.2s steps(1) infinite;
}

@keyframes blinkCursor {
  50% {
    opacity: 0;
  }
}

/* 🧠 Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .tool-card {
    animation: none !important;
  }

  .section-title::after {
    animation: none;
    opacity: 0.6;
  }
}

/* =====================================================
   🧬 LIFE + DETAIL INJECTION (FINAL POLISH)
   Purpose: Remove empty feeling, increase satisfaction
===================================================== */

/* 🧱 Section anchoring (prevents empty dark void) */
.container {
  position: relative;
}

.container::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.015)
  );
  border-radius: 28px;
  pointer-events: none;
  opacity: 0.6;
}

/* 🧠 System grid illusion (very subtle) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  z-index: -2;
}

/* ⚙️ Tool cards feel like active system nodes */
.tool-card {
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(56,189,248,0.18),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover::before {
  opacity: 1;
}

/* 🧲 Stronger intent signal */
.tool-card:hover h3 {
  color: var(--primary);
}

.tool-card:hover p {
  color: #334155;
}

/* 🧭 Bottom rhythm – page doesn’t feel cut off */
main {
  padding-bottom: 100px;
}

/* 🧠 Accessibility: reduce motion safe */
@media (prefers-reduced-motion: reduce) {
  .container::before,
  body::after,
  .tool-card::before {
    display: none;
  }
}

/* =====================================================
   🧘 UX BALANCE PATCH – LESS NOISE, MORE LIFE
   Purpose: Reduce demo-feel, increase real-product feel
===================================================== */

/* 1️⃣ Reduce constant motion fatigue */
.tool-card {
  animation-play-state: paused;
}

.tool-card:hover {
  animation-play-state: running;
}

/* 2️⃣ Calm background breathing (less distraction) */
body::before {
  opacity: 0.35;
  animation-duration: 28s;
}

/* 3️⃣ Stronger section separation (content feels fuller) */
.card {
  margin-bottom: 28px;
}

/* 4️⃣ Section intro micro-copy style (if present) */
.section-intro {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin: 6px 0 18px;
  max-width: 640px;
  line-height: 1.7;
}

/* 5️⃣ Tool card feels more actionable */
.tool-card {
  cursor: pointer;
}

.tool-card:active {
  transform: translateY(-2px) scale(0.99);
}

/* 6️⃣ Footer top separation – page feels complete */
footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148,163,184,0.15);
}

/* 7️⃣ Kill animation overload for low-power devices */
@media (max-width: 480px) {
  body::before {
    animation: none;
  }

  .tool-card {
    animation: none;
  }
}

/* =====================================================
   🆕 UPDATE: SCROLLBAR & SELECTION (NEW)
   Adds premium polished feel to the dark theme
===================================================== */

/* 🖱️ Custom Dark Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #020617; /* Matches body dark bg */
}

::-webkit-scrollbar-thumb {
  background: #334155; /* Slate grey handle */
  border-radius: 5px;
  border: 2px solid #020617; /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary); /* Glows blue on hover */
}

/* For Firefox Support */
html {
  scrollbar-width: thin;
  scrollbar-color: #334155 #020617;
}

/* 🖊️ Premium Text Selection */
::selection {
  background: rgba(37, 99, 235, 0.3); /* Transparent primary blue */
  color: #fff;
  text-shadow: 0 0 10px var(--primary); /* Neon glow effect */
}
