/* ============================================
   BASE.CSS — Variables, Reset, Utilities
   ============================================ */

:root {
    --bg-color: #f9fafb;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-hover: 0 20px 40px -8px rgba(79,70,229,0.18), 0 8px 16px -4px rgba(0,0,0,0.08);
    --shadow-card: 0 2px 20px rgba(0,0,0,0.08);

    --header-height: 80px;
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

body.dark-mode {
    --bg-color: #111827;
    --text-color: #f9fafb;
    --text-light: #9ca3af;
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --secondary-color: #34d399;
    --card-bg: #1f2937;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-hover: 0 20px 40px -8px rgba(99,102,241,0.25), 0 8px 16px -4px rgba(0,0,0,0.3);
    --shadow-card: 0 2px 20px rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul { list-style: none; }

img {
    max-width: 100%;
    display: block;
}

/* ---- Layout Utilities ---- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn:active { transform: scale(0.98); }

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.secondary-btn:hover {
    background-color: rgba(79, 70, 229, 0.1);
}

/* ---- Reveal Animation ---- */
/* script.js uses IntersectionObserver to add .active class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Lightbox ---- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.92);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox.active { display: flex; }

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.close-lightbox {
    position: absolute;
    top: 20px; right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.close-lightbox:hover { color: var(--primary-color); }

.lightbox-controls {
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 5%;
    pointer-events: none;
}

.prev, .next {
    cursor: pointer;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: background-color 0.3s;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.5);
    user-select: none;
    pointer-events: auto;
}

.prev:hover, .next:hover { background-color: var(--primary-color); }

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.1rem;
}