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

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

body {
    min-height: 100vh;
    background: url('images/shuksan-close.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'JetBrains Mono', monospace;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 200, 210, 0.7);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    z-index: 0;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    height: 28px;
}

.nav-content {
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
}

.nav-brand {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0;
    border-bottom: none;
    padding: 0 12px 0 0;
}

.nav-brand:hover {
    color: rgba(0, 0, 0, 1);
    border-bottom: none;
}

.nav-links {
    display: flex;
    gap: 0;
}

.nav-links a {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    padding: 4px 12px;
    border-bottom: none;
    transition: background 0.1s ease;
}

.nav-links a:hover {
    color: rgba(0, 0, 0, 1);
    background: rgba(0, 0, 0, 0.05);
    border-bottom: none;
}

.nav-links.mobile-only {
    display: none;
}


.sidebar {
    position: fixed;
    left: 0;
    top: 28px;
    bottom: 0;
    width: 220px;
    background: transparent;
    border-right: none;
    z-index: 50;
    padding: 1.25rem 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: rgba(0, 0, 0, 0.75);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.9);
    border: none;
    border-left: 3px solid transparent;
}

.sidebar-link.active {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.95);
    border-left: 3px solid rgba(60, 80, 100, 0.6);
}

.sidebar-icon {
    font-size: 14px;
    opacity: 0.5;
    width: 1.25rem;
    text-align: center;
}

.sidebar-dropdown {
    display: flex;
    flex-direction: column;
}

.sidebar-chevron-btn {
    background: none;
    border: none;
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.sidebar-chevron-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.sidebar-chevron {
    font-size: 11px;
    opacity: 0.4;
    transition: transform 0.15s ease;
}

.sidebar-dropdown.open .sidebar-chevron {
    transform: rotate(45deg);
}

.sidebar-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.sidebar-dropdown.open .sidebar-dropdown-content {
    max-height: 500px;
}

.sidebar-dropdown-items {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0;
}

.sidebar-sublink {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 2.75rem;
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
    font-size: 14px;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-sublink:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.85);
    border: none;
    border-left: 3px solid transparent;
}

.sidebar-sublink.active {
    color: rgba(0, 0, 0, 0.9);
    border-left: 3px solid rgba(60, 80, 100, 0.4);
}

.site-layout {
    position: relative;
    z-index: 1;
    margin-left: 220px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    /* Top padding accounts for navbar (28px) + spacing */
    padding: calc(28px + 2rem) clamp(1rem, 5vw, 3rem) 4rem;
    /* Offset for sidebar to visually center the content on screen */
    padding-right: calc(clamp(1rem, 5vw, 3rem) + 220px);
}

.main-content {
    width: 100%;
    max-width: 900px;
}

.window {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 0;
}

.window-titlebar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 32px;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.window-title {
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
}

.window-body {
    padding: clamp(1rem, 4vw, 2rem);
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    border-radius: 0 0 12px 12px;
}

.glass-container {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    padding: 2rem;
}

h1 {
    color: #1a2a35;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

h2 {
    color: #2a3a45;
    font-size: 1.3rem;
    font-weight: 400;
    margin: 1.5rem 0 0.75rem 0;
}

h3 {
    color: #2a3a45;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 1rem 0 0.5rem 0;
}

p {
    font-size: 1rem;
    color: #2a3a45;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}


a {
    color: #1a2a35;
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 42, 53, 0.3);
    transition: all 0.15s ease;
}

a:hover {
    color: #0a1a25;
    border-bottom-color: rgba(26, 42, 53, 0.6);
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #2a3a45;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    padding: 0.6rem 0;
    color: #2a3a45;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

li:last-child {
    border-bottom: none;
}

.blog-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.blog-list .date {
    font-size: 0.8rem;
    color: rgba(42, 58, 69, 0.6);
    white-space: nowrap;
}


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

.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    color: #2a3a45;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    text-decoration: none;
    transition: all 0.15s ease;
}

.tag:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.tag.active {
    background: rgba(60, 80, 90, 0.2);
    border-color: rgba(60, 80, 90, 0.4);
}

.tag-filter {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tag-filter-label {
    font-size: 0.75rem;
    color: rgba(42, 58, 69, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}


form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

input[type="text"],
textarea {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    font-family: inherit;
    color: #2a3a45;
    outline: none;
    transition: border-color 0.15s ease;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: rgba(42, 58, 69, 0.5);
}

input[type="text"]:focus,
textarea:focus {
    border-color: rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(0, 0, 0, 0.4);
}

button {
    padding: 0.75rem 1.5rem;
    background: rgba(60, 80, 90, 0.7);
    border: none;
    border-bottom: 2px solid rgba(40, 60, 70, 0.8);
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

button:hover {
    background: rgba(60, 80, 90, 0.85);
}

button:active {
    border-bottom-width: 1px;
    transform: translateY(1px);
}


.blog-content {
    margin-top: 1.5rem;
}

.blog-content h1,
.blog-content h2,
.blog-content h3 {
    margin-top: 2rem;
}

.blog-content h1:first-child,
.blog-content h2:first-child,
.blog-content h3:first-child {
    margin-top: 0;
}

.blog-content pre {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.blog-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.blog-content p code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.4rem;
}

.blog-content ul,
.blog-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-content ul {
    list-style: disc;
}

.blog-content ol {
    list-style: decimal;
}

.blog-content li {
    border-bottom: none;
    padding: 0.25rem 0;
}

.meta {
    font-size: 0.85rem;
    color: rgba(42, 58, 69, 0.6);
    margin-bottom: 1rem;
}


.about-section {
    margin-bottom: 2rem;
}

.about-photo {
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-photo img {
    max-width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
}


@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .site-layout {
        margin-left: 0;
        padding-right: clamp(1rem, 5vw, 3rem);
    }

    .nav-links.mobile-only {
        display: flex;
    }
}

@media (max-width: 600px) {
    .site-layout {
        /* 44px navbar + 1rem spacing on mobile */
        padding-top: calc(44px + 1rem);
        padding-bottom: 2rem;
    }

    .main-content {
        padding: 0;
    }

    .glass-container {
        padding: 1.5rem 1rem;
    }

    .navbar {
        height: 44px;
    }

    .navbar:hover {
        height: 44px;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    .blog-list li {
        flex-direction: column;
        gap: 0.25rem;
    }
}
