/* --- Core Variables & Dark-Premium Theme --- */
:root {
    --bg-main: #0a0d14;
    --bg-card: #121824;
    --bg-card-hover: #192233;
    --bg-header: rgba(10, 13, 20, 0.92);
    
    --primary: #0066cc;
    --primary-light: #3385ff;
    --accent: #8fa3bf;
    
    --silver: #e0e6ed;
    --text-main: #d0d7de;
    --text-muted: #8b949e;
    
    --border-color: rgba(224, 230, 237, 0.12);
    --border-glow: rgba(0, 102, 204, 0.4);
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--silver);
}

h1, h2, h3, h4 {
    color: var(--silver);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Header & Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--silver);
}

.logo span {
    color: var(--primary-light);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-light);
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle-label span {
    width: 25px;
    height: 3px;
    background-color: var(--silver);
    border-radius: 2px;
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, rgba(0, 102, 204, 0.15) 0%, transparent 60%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.5);
    color: #ffffff;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--silver);
}

.btn-secondary:hover {
    border-color: var(--silver);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Sections --- */
.section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* --- About Section --- */
.about-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-box p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.about-box p:last-child {
    margin-bottom: 0;
}

/* --- Grid & Project Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.2);
}

.card-tag {
    align-self: flex-start;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: rgba(0, 102, 204, 0.2);
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.card p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Contact Section --- */
.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--silver);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--silver);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 8px rgba(0, 102, 204, 0.4);
}

.alert-success {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.4);
    color: #57d9a3;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* --- Legal / Content Pages --- */
.page-content {
    padding: 4rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.page-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.page-content p, .page-content ul {
    margin-bottom: 1rem;
}

.page-content ul {
    padding-left: 1.5rem;
}

/* --- Footer --- */
.footer {
    background: #06080d;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 0;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 0.8rem;
    max-width: 400px;
}

.footer-links h4 {
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--silver);
}

.footer-bottom {
    border-top: 1px solid rgba(224, 230, 237, 0.05);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .nav-toggle-label {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a {
        padding: 1rem 1.5rem;
        border-top: 1px solid rgba(224, 230, 237, 0.05);
    }

    .nav-toggle:checked ~ .nav-menu {
        max-height: 350px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
/* --- Professional Cookie Banner & Modal --- */
.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    left: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    z-index: 9999;
}

.cookie-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cookie-body p {
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 1.2rem;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Modal Overlay */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 8, 13, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.cookie-modal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.cookie-modal-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h2 {
    font-size: 1.3rem;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: var(--silver);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.cookie-intro {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.cookie-category {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cookie-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.7rem;
    background: rgba(0, 102, 204, 0.2);
    color: var(--primary-light);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.cookie-category p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.cookie-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Custom Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2a3447;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}

input:checked + .slider:before {
    transform: translateX(20px);
}