:root {
    --bg-base: #08080a;
    --bg-surface: rgba(20, 21, 26, 0.6);
    --bg-surface-hover: rgba(30, 32, 40, 0.8);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --accent-1: #6366f1; /* Indigo */
    --accent-2: #a855f7; /* Purple */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.2);
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* Custom Selection Highlight */
::selection {
    background: rgba(99, 102, 241, 0.4); /* Indigo */
    color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}

/* Typography Enhancements */
h1, h2, h3, h4 {
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-alt {
    background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Glassmorphism Navigation */
.glass-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(20, 21, 26, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

.links {
    display: flex;
    gap: 2rem;
}

.links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.links a:hover, .links a.active {
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-nav {
    padding: 0.5rem 1.2rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
}

.btn-nav:hover {
    background: rgba(255,255,255,0.2);
}

.primary-btn {
    background: var(--text-main);
    color: var(--bg-base);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

.icon-btn {
    padding: 0.8rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
}

.icon-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    padding-top: 5rem;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pill-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    color: var(--accent-1);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Main Content & Bento Grid */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* Bento Box General */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.bento-card {
    position: relative;
    border-radius: 24px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(15, 16, 20, 0.4) 100%);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
}

.card-inner {
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-1 {
    grid-column: span 1;
}

/* Specific Cards */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.company {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.tags {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tech-stack {
    color: var(--accent-1);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    margin-top: auto;
    font-weight: 600;
    font-size: 0.95rem;
}

.project-link:hover {
    color: var(--accent-1);
}

/* Skills Cards */
.skills-grid {
    grid-template-columns: repeat(3, 1fr);
}

.skill-card {
    padding: 2.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.footer-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.email-link {
    display: inline-block;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 5rem;
    position: relative;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-highlight);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.email-link:hover {
    color: var(--text-main);
}

.email-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* Responsive Design */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2, .col-span-1 {
        grid-column: span 1;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .glass-nav {
        width: 95%;
    }
    .links {
        display: none; /* simple mobile nav hide for now */
    }
    
    .github-chart {
        width: 100%;
        height: auto;
    }
}

/* Terminal Emulator Styles */
.terminal-window {
    width: 100%;
    max-width: 700px;
    margin: 2rem auto 0;
    background: rgba(15, 16, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: left;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.terminal-btn.close { background: #ff5f56; }
.terminal-btn.minimize { background: #ffbd2e; }
.terminal-btn.maximize { background: #27c93f; }

.terminal-title {
    flex-grow: 1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-right: 44px; /* to offset the buttons */
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #e2e8f0;
    height: 250px;
    overflow-y: auto;
    cursor: text;
}

.terminal-response-line {
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #cbd5e1;
}

.terminal-command-line {
    margin-bottom: 0.5rem;
}

.prompt {
    color: #27c93f;
    font-weight: bold;
    margin-right: 0.5rem;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    flex-grow: 1;
    outline: none;
}

/* GitHub Chart Styles */
.github-card {
    grid-column: span 3;
}

.github-chart-container {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 12px;
    /* Invert colors slightly for dark mode depending on SVG response */
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.1));
}

.github-chart {
    max-width: 100%;
}

/* Blog Specific Styles */
.page-header {
    padding: 10rem 2rem 4rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 8rem;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-post-card {
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(15, 16, 20, 0.4) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s;
}

.blog-post-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
}

.blog-date {
    color: var(--accent-1);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-post-card h2 a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.blog-post-card h2 a:hover {
    color: var(--accent-1);
}

/* Individual Blog Post Styles */
.post-header {
    margin-bottom: 3rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.post-content h2, .post-content h3 {
    margin: 2rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 2rem;
}

.post-content code {
    font-family: monospace;
    color: var(--accent-2);
}
