/* Import Professional Font - Space Grotesk (same as Ram Goel's site) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables for Theme */
:root {
    --bg-color: #ffffff;
    --text-color: #1f2328;
    --text-muted: #656d76;
    --link-color: #0969da;
    --border-color: #d0d7de;
    --accent-color: #0969da;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --text-muted: #8d96a0;
    --link-color: #4493f8;
    --border-color: #30363d;
    --accent-color: #4493f8;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    padding: 40px 20px;
}

.container {
    max-width: 720px;
    margin: 0 auto;
}

/* Navigation */
nav {
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.site-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 15px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--link-color);
}

.nav-links a.active {
    color: var(--link-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--link-color);
}

/* Typography */
h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    margin-top: 48px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
}

p {
    font-size: 16px;
    margin-bottom: 16px;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.7;
}

a:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Intro Section (About Page) */
.intro {
    margin-bottom: 40px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.motto {
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 24px;
}

/* Project Cards */
.project {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.project:last-child {
    border-bottom: none;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all var(--transition);
}

.icon-link:hover {
    border-color: var(--link-color);
    opacity: 1;
}

.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tech-stack {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--link-color);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    font-family: inherit;
    transition: opacity var(--transition);
    margin-top: 8px;
}

.read-more-btn:hover {
    opacity: 0.7;
}

.project-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.project-details.active {
    max-height: 2000px;
    opacity: 1;
    margin-top: 24px;
}

.project-details h4 {
    color: var(--text-color);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 24px;
    margin-bottom: 12px;
}

.project-details p {
    color: var(--text-color);
    line-height: 1.7;
}

/* Coding Profile Cards */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.profile-card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color var(--transition);
    text-align: center;
}

.profile-card:hover {
    border-color: var(--link-color);
}

.profile-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.profile-stat {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-link {
    font-size: 14px;
    color: var(--link-color);
}

/* Blog Posts */
.blog-list {
    list-style: none;
}

.blog-item {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.blog-date {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-toggle {
    font-size: 14px;
    color: var(--link-color);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
}

.blog-toggle:hover {
    opacity: 0.7;
}

.blog-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.blog-content.active {
    max-height: 5000px;
    opacity: 1;
    margin-top: 16px;
}

/* Markdown Content */
.markdown-content {
    line-height: 1.7;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.markdown-content code {
    background-color: var(--border-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.markdown-content pre {
    background-color: var(--border-color);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.markdown-content li {
    margin-bottom: 8px;
}

/* Certifications */
.cert-list {
    list-style: none;
}

.cert-item {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cert-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.cert-org {
    font-size: 14px;
    color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition);
    z-index: 100;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

/* Footer */
footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: 24px 16px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 20px;
    }

    .nav-links {
        gap: 16px;
        font-size: 14px;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
    }
}