/* Import JetBrains Mono font */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* CSS Variables for Theming */
:root {
    --bg-color: #fff;
    --text-color: #333;
    --text-secondary: #666;
    --text-heading: #222;
    --text-meta: #666;
    --border-color: #e0e0e0;
    --code-bg: rgba(224, 224, 224, 0.4);
    --link-color: #0066cc;
    --nav-bg: #fff;
    --button-bg: #333;
    --button-text: #fff;
    --button-hover-bg: #fff;
    --button-hover-text: #333;
    --button-border: #333;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-heading: #f0f0f0;
    --text-meta: #a0a0a0;
    --border-color: #404040;
    --code-bg: rgba(64, 64, 64, 0.4);
    --link-color: #6699ff;
    --nav-bg: #1a1a1a;
    --button-bg: #e0e0e0;
    --button-text: #1a1a1a;
    --button-hover-bg: #1a1a1a;
    --button-hover-text: #e0e0e0;
    --button-border: #e0e0e0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
nav {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--nav-bg);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

nav a {
    margin-right: 2rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-secondary);
}

/* Main Content */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.content {
    padding-top: 3rem;
}

/* Centered Content (Landing Page) */
.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    text-align: center;
}

.center-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-heading);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.button {
    display: inline-block;
    min-width: 140px;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--button-text);
    background-color: var(--button-bg);
    border: 2px solid var(--button-border);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
    text-decoration: none;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-heading);
}

h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* About Page */
section {
    margin-bottom: 3rem;
}

.meta {
    color: var(--text-meta);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.job, .degree {
    margin-bottom: 2rem;
}

.job h3, .degree h3 {
    margin-top: 0;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.skill-category {
    margin-bottom: 0;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

.skill-category p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Blog Styles */
.blog-list {
    margin-top: 2rem;
}

.blog-preview {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-preview:last-child {
    border-bottom: none;
}

.blog-preview h2 {
    margin-top: 0;
    font-size: 1.8rem;
}

.blog-preview h2 a {
    color: var(--text-heading);
    text-decoration: none;
}

.blog-preview h2 a:hover {
    color: var(--link-color);
}

.blog-preview .meta {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

/* Individual Blog Post */
.blog-post {
    line-height: 1.8;
}

.blog-post h1 {
    margin-bottom: 0.5rem;
}

.blog-post .meta {
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.blog-post h2 {
    margin-top: 2.5rem;
}

.blog-post ul {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.blog-post pre {
    background-color: var(--code-bg);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 2rem auto;
    width: 52%;
}

.blog-post pre code {
    display: block;
    line-height: 1.6;
    white-space: pre;
    color: var(--text-color);
}

.blog-post code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--text-color);
}

.blog-post pre code {
    background-color: transparent;
    padding: 0;
}

.blog-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.blog-nav a {
    color: var(--link-color);
    font-weight: 500;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--button-bg);
    border: 2px solid var(--button-border);
    color: var(--button-text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .center-content h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .button {
        width: 100%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    nav {
        padding: 1rem;
    }
    
    nav a {
        margin-right: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
