/* Hacker theme inspired CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Roboto Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
    background-color: #000802;
    color: #c9d1d9;
    line-height: 1.6;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Game of Life Canvas */
#game-of-life {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Theme Toggle Button - Ship Wheel */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 25px;
    height: 25px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.6s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle.rotating {
    transform: rotate(360deg);
}

/* White/Music Theme */
body.music-theme {
    background-color: #f5f5f5;
    color: #2d2d2d;
    font-family: 'Cormorant Unicase', serif;
    font-size: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
}

/* Main content wrapper */
main.container {
    max-width: 550px;
    background-color: rgba(21, 21, 21, 0.4);
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 15px;
    margin: 15px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
    width: calc(100% - 40px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.music-theme main.container {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 550px;
    width: calc(100% - 40px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Header */
header {
    position: relative;
    border-bottom: 1px solid #30363d;
    margin-bottom: 15px;
    padding: 20px 0 10px 0;
    transition: all 0.5s ease;
}

body.music-theme header {
    border-bottom: 1px solid transparent;
    padding: 20px 0 10px 0;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
    transition: all 0.5s ease;
    text-align: center;
}

body.music-theme .header-content {
    text-align: center;
}

header h1 {
    color: #50fa7b;
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.5s ease;
    min-height: 30px;
}

body.music-theme header h1 {
    color: #2d2d2d;
    text-shadow: none;
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 8px;
}

.tagline {
    color: #e6edf3;
    font-size: 14px;
    margin-bottom: 12px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    transition: all 0.5s ease;
    min-height: 18px;
}

body.music-theme .tagline {
    color: #888888;
    text-shadow: none;
    font-size: 20px;
    margin-bottom: 12px;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    min-height: 28px;
    overflow: hidden;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform: translateY(0);
    opacity: 1;
}

body.music-theme .nav-buttons {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.btn {
    display: inline-block;
    background-color: rgba(80, 250, 123, 0.1);
    color: #50fa7b;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #50fa7b;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #50fa7b;
    color: #151515;
}

body.music-theme .btn {
    background-color: rgba(45, 45, 45, 0.05);
    color: #2d2d2d;
    border: 1px solid #2d2d2d;
}

body.music-theme .btn:hover {
    background-color: #2d2d2d;
    color: #ffffff;
}

/* Main content */
main h1 {
    color: #50fa7b;
    font-size: 20px;
    margin: 16px 0 8px 0;
    border-bottom: 1px solid #30363d;
    padding-bottom: 6px;
    transition: all 0.5s ease;
}

body.music-theme main h1 {
    color: #2d2d2d;
    border-bottom: 1px solid transparent;
    font-size: 28px;
    font-weight: 400;
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
}

main h2 {
    color: #50fa7b;
    font-size: 16px;
    margin: 12px 0 6px 0;
    transition: color 0.5s ease;
}

body.music-theme main h2 {
    color: #2d2d2d;
    font-weight: 400;
    font-size: 22px;
}

main h3 {
    color: #c9d1d9;
    font-size: 14px;
    font-weight: normal;
    margin: 8px 0;
    transition: color 0.5s ease;
}

body.music-theme main h3 {
    color: #666666;
    font-size: 20px;
    line-height: 1.6;
}

hr {
    border: none;
    border-top: 1px solid #30363d;
    margin: 12px 0;
    transition: border-color 0.5s ease;
}

body.music-theme hr {
    border-top: 1px solid #e0e0e0;
    margin: 12px 0;
}

/* Lists */
ul {
    list-style: none;
    margin: 6px 0;
}

ul li {
    margin: 5px 0;
    padding-left: 15px;
    position: relative;
}

ul li:before {
    content: "λ";
    position: absolute;
    left: 0;
    color: #50fa7b;
    transition: color 0.5s ease;
}

body.music-theme ul li:before {
    content: "•";
    color: #2d2d2d;
}

/* Links */
a {
    color: #50fa7b;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

body.music-theme a {
    color: #2d2d2d;
    text-decoration: underline;
}

body.music-theme a:hover {
    color: #666666;
}

/* Blockquote */
blockquote {
    border-left: 3px solid #50fa7b;
    padding-left: 12px;
    margin: 6px 0;
    color: #8b949e;
    font-style: italic;
    transition: all 0.5s ease;
}

body.music-theme blockquote {
    border-left: 3px solid #2d2d2d;
    color: #666666;
}

/* Expand/Collapse Link */
.expand-link {
    display: inline-block;
    margin: 8px 0;
    font-size: 9px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.collapsible-section {
    margin: 6px 0;
    border-top: 1px solid #30363d;
    border-bottom: 1px solid #30363d;
    padding: 4px 0;
    transition: border-color 0.5s ease;
}

body.music-theme .collapsible-section {
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.collapsible-header span:first-child {
    font-weight: normal;
    color: #50fa7b;
    transition: color 0.5s ease;
}

body.music-theme .collapsible-header span:first-child {
    color: #2d2d2d;
}

.toggle-icon {
    font-size: 16px;
    line-height: 1;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out, padding 0.6s ease-in-out;
    margin-top: 6px;
    padding-top: 0;
}

.collapsible-content.expanded {
    max-height: 1000px;
    padding-top: 4px;
}

/* Code */
code {
    background-color: #0d1117;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 11px;
}

pre {
    background-color: #0d1117;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #30363d;
    margin: 10px 0;
}

pre code {
    background: none;
    padding: 0;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #30363d;
    color: #8b949e;
    font-size: 14px;
    transition: all 0.5s ease;
    margin-top: auto;
}

body.music-theme footer {
    border-top: 1px solid #e0e0e0;
    color: #888888;
}

/* Blog specific styles */
.blog-list {
    list-style: none;
}

.blog-item {
    margin: 15px 0;
    padding: 15px;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
}

.blog-item h2 {
    margin-top: 0;
}

.blog-meta {
    color: #8b949e;
    font-size: 13px;
    margin: 3px 0;
}

.blog-content {
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    body {
        font-size: 10px;
    }

    header h1 {
        font-size: 16px;
    }

    .tagline {
        font-size: 10px;
    }

    main.container {
        max-width: 95%;
        padding: 20px;
        margin: 15px auto;
    }
}

/* Back to top button */
.back-to-blogs {
    display: inline-block;
    margin: 12px 0;
    color: #50fa7b;
    border: 1px solid #50fa7b;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 11px;
}

.back-to-blogs:hover {
    background-color: rgba(80, 250, 123, 0.1);
}
