/* ==========================================
   ProbablyNotADev - Main Stylesheet
   A developer blog with terminal aesthetics
   ========================================== */

/* CSS Variables */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #14141c;
    --bg-card-hover: #1c1c28;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-primary: #00ff88;
    --accent-secondary: #00ccff;
    --accent-gradient: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    
    --border-color: #2a2a38;
    --border-glow: rgba(0, 255, 136, 0.3);
    
    --terminal-bg: #0d0d12;
    --terminal-header: #1a1a24;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.15);
    
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --container-max: 1200px;
    --content-max: 800px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f2f8;
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a60;
    --text-muted: #8a8aa0;
    
    --accent-primary: #00b368;
    --accent-secondary: #0099cc;
    --accent-gradient: linear-gradient(135deg, #00b368 0%, #0099cc 100%);
    
    --border-color: #e0e2ea;
    --border-glow: rgba(0, 179, 104, 0.3);
    
    --terminal-bg: #1a1a2e;
    --terminal-header: #252540;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(0, 179, 104, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Background Grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

[data-theme="light"] .bg-grid {
    background-image: 
        linear-gradient(rgba(0, 179, 104, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 179, 104, 0.05) 1px, transparent 1px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-normal);
}

[data-theme="light"] .nav {
    background: rgba(248, 249, 252, 0.9);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-bracket {
    color: var(--accent-primary);
    font-weight: 700;
}

.logo-highlight {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 120px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.title-line {
    display: block;
}

.title-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Terminal */
.hero-terminal {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.terminal-header {
    background: var(--terminal-header);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.terminal-line {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.terminal-line.output {
    color: var(--text-secondary);
    padding-left: 20px;
}

.terminal-line.output.success {
    color: var(--accent-primary);
}

.prompt {
    color: var(--accent-primary);
    margin-right: 8px;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Main Content */
.main {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Posts Section */
.posts-section {
    margin-bottom: 80px;
}

.section-header {
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Post Card */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.post-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.post-card.featured {
    grid-column: span 2;
}

.post-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-gradient);
    color: #000;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.post-content {
    padding: 28px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.post-date {
    color: var(--text-muted);
}

.post-category {
    color: var(--accent-primary);
    font-weight: 500;
}

.post-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-title a:hover {
    color: var(--accent-primary);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--accent-primary);
    transition: gap var(--transition-fast);
}

.read-more:hover {
    gap: 12px;
}

/* CTA Section */
.cta-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px;
    text-align: center;
}

.cta-title {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.cta-text {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 24px 24px;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo-text {
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

.footer-tagline {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-column a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================
   Responsive Styles
   ========================================== */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        min-height: auto;
        padding-top: 100px;
    }
    
    .hero-terminal {
        max-width: 500px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 100px 20px 60px;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .cta-section {
        padding: 40px 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .terminal-body {
        font-size: 0.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   Post Page Styles
   ========================================== */

.post-page {
    padding-top: 100px;
}

.post-header {
    max-width: var(--content-max);
    margin: 0 auto 40px;
    padding: 0 24px;
}

.post-header .post-meta {
    margin-bottom: 20px;
}

.post-header .post-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.post-header .post-excerpt {
    font-size: 1.15rem;
    line-height: 1.7;
}

.post-body {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px 80px;
}

.post-body h2 {
    font-size: 1.75rem;
    margin: 48px 0 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.post-body h3 {
    font-size: 1.35rem;
    margin: 32px 0 16px;
}

.post-body p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-body ul, .post-body ol {
    margin: 20px 0;
    padding-left: 28px;
    color: var(--text-secondary);
}

.post-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.post-body code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-body pre {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.post-body blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-body a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-body a:hover {
    color: var(--accent-secondary);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent-primary);
}

/* ==========================================
   About Page Styles
   ========================================== */

.about-page {
    padding-top: 100px;
    max-width: var(--content-max);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.about-header p {
    color: var(--text-secondary);
    font-size: 1.15rem;
}

.about-content {
    margin-bottom: 60px;
}

.about-content h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.tech-category h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tech-category ul {
    list-style: none;
}

.tech-category li {
    color: var(--text-secondary);
    padding: 6px 0;
    font-size: 0.95rem;
}

.tech-category li::before {
    content: '→';
    color: var(--accent-primary);
    margin-right: 8px;
}

/* ==========================================
   Projects Page Styles
   ========================================== */

.projects-page {
    padding-top: 100px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 80px;
}

.projects-header {
    text-align: center;
    margin-bottom: 60px;
}

.projects-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.projects-header p {
    color: var(--text-secondary);
    font-size: 1.15rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-normal);
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.project-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 50px;
    font-family: var(--font-mono);
}
