/* ----------------------------------
   ROOT THEME VARIABLES
---------------------------------- */
:root {
  --bg: #ffffff;
  --text: #111;
  --card: #ffffff;
  --border: #ddd;
  --accent: #000;
  --button-bg: #000000;        /* button background (light mode) */
  --button-text: #ffffff;      /* button text (light mode) */
  --panel-width: 360px;
  /* LIGHT MODE TEXTURES */
  --texture1: rgba(0,0,0,0.04);
  --texture2: rgba(0,0,0,0.02);
  --footer-bg: #eaeaea;  /* light grey for contrast */
  --footer-text: #111;
  --footer-muted: #555;
  --footer-border: #ccc;
}

/* ----------------------------------
   DARK MODE VARIABLES
---------------------------------- */
body.dark {
  --bg: #0d0d0d;
  --text: #f5f5f5;
  --card: #111111;
  --border: #333;
  --accent: #fff;
  --button-bg: #ffffff;        /* button background (dark mode) */
  --button-text: #000000;      /* button text (dark mode) */
  --texture1: rgba(255,255,255,0.05);
  --texture2: rgba(255,255,255,0.03);
  --footer-bg: #111;     /* darker than project cards */
  --footer-text: #f2f2f2;
  --footer-muted: #aaa;
  --footer-border: #444;
}

/* Initial state for all sections */
.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s ease-out;
}

/* Animate into view */
.section-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------
   GLOBAL BODY
---------------------------------- */
/* GLOBAL BODY — SAME GRID IN BOTH MODES */
body {
    margin: 0;
    padding: 0;
    font-family: Poppins, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: 0.35s ease-in-out;

    /* PREMIUM GRID BOXES (APPLIED TO BOTH LIGHT & DARK) */
    background-image:
        linear-gradient(to right, var(--texture1) 1px, transparent 1px),
        linear-gradient(to bottom, var(--texture1) 1px, transparent 1px),
        radial-gradient(circle at top, var(--texture2), transparent);
    background-size: 45px 45px, 45px 45px, 100% 260px;
}

/* DARK MODE — ONLY COLOR VARIABLES CHANGE */
body.dark {
    background-image:
        linear-gradient(to right, var(--texture1) 1px, transparent 1px),
        linear-gradient(to bottom, var(--texture1) 1px, transparent 1px),
        radial-gradient(circle at top, var(--texture2), transparent);
}

/* Knob & track */
.theme-toggle {
    margin-left: 25px;
    width: 52px;
    height: 28px;
    border-radius: 30px;
    background: #000; /* 🔥 light mode = black track */
    border: 1px solid #000000;
    cursor: pointer;
    position: relative;
    padding: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Knob */
.theme-toggle > .toggle-knob {
    position: absolute;
    top: 3px;
    left: 4px; /* light = left */
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: left 0.3s ease, background 0.3s ease;
    background: transparent; /* knob transparent */
}

/* Move knob for dark */
body.dark .theme-toggle > .toggle-knob {
    left: 26px;
}

/* Track color for dark mode */
body.dark .theme-toggle {
    background: #fff;  /* 🔥 dark mode = white track */
    border-color: #444;
}

/* Icons inside knob */
.toggle-knob svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;  /* bigger solid icon */
    height: 18px;
    transform: translate(-50%, -50%);
    transition: fill 0.3s ease;
}

/* LIGHT MODE: fully solid icons */
.moon-icon {
    fill: #000;   /* black moon */
}
.sun-icon {
    fill: #fff;   /* white sun */
}

/* DARK MODE: fully solid icons */
body.dark .moon-icon {
    fill: #fff;   /* white moon */
}
body.dark .sun-icon {
    fill: #000;   /* black sun */
}

/* ================= CONTACT PAGE ================= */
.contact-page {
  padding: 100px 20px;
  display: flex;
  justify-content: center;
}

/* Animated container */
.contact-wrapper {
  max-width: 520px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 35px;
  animation: slideFade 0.9s ease forwards;
}

/* Animation */
@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode glow animation */
body.dark .contact-wrapper {
  animation: slideFade 0.9s ease forwards, glow 4s infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 0 rgba(255,255,255,0.05);
  }
  to {
    box-shadow: 0 0 25px rgba(255,255,255,0.12);
  }
}

/* ================= FORM ================= */
.contact-form h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.contact-form p {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 25px;
}

.input-group {
  margin-bottom: 16px;
}

label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

body.dark input:focus,
body.dark textarea:focus {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}

textarea {
  min-height: 110px;
  resize: none;
}

/* ================= BUTTON ================= */
.send-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Light mode hover */
body:not(.dark) .send-btn:hover {
  background: #fff;
  color: #000;
  border-color: #000;
  transform: translateY(-2px);
}

/* Dark mode hover */
body.dark .send-btn:hover {
  background: #000;
  color: #fff;
  border-color: #fff;
  transform: translateY(-2px);
}

/* ================= STATUS ================= */
#status-message {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .contact-wrapper {
    padding: 25px;
  }
}
