@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

/* ====================== ROOT VARIABLES ====================== */
:root {
    --bg: #121212;
    --text: #ddd;
    --accent: #ff9800;
    --card: #1e1e1e;
    --sidebar: rgba(30, 30, 30, 0.98);
}

body.light-mode {
    --bg: #f5f5f5;
    --text: #222;
    --accent: #f57c00;
    --card: #ffffff;
    --sidebar: rgba(255, 255, 255, 0.98);
}

/* ====================== BASE STYLES ====================== */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background 0.4s;
    line-height: 1.6;
    font-size: 16px;
}

/* ====================== NAVIGATION ====================== */
.top-nav {
    background: var(--sidebar);
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.nav-brand img {
    height: 38px;
    object-fit: contain;
    background: white;
    padding: 3px;
    border-radius: 6px;
}

.hamburger {
    display: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

.nav-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--accent);
    color: #000;
}

/* ====================== PROJECT CARDS ====================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.project-card {
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #111;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 18px;
}

.project-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
}

.project-info p {
    margin: 6px 0;
    font-size: 0.98rem;
}

/* Progress Bar */
.progress-bar {
    background: #333;
    height: 8px;
    border-radius: 20px;
    margin: 12px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #ffcc80);
    transition: width 1s ease;
}

/* ====================== RESPONSIVE DESIGN ====================== */
@media (max-width: 480px) {
    .project-grid { gap: 16px; }
    .project-card { border-radius: 12px; }
    .project-image { height: 160px; }
    .project-info { padding: 16px; }
    .project-info h3 { font-size: 1.15rem; }
}

@media (max-width: 360px) {
    .project-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
    .project-image { height: 145px; }
}

@media (max-width: 320px) {
    .project-grid { grid-template-columns: 1fr; gap: 12px; }
    .project-image { height: 135px; }
}

/* ====================== MAIN LAYOUT ====================== */
.main-content {
    padding: 15px 8px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ====================== THEME SWITCH ====================== */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #555; transition: .4s; border-radius: 50px;
}
.slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(22px); }

/* ====================== COUNTDOWN & FORMS ====================== */
.countdown {
    font-size: 2.1rem !important;
    font-weight: bold;
    text-align: center;
    background: rgb(248, 248, 248);
    padding: 14px 18px;
    border-radius: 12px;
    margin: 15px auto;
    width: fit-content;
    min-width: 220px;
    border: 3px solid var(--accent);
    letter-spacing: 2px;
}

input, select, textarea, button {
    font-size: 16px !important;
}

/* ====================== TABLES ====================== */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
    font-size: 0.95rem;
}
th, td { 
    border: 1px solid var(--accent); 
    padding: 8px 6px; 
    text-align: left; 
}
th { background: var(--accent); color: #000; }

/* ====================== MOBILE NAV ====================== */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--sidebar);
        padding: 12px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.4);
        z-index: 999;
        gap: 4px;
    }
    
    .nav-links.active { display: flex; }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}