/* Global Styles */
:root {
    --primary-color: #512BD4;
    --secondary-color: #0078d4;
    --background-color: #ffffff;
    --text-color: #333333;
    --card-background: #f8f9fa;
    --border-color: #e1e4e8;
    --hover-color: #f0f0f0;
    --code-background: #f6f8fa;
    --footer-background: #f8f9fa;
    --gradient-start: #ffffff;
    --gradient-end: #f8f9fa;
    --header-bg: #ffffff;
    --header-text: #333333;
    --link-color: #0366d6;
    --link-hover: #2ea44f;
    --author-name-color: #512BD4;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --hero-overlay-start: rgba(255, 255, 255, 0.9);
    --hero-overlay-end: rgba(248, 249, 250, 0.9);
    --hero-text: #333333;
    --hero-icon: #512BD4;
    --cta-text: #ffffff;
    --cta-hover: #0078d4;
}

[data-theme="dark"] {
    --primary-color: #512BD4;
    --secondary-color: #4ECDC4;
    --background-color: #0f172A;
    --text-color: #c9d1d9;
    --card-background: #161b22;
    --border-color: #30363d;
    --hover-color: #21262d;
    --code-background: #161b22;
    --footer-background: #0f172A;
    --gradient-start: #0f172A;
    --gradient-end: #1a2135;
    --header-bg: #0f172A;
    --header-text: #c9d1d9;
    --link-color: #7EE7F2;
    --link-hover: #A6FFFA;
    --author-name-color: #512BD4;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --hero-overlay-start: rgba(15, 23, 42, 0.9);
    --hero-overlay-end: rgba(26, 33, 53, 0.9);
    --hero-text: #c9d1d9;
    --hero-icon: #c9d1d9;
    --cta-text: #c9d1d9;
    --cta-hover: #A6FFFA;
}

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

body {
    padding-top: 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
}

/* Navigation */
.navbar {
    background-color: var(--header-bg);
    position: fixed;
    width: 100%;
    top: 0px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--header-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.3s;
    margin-left: 1rem;
}

.theme-toggle:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--hero-text);
    background: linear-gradient(var(--hero-overlay-start), var(--hero-overlay-end)) center center / cover, url(https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80);
    background-position: center center;
    padding: 0px 1rem;
}

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

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--hero-text);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 4rem;
    opacity: 0.9;
    color: var(--hero-text);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--hero-text);
}

.feature i {
    font-size: 2rem;
    color: var(--hero-icon);
    opacity: 0.9;
}

.feature span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--hero-text);
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background-color: var(--primary-color);
    color: var(--cta-text);
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 1px 0 rgba(27,31,35,0.04);
    border: none;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(27,31,35,0.04), 0 1px 0 rgba(27,31,35,0.1);
    opacity: 0.9;
    background-color: var(--cta-hover);
}

/* Data Structures Section */
.data-structures {
    padding: 6rem 2rem;
    background-color: var(--background-color);
}

.data-structures h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.data-structures-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.single-data-structure-card {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 2rem;
    flex-direction: row;
}

.data-structure-theory {
    flex: 1;
    min-width: 0;
}

.data-structure-theory h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.data-structure-theory p {
     margin-bottom: 1.5rem;
     font-size: 1.1rem;
     color: var(--text-color);
     opacity: 0.9;
}

.data-structure-theory h5 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.data-structure-theory ul {
    list-style: disc inside;
    margin: 1.5rem 0;
    padding-left: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.data-structure-theory li {
    margin-bottom: 0.8rem;
    padding-left: 0;
    position: static;
}

/* Code Blocks within single data structure cards */
.single-data-structure-card .code-example {
    flex: 1;
    min-width: 0;
    background-color: var(--code-background);
    border-radius: 10px;
    padding: 1.5rem;
    height: fit-content;
    overflow: hidden;
}

.single-data-structure-card .code-example pre {
    margin: 0;
    overflow-x: auto;
    max-height: 400px;
    padding: 0;
}

.single-data-structure-card .code-example code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

/* Algorithms Section */
.algorithms {
    padding: 6rem 2rem;
    background-color: var(--card-background);
}

.algorithms h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.algorithm-category {
    margin-bottom: 4rem;
}

.algorithm-category h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.single-algorithm-card {
    background-color: var(--background-color);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-direction: row;
}

.algorithm-theory {
    flex: 1;
    min-width: 0;
}

.algorithm-theory h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.algorithm-theory p {
     margin-bottom: 1.5rem;
     font-size: 1.1rem;
     color: var(--text-color);
     opacity: 0.9;
}

.algorithm-theory h5 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.algorithm-theory ul {
    list-style: disc inside;
    margin: 1.5rem 0;
    padding-left: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.algorithm-theory li {
    margin-bottom: 0.8rem;
    padding-left: 0;
    position: static;
}

/* Code Blocks within single algorithm cards */
.single-algorithm-card .code-example {
    flex: 1;
    min-width: 0;
    background-color: var(--code-background);
    border-radius: 10px;
    padding: 1.5rem;
    height: fit-content;
    overflow: hidden;
}

.single-algorithm-card .code-example pre {
    margin: 0;
    overflow-x: auto;
    max-height: 400px;
    padding: 0;
}

.single-algorithm-card .code-example code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

/* Complexity Section */
.complexity {
    padding: 6rem 2rem;
    background-color: var(--background-color);
}

.complexity h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.complexity-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.complexity-card {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 2rem;
}

.complexity-content {
    flex: 1;
    min-width: 0;
}

.complexity-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.complexity-card ul {
    list-style: none;
    font-size: 1.1rem;
}

.complexity-card li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.complexity-card li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Resources Section */
.resources {
    padding: 6rem 2rem;
    background-color: var(--card-background);
}

.resources h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.resource-card {
    background-color: var(--background-color);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.resource-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.resource-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.resource-card ul {
    list-style: none;
}

.resource-card li {
    margin-bottom: 1.5rem;
}

.resource-card strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.resource-card p {
    color: var(--text-color);
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--footer-background);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.8;
}

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

.footer-section a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--link-hover);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.author-info {
    margin-top: 1.5rem;
}

.author-info p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.author-name {
    color: var(--author-name-color);
    font-weight: 600;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--text-color);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.social-link:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: translateY(-2px);
}

/* Mobile Navigation */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .burger {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .single-data-structure-card {
        flex-direction: column;
    }

    .data-structure-theory,
    .single-data-structure-card .code-example {
        flex: none;
        width: 100%;
    }

    .single-data-structure-card .code-example pre {
        max-height: 300px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Code Syntax Highlighting */
code[class*="language-"],
pre[class*="language-"] {
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    color: #c3cee3;
    background: var(--code-background);
    font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 1em;
    line-height: 1.5;
    tab-size: 4;
    hyphens: none;
    border-radius: 8px;
} 