/* Define default theme colors in :root - explicitly for light mode */
:root {
    --bg: #ffffff;
    --bg-alt: #f3f4f6;
    --fg: #1a1a1a;
    --primary: #6b46c1;
    --secondary: #0d9488;
    --accent: #dc2626;
    --card-bg: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(128, 128, 128, 0.2);
}

/* Override for dark mode using prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --bg-alt: #1a1a1a;
        --fg: #e0e0e0;
        --card-bg: rgba(255, 255, 255, 0.1);
        --nav-bg: rgba(18, 18, 18, 0.8);
        --border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Explicitly define colors for light theme */
[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f3f4f6;
    --fg: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(128, 128, 128, 0.2);
}

/* Explicitly define colors for dark theme */
[data-theme="dark"] {
    --bg: #121212;
    --bg-alt: #1a1a1a;
    --fg: #e0e0e0;
    --card-bg: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(18, 18, 18, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
  font-family: "Poppins", serif;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    margin: 0;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    padding: 0.3rem 1.0rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
}

@media (max-width: 375px) {
    .bottom-nav {
        padding: 0.5rem 1rem;
        bottom: 10px;
    }
    
    .nav-link {
        padding: 0.25rem 0.5rem;
    }

    .nav-link span {
        display: none;
    }
}

.nav-link {
    color: var(--fg);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; /* Change to column for icon above text */
    align-items: center; /* Center align items */
    padding: 0.5rem; /* Reduced padding */
    border-radius: 10px; /* Slightly smaller border radius */
    gap: 0.25rem; /* Space between icon and text */
    font-size: 0.85rem; /* Smaller font size */
}

.nav-link i {
    font-size: 1.5rem; /* Adjust icon size */
}

.nav-link span {
    font-size: 0.75rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: var(--card-bg);
}

.section {
    padding: 3rem 1rem; /* Increased padding for more space */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
}

@media (max-width: 375px) {
    .section {
        padding: 1rem 0.5rem;
    }
}

.section:nth-child(odd) {
    background-color: var(--bg);
}

.section:nth-child(even) {
    background-color: var(--bg-alt);
}

.hero-section {
    text-align: center;
    padding: 1rem;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--fg);
}

.hero-section h1 span {
    color: var(--accent);
    text-align: center;
}

.hero-section p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    color: var(--fg);
}

.cta-button {
    background-color: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s ease-in-out;
    text-decoration: none;
    display: inline-block;
    margin-top: 2rem;
}

.cta-button:hover {
    transform: scale(1.1);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--fg);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.space-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 0 1rem;
}

@media (max-width: 375px) {
    .space-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }
}

.space-card {
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    border: 1px solid var(--border-color);
}

.space-card:hover {
    transform: scale(1.05);
}

.space-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.space-card-content {
    padding: 1rem;
}

.space-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.space-card-desc {
    font-size: 0.875rem;
    color: var(--fg);
    opacity: 0.8;
}

a {
    color: var(--accent);
}

a:hover {
    opacity: 0.8;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
}

@media (max-width: 375px) {
    .profile-img {
        width: 120px;
        height: 120px;
    }
}

.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .about-container {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }
}

.about-content {
    flex: 1;
}

@media (max-width: 375px) {
    .about-content {
        font-size: 0.875rem;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
}