/* ----------------------------------
   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);
}


/* ----------------------------------
   HEADER
---------------------------------- */
.header {
    padding: 18px 0;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.container {
    width: 92%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* NAVBAR */
nav a {
    margin-left: 25px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
    transition: 0.3s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 10px;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* ----------------------------------
   THEME TOGGLE
---------------------------------- */
/* 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 */
}

/* =======================================================
   PRIVACY POLICY PAGE MIDDLE CONTENT (IMPROVED STYLE)
======================================================= */

/* Wrapper */
.merged-section {
    width: 90%;
    max-width: 850px;
    margin: 80px auto;
    padding: 40px 45px;
    background: var(--card);
    border-radius: 0px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

/* Dark mode */
body.dark .merged-section {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 6px 20px rgba(255,255,255,0.06);
}

/* Main Page Title */
.merged-section h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
    color: var(--text);
}

/* Section Headings */
.merged-section h3 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 700;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    letter-spacing: 0.3px;
}

/* Paragraphs */
.about-text {
    line-height: 1.75;
    color: var(--text);
    font-size: 15px;
    opacity: 0.95;
    margin-bottom: 22px;
}

/* Soft horizontal divider between major sections */
.merged-section .section-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 35px 0;
    opacity: 0.5;
}

/* LINKS (if any inside content) */
.merged-section a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

/* MOBILE RESPONSIVE */
@media (max-width: 600px) {
    .merged-section {
        padding: 25px 20px;
        margin: 50px auto;
    }

    .merged-section h2 {
        font-size: 26px;
        text-align: center;
    }

    .merged-section h3 {
        font-size: 19px;
    }

    .about-text {
        font-size: 14px;
    }
}


/* =======================
   FOOTER GLOBAL STYLES
======================= */
footer {
    background: #ffffff; /* Light mode */
    color: var(--footer-text);
    padding: 80px 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: 0.3s ease;
    font-family: 'Inter', sans-serif;
}

body.dark footer {
    background: #000000;
}

footer::before {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(0,0,0,0.15);
    margin-bottom: 40px;
    border-radius: 3px;
}

body.dark footer::before {
    background: rgba(255,255,255,0.15);
}

/* =======================
   FOOTER CONTAINER
======================= */
.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Connect column on left */
.connect-column {
    flex: 0; /* don't grow */
}

/* Wrapper for middle + right columns */
.footer-right-wrapper {
    display: flex;
    gap: 40px;
    margin-left: auto; /* pushes everything inside to the right */
}

/* Footer Columns */
.footer-column {
    min-width: 150px;
}

/* Headings */
.footer-column h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--footer-text);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* Links */
.footer-column a {
    display: block;
    text-decoration: none;
    color: var(--footer-muted);
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

/* Social icons */
.social-row {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.icon-img {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.icon-img:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

/* Footer bottom */
.footer-bottom {
    width: 100%;
    text-align: center;
    margin-top: 55px;
    padding-top: 20px;
    font-size: 13px;
    color: var(--footer-muted);
    border-top: 1px solid rgba(0,0,0,0.1);
    transition: 0.3s ease;
}

body.dark .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 35px;
    }

    .connect-column {
        padding-left: 0;
    }

    .footer-right-wrapper {
        flex-direction: column;
        margin-left: 0;
        gap: 20px;
    }

    .social-row {
        justify-content: center;
    }

    .footer-column h3 {
        margin-bottom: 12px;
    }

    .footer-column a {
        font-size: 13px;
    }
}
