@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;600&display=swap');

:root {
    /* Premium Dark IDE Theme Colors */
    --bg-dark: #121212;
    --bg-panel: #1e1e1e;
    --bg-card: #252526;
    --text-main: #d4d4d4;
    --text-muted: #858585;

    /* IDE Syntax Highlighting Colors */
    --color-keyword: #569cd6;
    /* Blue */
    --color-string: #ce9178;
    /* Orange */
    --color-number: #b5cea8;
    /* Light Green */
    --color-comment: #6a9955;
    /* Green */
    --color-func: #dcdcaa;
    /* Yellow */
    --color-type: #4ec9b0;
    /* Teal */
    --color-variable: #9cdcfe;
    /* Light Blue */

    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle background pattern */
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Typography */
h1,
h2,
h3,
.code-font {
    font-family: 'Fira Code', monospace;
}

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

a:hover {
    color: var(--color-type);
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Header & Intro */
header {
    background: var(--bg-panel);
    border: 1px solid #333;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Gradient Top Border */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-keyword), var(--color-type), var(--color-func));
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px dashed #3c3c3c;
    padding-bottom: 20px;
}

.title {
    font-size: 1.4rem;
    font-weight: 500;
}

/* Syntax Highlighted Classes */
.line-num {
    color: var(--text-muted);
    margin-right: 15px;
    user-select: none;
}

.keyword {
    color: var(--color-keyword);
}

.string {
    color: var(--color-string);
}

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

.comment {
    color: var(--color-comment);
    font-style: italic;
}

.func {
    color: var(--color-func);
}

.variable {
    color: var(--color-variable);
}

/* Typing Animation Container */
.typewriter-wrapper {
    display: inline-block;
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--text-main);
    animation: typing 2.5s steps(40, end), blink-caret .75s step-end infinite;
    max-width: fit-content;
}

@keyframes typing {
    from {
        width: 0;
        opacity: 0;
    }

    1% {
        opacity: 1;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--text-main);
    }
}

/* Social Links */
.social-links a {
    font-size: 1.6rem;
    color: var(--text-muted);
    transition: transform 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    transform: scale(1.15) rotate(5deg);
}

.social-links .fa-instagram:hover {
    color: #E1306C;
    /* Instagram gradient feel */
}

.social-links .bluesky-icon:hover {
    color: #0085FF;
    /* Bluesky color */
}

/* Intro Text */
.intro-text {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.intro-text p {
    display: flex;
}

.intro-text .line-num {
    min-width: 25px;
}

/* Section Headings */
.section-title {
    font-size: 1.25rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.section-title::before {
    content: '>';
    color: var(--color-keyword);
    font-weight: bold;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border-color: #555;
}

.card-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-tag {
    font-size: 0.75rem;
    font-family: 'Fira Code', monospace;
    color: var(--color-type);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 15px;
    color: var(--color-func);
    font-weight: 600;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-comment);
    border-top: 1px dashed #3c3c3c;
    padding-top: 15px;
    font-family: 'Fira Code', monospace;
}

.read-more {
    color: var(--color-keyword);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card:hover .read-more {
    color: var(--color-variable);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }

    header {
        padding: 25px 15px;
    }

    .title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .title {
        font-size: 1.05rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}
/* Editor Navigation (Project Pages) */
.editor-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-panel);
    padding: 15px 25px;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.nav-back {
    color: var(--color-string);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.nav-back:hover {
    color: var(--color-variable);
}

.nav-separator {
    color: var(--text-muted);
}

.nav-current {
    color: var(--color-func);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Markdown Styled Content */
.markdown-body {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.markdown-body h1 {
    font-size: 2rem;
    color: var(--color-type);
    margin-bottom: 10px;
    border-bottom: 1px dashed #3c3c3c;
    padding-bottom: 15px;
}

.markdown-body h2 {
    font-size: 1.5rem;
    color: var(--color-keyword);
    margin-top: 40px;
    margin-bottom: 15px;
}

.markdown-body p {
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.8;
}

.markdown-body ul {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.markdown-body li {
    margin-bottom: 8px;
}

.meta-info {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.hero-image-wrapper {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    border: 1px solid #333;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

pre {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid #333;
    overflow-x: auto;
    margin: 25px 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px dashed #3c3c3c;
    margin-top: auto;
}

.footer-content {
    font-size: 0.85rem;
}