:root {
    --nav-height: 70px;
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #5bc0ff;
    --accent-gradient: linear-gradient(135deg, #5bc0ff 0%, #1e88e5 100%);
    --card-bg: #fdfdfd;
    --footer-color: #1e3c72;
    --text-color: #111;
    --text-light: #fff;
    --gradient-1: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-2: linear-gradient(135deg, #2a5298 0%, #5bc0ff 100%);
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 15px 40px rgba(0, 0, 0, 0.12);
    --shadow-dark: 0 20px 50px rgba(0, 0, 0, 0.2);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

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

body, h1, h2, h3, h4, h5, h6, p, a, span {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

body {
    margin: 0;
    padding-top: var(--nav-height);
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f4f8 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background 0.5s, color 0.5s;
}

/* NAVBAR */
.navbar {
    height: var(--nav-height);
    background: var(--gradient-1);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background: rgba(30, 60, 114, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    margin-left: 30px;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 1px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand::before {
    content: "</>";
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.2rem;
}

.nav-link {
    margin: 0 15px;
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    transition: var(--transition);
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

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

/* HERO */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(91, 192, 255, 0.15) 0%, rgba(91, 192, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 60, 114, 0.1) 0%, rgba(30, 60, 114, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease forwards;
}

.hero p {
    font-size: 1.3rem;
    color: #666;
    margin-top: 10px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
    line-height: 1.6;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(91, 192, 255, 0.3);
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

/* BUTTONS */
.btn-custom {
    border-radius: 12px;
    padding: 14px 32px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    font-size: 1rem;
}

.btn-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
    z-index: -1;
}

.btn-custom:hover::after { left: 100%; }

.btn-learn {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.3);
}

.btn-learn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(30, 60, 114, 0.4);
    color: #fff;
}

.btn-github {
    background: #111;
    color: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-github:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* CARDS */
.cards-wrap {
    background: var(--card-bg);
    padding: 100px 20px;
    position: relative;
    transition: background 0.5s;
}

.cards-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231e3c72' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.section-title h2 {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: 18px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    background: #fff;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-2);
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-medium);
}

.card-body {
    padding: 40px 30px;
    text-align: center;
}

.card-icon {
    font-size: 60px;
    margin-bottom: 25px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.card-icon:nth-child(1) { animation-delay: 0s; }
.card-icon:nth-child(2) { animation-delay: 0.5s; }
.card-icon:nth-child(3) { animation-delay: 1s; }

.card h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p { color: #666; line-height: 1.6; font-size: 1.05rem; }

/* FEATURES */
.features { padding: 100px 20px; background: #f8fafc; }

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    padding: 30px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.feature-item:hover { transform: translateY(-10px); box-shadow: var(--shadow-medium); }

.feature-icon {
    font-size: 3rem;
    margin-right: 30px;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.feature-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-content p { color: #666; margin-bottom: 0; }

/* FOOTER */
footer {
    background: var(--gradient-1);
    color: #fff;
    text-align: center;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content { max-width: 800px; margin: 0 auto; }

.footer-links { display: flex; justify-content: center; gap: 30px; margin: 30px 0; }

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* DARK MODE */
body.dark-mode { background: #121212; color: #fff; }
body.dark-mode .navbar { background: rgba(26, 26, 26, 0.95); }
body.dark-mode .navbar.scrolled { background: rgba(26, 26, 26, 0.98); }
body.dark-mode .nav-link, body.dark-mode .navbar-brand { color: #fff; }
body.dark-mode .cards-wrap { background: #1a1a1a; }
body.dark-mode .cards-wrap::before {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235bc0ff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
body.dark-mode .card { background: #2a2a2a; color: #fff; }
body.dark-mode .card h5 { color: var(--accent-color); }
body.dark-mode .card p { color: #ccc; }
body.dark-mode .hero h1 {
    background: linear-gradient(135deg, #5bc0ff 0%, #1e88e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.dark-mode .hero p, body.dark-mode .section-title p { color: #ccc; }
body.dark-mode .section-title h2 {
    background: linear-gradient(135deg, #5bc0ff 0%, #1e88e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
}
body.dark-mode .features { background: #1c1c1c; }
body.dark-mode .feature-item { background: #2a2a2a; }
body.dark-mode .feature-content p { color: #ccc; }
body.dark-mode footer { background: #1a1a1a; color: #ccc; }

/* DARK MODE TOGGLE */
#darkToggle {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-left: 15px;
}

#darkToggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
}

/* RESPONSIVE */

/* TABLETS */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.2rem; }
    .hero-badge { padding: 6px 16px; font-size: 0.95rem; }
    .feature-item { flex-direction: column; text-align: center; padding: 25px; }
    .feature-icon { margin: 0 0 20px; }
    .nav-link { margin: 0 10px; font-size: 0.95rem; }
}

/* PHONES */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; line-height: 1.3; }
    .hero p { font-size: 1rem; margin-bottom: 30px; }
    .hero-badge { padding: 5px 14px; font-size: 0.9rem; }
    .btn-custom { padding: 10px 22px; font-size: 0.9rem; }
    .section-title h2 { font-size: 1.8rem; }
    .cards-wrap { padding: 60px 15px; }
    .card-body { padding: 30px 20px; }
    .card h5 { font-size: 1.3rem; }
    .card p { font-size: 0.95rem; }
}

/* SMALL PHONES */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.7rem; }
    .hero p { font-size: 0.95rem; }
    .btn-custom { padding: 8px 18px; font-size: 0.85rem; }
    .card h5 { font-size: 1.1rem; }
    .card p { font-size: 0.9rem; }
    .navbar-brand { font-size: 1.3rem; }
    .nav-link { font-size: 0.85rem; padding: 6px 0; }
    #darkToggle { width: 45px; height: 45px; font-size: 1rem; }
}
