/* 2026 Glassmorphism Stylesheet - Green Edition (v2) */

:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 4px 24px 0 rgba(31, 135, 60, 0.1);
    --glass-blur: blur(24px);

    --text-primary: #051907;
    --text-secondary: #2e4d32;
    --accent-color: #1b5e20;
    --accent-hover: #003300;

    --bg-gradient-1: #e0fdd0;
    --bg-gradient-2: #bbf0c8;
    --bg-gradient-3: #a4e8b0;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --font-heading: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-body: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    --code-bg: rgba(255, 255, 255, 0.6);
    --code-text: #1d1d1f;
    --code-border: rgba(0, 0, 0, 0.1);

    --card-bg: rgba(255, 255, 255, 0.4);
    --card-bg-hover: rgba(255, 255, 255, 0.6);
    --social-bg: rgba(255, 255, 255, 0.6);
    --nav-bg: rgba(255, 255, 255, 0.4);

    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(10, 25, 15, 0.75);
        --glass-border: rgba(255, 255, 255, 0.15);
        --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

        --text-primary: #ffffff;
        --text-secondary: #c8e6c9;
        --accent-color: #81c784;
        --accent-hover: #a5d6a7;

        --bg-gradient-1: #051510;
        --bg-gradient-2: #102e20;
        --bg-gradient-3: #000000;

        --code-bg: #111812;
        --code-text: #e0e0e0;
        --code-border: rgba(255, 255, 255, 0.1);

        --card-bg: rgba(20, 40, 25, 0.6);
        --card-bg-hover: rgba(30, 50, 35, 0.8);
        --social-bg: rgba(20, 40, 25, 0.6);
        --nav-bg: rgba(255, 255, 255, 0.2);
    }
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: linear-gradient(-45deg, var(--bg-gradient-1), var(--bg-gradient-2), var(--bg-gradient-3));
    background-size: 400% 400%;
    animation: gradientBG 25s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-top: 0;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.2em;
    text-align: left;
}

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

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

img {
    max-width: 100%;
    border-radius: var(--radius-md);
}

/* Main Layout Wrapper */
.main-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Glass Components */
header,
footer,
#content,
.article-index,
pre {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

/* Header */
header {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

header .wrapper {
    padding: 32px;
    display: grid;
    grid-template-areas:
        "title pfp"
        "subtitle pfp"
        "nav pfp";
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

header h1 {
    grid-area: title;
    margin: 0;
}

header h2 {
    grid-area: subtitle;
    font-size: 1.5rem;
    padding-bottom: 0px;
    border-bottom: none;
    margin: 0;
    color: var(--text-secondary);
}

header #headbar {
    grid-area: nav;
    margin-top: 16px;
    padding: 0;
}

/* Avatar */
.header-pfp {
    grid-area: pfp;
    height: 100px;
    width: 100px;
    border-radius: 50%;
    background-color: #bbf0c8;
    padding: 12px;
    object-fit: contain;
    transition: var(--transition-medium);
    margin-left: 24px;
    position: static;
    transform: none !important;
}

.header-pfp:hover {
    transform: none !important;
}

/* Navigation */
#headbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#headbar ul li {
    float: none;
}

#headbar ul li a {
    display: block;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 600;
    background: var(--nav-bg);
    transition: var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#headbar ul li a:hover,
#headbar ul li a.active {
    background: var(--accent-color);
    color: white;
    border-color: transparent;
}

/* Main Content */
#content {
    padding: 40px;
    animation: fadeIn 0.8s ease-out;
}

#content.transparent {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Articles */
.article-index {
    padding: 32px;
    margin-bottom: 30px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    display: flow-root;
    transition: border-color var(--transition-fast);
}

.article-index:hover {
    border-color: var(--accent-color);
    background: var(--card-bg-hover);
}

/* Tag Grid */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.tag-grid .article-index {
    margin-bottom: 0;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Image Floats */
.article-img {
    float: right;
    margin-left: 24px;
    margin-bottom: 16px;
    max-width: 120px;
    object-fit: contain;
}

/* Screenshot Row */
.screenshot-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin: 24px -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.screenshot-row img {
    height: 320px;
    width: auto;
    max-width: none;
    /* Fix for mobile aspect ratio */
    flex-shrink: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
    .article-img {
        float: none;
        margin: 16px auto;
        display: block;
    }
}

/* Social Grid */
.social-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.social-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--social-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.social-card:hover {
    background: var(--card-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-card img {
    width: 48px;
    height: 48px;
    margin-right: 16px;
}

.social-card .name {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.social-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}


/* Metadata Styles */
.yearmd {
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-block;
}

.yearmd::after {
    content: "·";
    margin: 0 10px;
    font-weight: 800;
    color: var(--text-primary);
}

.article-taglist {
    margin-top: 12px;
}

.article-taglist a {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    color: #1a4d2e;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .article-taglist a {
        background: rgba(255, 255, 255, 0.15);
        color: #a5d6a7;
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.article-taglist a:hover {
    background: var(--accent-color);
    color: white;
    border-color: transparent;
}

/* Typography Tweaks */
h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-left: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

header h2 {
    border-bottom: none;
}

h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

h3 a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

h3 a:hover {
    color: var(--accent-color);
}

p {
    margin: 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Code Blocks */
pre {
    padding: 24px;
    margin: 24px 0;
    overflow-x: auto;
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
}

/* Footer */
footer {
    text-align: center;
    padding: 24px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .main-layout {
        padding: 24px 16px;
        gap: 24px;
    }

    header .wrapper {
        grid-template-areas:
            "pfp"
            "title"
            "subtitle"
            "nav";
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 12px;
    }

    .header-pfp {
        margin-left: 0;
        margin-bottom: 10px;
    }

    h1 {
        text-align: center;
    }

    #headbar ul {
        justify-content: center;
    }

    #content {
        padding: 24px;
    }
}
