/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

/* --- CSS Variables (for easy theme management) --- */
:root {
    --background-color: #ffffff;
    --text-color: #111111;
    --border-color: #e0e0e0;
    --tag-bg-color: #111111;
    --tag-text-color: #ffffff;
    --button-hover-bg: #f5f5f5;
}

body.dark-mode {
    --background-color: #111111;
    --text-color: #ffffff;
    --border-color: #333333;
    --tag-bg-color: #ffffff;
    --tag-text-color: #111111;
    --button-hover-bg: #222222;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* --- Main Container --- */
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header / Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 1.5rem;
    border-left: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

nav a:hover {
    background-color: var(--button-hover-bg);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.5rem;
    border-left: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--button-hover-bg);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
}

/* --- Main Content --- */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    line-height: 1.7;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background-color: var(--tag-bg-color);
    color: var(--tag-text-color);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag svg {
    width: 14px;
    height: 14px;
    fill: var(--tag-text-color);
}

/* --- Section Styling --- */
.section {
    padding: 4rem;
    border-top: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* --- Projects Section --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-card .tags {
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    text-align: center;
    transition: background-color 0.2s ease;
}

.project-link:hover {
    background-color: var(--button-hover-bg);
}

/* --- Designs Section --- */
.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.design-card {
    border: 1px solid var(--border-color);
}

.design-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.design-card h3 {
    font-size: 1.2rem;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* --- Blog Section --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    border: 1px solid var(--border-color);
    padding: 2rem;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.blog-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.blog-card a {
    color: var(--text-color);
    text-decoration: underline;
}

/* --- Journal Section --- */
.journal-entry {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.journal-meta {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.journal-entry p {
    font-size: 1rem;
    line-height: 1.6;
}

.more-entries-link-container {
    text-align: center;
    margin-top: 2rem;
}

.more-entries-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s ease;
}

.more-entries-link:hover {
    background-color: var(--button-hover-bg);
}


/* --- Footer / Call to Action --- */
footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border-color);
}

footer a {
    text-align: center;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

footer a:first-child {
    border-right: 1px solid var(--border-color);
}

footer a:hover {
    background-color: var(--button-hover-bg);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header {
        padding: 0 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        text-align: center;
        border-right: none;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    nav {
        justify-content: center;
    }

    nav a {
        flex-grow: 1;
        text-align: center;
        padding: 1rem;
    }

    nav a:first-child {
        border-left: none;
    }

    .theme-toggle {
        padding: 1rem;
    }

    main,
    .section {
        padding: 2rem;
    }

    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        align-items: stretch;
    }

    nav a,
    .theme-toggle {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    footer {
        grid-template-columns: 1fr;
    }

    footer a:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}