:root {
    --bg-primary: #000c24;
    --bg-secondary: #001544;
    --bg-tertiary: #081f4e;
    
    --text-primary: #fafbf3;
    --text-secondary: #b3bdd3;
    
    --accent: #4a8deb;
    --accent-glow: rgba(74, 141, 235, 0.4);
    
    --glass-bg: rgba(0, 21, 68, 0.6);
    --glass-border: rgba(74, 141, 235, 0.3);
    
    --font-heading: 'Fira Code', monospace;
    --font-body: 'Inter', sans-serif;
}

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

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

html {
    scroll-behavior: smooth;
}

/* Background Effects - Network Grid */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--bg-primary);
    background-image: 
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

.background-effects::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 30%, var(--bg-primary) 90%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    animation: float 15s infinite alternate ease-in-out;
}

.blob-1 {
    top: 10%;
    left: 10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #0066ff 0%, transparent 70%);
    animation-delay: -7s;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(5, 10, 20, 0.8);
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
}
.logo-text::before {
    content: 'root@';
    color: var(--accent);
}
.logo-text::after {
    content: ':~#';
    color: var(--text-secondary);
}

/* CLI Navbar */
.nav-cli {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 350px;
    position: relative;
    margin-left: 0.5rem;
}

.cli-prompt {
    font-family: var(--font-heading);
    color: var(--accent);
    margin-right: 0.5rem;
    font-weight: 600;
}

.cli-input-wrapper {
    flex: 1;
}

#cli-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1rem;
    outline: none;
}

#cli-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.cli-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    list-style: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 200;
    overflow: hidden;
}

.cli-suggestions li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.cli-suggestions li:hover, .cli-suggestions li.selected {
    background: var(--bg-tertiary);
    color: var(--accent);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 4rem;
}

/* Utility Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
}
.glass-panel::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 20px; height: 2px;
    background: var(--accent);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--accent);
}

.section {
    margin-bottom: 6rem;
    scroll-margin-top: 100px;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 4rem;
    margin-bottom: 6rem;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(230, 240, 255, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.hero-image-container {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--accent), var(--bg-tertiary));
    box-shadow: 0 0 30px var(--accent-glow);
    position: relative;
}

.hero-image-container::after {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border: 2px dashed var(--accent);
    border-radius: 50%;
    animation: spinRing 20s linear infinite;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background-color: var(--bg-primary);
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--accent);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    flex-grow: 1;
}

.card-meta {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

/* Split Section */
.split-section {
    display: flex;
    gap: 4rem;
}

.side-panel {
    flex: 1;
    min-width: 300px;
}

.main-panel {
    flex: 2;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.skill-tag:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

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

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
}

.timeline-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    color: var(--text-secondary);
}

/* Blog Specific */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
}

.back-btn {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.back-btn:hover {
    opacity: 0.8;
}

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

.blog-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-header .date {
    color: var(--text-secondary);
}

.markdown-body {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-body p {
    margin-bottom: 1.5rem;
}

.markdown-body a {
    color: var(--accent);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.markdown-body code {
    background: rgba(0,0,0,0.3);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
}

.markdown-body pre {
    background: rgba(0,0,0,0.5);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--text-secondary);
    font-style: italic;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 4px;
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Browser Mockup for Achievements */
.browser-mockup {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.browser-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: flex-end;
    padding: 8px 8px 0 8px;
    gap: 4px;
    overflow-x: auto;
}

.browser-header::-webkit-scrollbar {
    height: 4px;
}
.browser-header::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.browser-tab {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

.browser-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.browser-tab.active {
    background: var(--bg-primary);
    color: var(--accent);
    border-color: var(--glass-border);
    border-bottom: 1px solid var(--bg-primary);
    margin-bottom: -1px;
    font-weight: 600;
}

.browser-body {
    padding: 2rem;
    min-height: 150px;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.browser-body h3 {
    font-family: var(--font-heading);
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.browser-body p {
    color: var(--text-secondary);
}

.browser-body .year {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-content {
        padding: 0 1rem;
    }
    
    .container {
        padding: 80px 1rem 3rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        margin-top: 2rem;
        margin-bottom: 4rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .split-section {
        flex-direction: column;
        gap: 2rem;
    }

    .section {
        margin-bottom: 4rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: -1.85rem;
        width: 12px;
        height: 12px;
        top: 7px;
    }

    .blog-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .browser-body {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem 0;
    }

    .nav-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .nav-cli {
        margin-left: 0;
        max-width: 100%;
    }

    .logo-text {
        font-size: 1.25rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-image-container {
        width: 200px;
        height: 200px;
    }
    
    .hero-image-container::after {
        top: -6px; left: -6px; right: -6px; bottom: -6px;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .markdown-body {
        font-size: 1rem;
    }
}
