/* ===== CSS Variables ===== */
:root {
    /* Unified deep-blue palette */
    --primary-dark: #071A3A;    /* darkest navy */
    --primary-light: #0E2A59;   /* slightly lighter navy */
    --secondary-light: #1E4B8A; /* mid blue for subtle highlights */
    --accent: #2C6FB5;         /* accent blue used for glows */
    --accent-rgb: 44,111,181;  /* rgb for rgba() helpers */
    --text-dark: #cfe8ff;      /* soft light text */
    --text-light: #ffffff;
    --bg-dark: #041022;        /* page background */
    --bg-card: #07213a;        /* card background */
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.08);
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
}

.navbar-logo {
    height: 40px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-light), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-light);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== Hamburger Menu ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    padding: 100px 20px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(var(--accent-rgb), 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(var(--accent-rgb), 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease 0.4s both;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--secondary-light);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.25);
}

.btn-secondary {
    background-color: rgba(var(--accent-rgb), 0.06);
    color: var(--text-light);
    border: 2px solid var(--secondary-light);
}

.btn-secondary:hover {
    background-color: rgba(var(--accent-rgb), 0.12);
    color: var(--secondary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.18);
}

/* ===== Sections ===== */
.projects,
.servers {
    padding: 80px 20px;
}

.projects {
    background-color: var(--bg-dark);
}

.servers {
    background-color: var(--primary-dark);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-light), var(--accent));
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ===== Grid Layout ===== */
.projects-grid,
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== Project Card ===== */
.project-card,
.server-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
    border: 1px solid rgba(var(--accent-rgb), 0.06);
}

.project-card:hover,
.server-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.16);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-light), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.project-card-content,
.server-card-content {
    padding: 2rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.card-description {
    color: #a0a0a0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.server-flag {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-card .btn {
    width: 100%;
    justify-content: center;
}

.card-footer {
    display: flex;
    gap: 0.5rem;
}

.card-footer a {
    flex: 1;
}

.card-footer .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: var(--text-light);
    padding: 3rem 20px 1rem;
    text-align: center;
    border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a,
.social-icon {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover,
.social-icon:hover {
    color: var(--secondary-light);
    transform: scale(1.1);
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.social-icon:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--secondary-light);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Animations ===== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Page Styles ===== */
.projects-page,
.servers-page,
.legal-page {
    padding: 80px 20px;
    min-height: 70vh;
}

.projects-page {
    background-color: var(--bg-dark);
}

.servers-page {
    background-color: var(--primary-dark);
}

.legal-page {
    background-color: var(--bg-dark);
}

.page-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    animation: slideInDown 0.8s ease;
}

.page-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #a0a0a0;
    margin-bottom: 3rem;
    animation: slideInUp 0.8s ease 0.2s both;
}

/* ===== Legal Pages ===== */
.legal-container {
    max-width: 800px;
    margin: 0 auto;
}

.legal-title {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 1rem;
}

.legal-content {
    color: #c0c0c0;
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--secondary-light);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .legal-title {
        font-size: 2rem;
    }

    .legal-content h2 {
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
        padding: 1rem 0;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 1rem 2rem;
    }

    .nav-link::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .footer-content {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid,
    .servers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .projects,
    .servers {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .nav-menu li {
        padding: 0.75rem 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .legal-title {
        font-size: 1.5rem;
    }

    .legal-content h2 {
        font-size: 1.2rem;
    }
}
