:root {
    --main-text-color: rgb(163, 163, 163);
}

html {
    font-size: 130%;
    /* Always reserve the scrollbar gutter so toggling overflow:hidden
       (e.g. the intro scroll-lock) doesn't shift centered content */
    scrollbar-gutter: stable;
}

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

/* Any author `display` rule outranks the UA stylesheet's [hidden], so a
   display:grid/flex element stays visible when JS sets .hidden. Restore it. */
[hidden] {
    display: none !important;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    background-color: #000000;
    color: rgb(163, 163, 163);
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 100vh;
}

/* Text Selection */
::selection {
    background-color: #ffffff;
    color: #000000;
}

::-moz-selection {
    background-color: #ffffff;
    color: #000000;
}

a {
    text-decoration: none;
    color: rgb(115, 115, 115);
}

/* Main Grid Container */

/* Navbar - Grid column 1, centered */
.navbar {
    display: none;
    background-color: #2a2a2a;
    border-color: #404040;
}

.navbar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

.navbar-title {
    display: none;
    color: rgb(163, 163, 163);
}

.search-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.search-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: rgb(163, 163, 163);
}

.search-box {
    position: fixed;
    top: 20px;
    left: 220px;
    display: none;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    padding: 10px 16px;
    gap: 8px;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    background-color: #1a1a1a;
    border-color: #404040;
}

.search-box.active {
    display: flex;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 4px 4px;
    background: transparent;
    min-width: 0;
    color: rgb(163, 163, 163);
}

.search-input::placeholder {
    color: #666;
}

.search-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.search-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-close-btn svg {
    width: 18px;
    height: 18px;
    color: rgb(163, 163, 163);
}

.navbar-section {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: none;
    color: rgb(163, 163, 163);
}

.navbar ul {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.navbar li {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.navbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px;
    font-size: 0;
    transition: all 0.3s ease;
    border-radius: 10px;
    color: rgb(163, 163, 163);
}

.navbar a .icon {
    width: 20px;
    height: 20px;
    margin-right: 0;
    flex-shrink: 0;
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    color: rgb(163, 163, 163);
}

.navbar a.active {
    background-color: rgba(255, 255, 255, 0.09);
    border-radius: 10px;
}

/* Main Content Area */
.main-content {
    grid-column: 1;
    padding: 50px 40px 100px 40px;
    max-width: 686px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    /* Transparent so the pixel-wave canvas shows through; body paints the page */
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1.08rem);
    color: var(--main-text-color);
    text-decoration: none;
    width: 100%;
    background-color: transparent;
}

/* Content sections for demonstration */
.content-section {
    margin-bottom: 60px;
    color: rgb(115, 115, 115);
    text-decoration: none;
}

/* Hero Section */
.hero-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 120px;
    margin-bottom: 0;
}

.hero-portrait-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 12px;
}

.hero-portrait {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center top;
}

/* Now Playing — Variant 3 */
.now-playing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 120px;
    margin-top: 10px
}

.np-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.np-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s ease;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.np-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.np-btn svg {
    width: 10px;
    height: 10px;
}

@keyframes np-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
    50%       { opacity: 0.5; box-shadow: 0 0 3px rgba(74, 222, 128, 0.15); }
}

.np-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

.np-dot--active {
    animation: np-pulse 2s ease-in-out infinite;
}

.np-label {
    font-family: "JetBrains Mono", "SF Mono", "Fira Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: default;
    font-weight: inherit;
    color: #737373;
}

.np-label--active {
    cursor: pointer;
}

.np-label--active:hover {
    color: #fff;
}

.np-track {
    font-size: 12.5px;
    width: 120px;
    text-align: center;
    line-height: 1.35;
    color: #a3a3a3;
}

.np-track b {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e5e5e5;
}

#npArtist {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-name {
    font-size: clamp(1.68rem, 3.84vw + 0.96rem, 2.4rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    margin-top: 0;
    line-height: 1.2;
}

@keyframes hero-name-glitch {
    0%   { opacity: 1; transform: none;                          text-shadow: none;                                 filter: none;                              clip-path: none; }
    8%   { opacity: 1; transform: translateX(-6px) skewX(-8deg); text-shadow: 4px 0 #ff2020, -4px 0 #20ffff;       filter: brightness(1.8);                   clip-path: inset(10% 0 70% 0); }
    16%  { opacity: 0.95; transform: translateX(8px) skewX(5deg);  text-shadow: -5px 0 #ff20ff, 5px 0 #20ff20;    filter: contrast(200%) hue-rotate(60deg);   clip-path: inset(0 0 0 0); }
    24%  { opacity: 0.85; transform: translateX(-12px);             text-shadow: 6px 0 #ff2020, -6px 0 #20ffff;   filter: brightness(2.5);                    clip-path: inset(40% 0 30% 0); }
    32%  { opacity: 0.7;  transform: translateX(6px) skewX(-6deg);  text-shadow: none;                            filter: invert(0.7) hue-rotate(120deg);     clip-path: inset(0 0 0 0); }
    44%  { opacity: 0.45; transform: skewX(-14deg) translateX(-4px);text-shadow: 5px 0 #20ffff, -5px 0 #ff20ff;   filter: brightness(3) saturate(200%);       clip-path: inset(55% 0 10% 0); }
    56%  { opacity: 0.2;  transform: translateX(4px) skewX(8deg);   text-shadow: none;                            filter: brightness(4) contrast(300%);       clip-path: inset(0 0 0 0); }
    72%  { opacity: 0.05; transform: none;                          text-shadow: none;                             filter: none;                               clip-path: none; }
    80%  { opacity: 0;    transform: none;                          text-shadow: none;                             filter: none;                               clip-path: none; }
    100% { opacity: 0;    transform: none;                          text-shadow: none;                             filter: none;                               clip-path: none; }
}

.content-section p.hero-intro,
.hero-intro {
    font-size: 25px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 30px;
    margin-top: 0;
    max-width: 900px;
    color: #ffffff;
}

.hero-intro a.underline-sketch {
    text-decoration: none;
}

.hero-social {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icon {
    width: 28px;
    height: 28px;
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(163, 163, 163);
}

.social-icon:hover {
    transform: translateY(-2px);
    color: rgb(200, 200, 200);
}

.social-icon svg {
    width: 100%;
    height: 100%;
}

.content-section-intro {
    margin-top: 40px;
    text-decoration: none;
    line-height: 100px;
    letter-spacing: 0.5px;
}

.intro-line {
    margin-bottom: 5px;
    line-height: 1.8;
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    font-weight: 500;
    color: rgb(163, 163, 163);
}

.intro-line a {
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.intro-line a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.mail-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    display: inline-block;
    color: rgb(163, 163, 163);
}

.mail-icon-link {
    position: relative;
    display: inline-block;
}

.mail-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 8px;
    background-color: #555;
}

.mail-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #555;
}

.mail-icon-link:hover .mail-tooltip {
    opacity: 1;
}

.content-section h2 {
    font-size: clamp(1.25rem, 2vw + 0.75rem, 2rem);
    color: rgb(163, 163, 163);
    margin-bottom: 15px;
    font-weight: 500;
}

.content-section p {
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.1rem);
    line-height: 1.6;
    margin-bottom: 15px;
    color: rgb(163, 163, 163);
}

/* Grid for project cards or content blocks */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.content-card {
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #2a2a2a;
    border-color: #404040;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.content-card h3 {
    margin-bottom: 15px;
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.3rem);
    font-weight: 500;
    color: rgb(163, 163, 163);
}

.content-card p {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    color: rgb(163, 163, 163);
}

.online-section {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: start;
    margin-top: 32px;
    margin-bottom: 32px;
}

.online-label {
    font-weight: 600;
    color: rgb(115, 115, 115);
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.1rem);
    letter-spacing: 1px;
    padding-top: 2px;
}

.online-link-row {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.online-link-row a {
    white-space: nowrap;
    font-weight: 500;
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1.08rem);
    margin-right: 12px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
    color: rgb(163, 163, 163);
}

.online-link-row a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.dotted-line {
    flex: 1 1 auto;
    border-bottom: 1px dotted #888;
    height: 0;
    margin-left: 12px;
    margin-right: 0;
    opacity: 0.6;
}

.online-links {
    padding-top: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 91%;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .navbar {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        border-radius: 15px;
        padding: 20px 0;
        transform: none;
    }

    .navbar ul {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .navbar a {
        padding: 10px 15px;
        font-size: 14px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .navbar a:hover,
    .navbar a.active {
        border-left: none;
        border-bottom-color: #333;
    }

    .main-content {
        padding: 120px 30px 50px 30px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .floating-back-button {
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .back-arrow-icon {
        width: 22px;
        height: 22px;
    }
}

/* Search Results Styles */
.search-results-container {
    margin-top: 40px;
}

.search-results-header {
    margin-bottom: 40px;
}

.search-results-title {
    font-size: clamp(1.25rem, 2vw + 0.75rem, 2rem);
    font-weight: 600;
    margin-bottom: 10px;
    color: rgb(163, 163, 163);
}

.search-results-query {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    color: rgb(163, 163, 163);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 40px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    border-bottom-color: #333;
}

.search-result-section {
    font-size: clamp(0.75rem, 1.2vw + 0.4rem, 0.9rem);
    font-weight: 500;
    text-align: left;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace;
    color: rgb(163, 163, 163);
}

.search-result-content {
    min-width: 0;
}

.search-result-title {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    display: inline-block;
    color: rgb(163, 163, 163);
}

.search-result-title:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.search-result-context {
    font-size: clamp(0.75rem, 1.2vw + 0.4rem, 0.9rem);
    line-height: 1.5;
    margin-bottom: 6px;
    margin-top: -4px;
    color: rgb(163, 163, 163);
}

.highlight-match {
    text-decoration: none;
    display: inline;
}

.highlight-match:hover mark {
    background-color: rgba(255, 193, 7, 0.6);
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.search-result-date {
    font-size: clamp(0.7rem, 1vw + 0.3rem, 0.8rem);
    font-weight: 500;
    color: rgb(163, 163, 163);
}

.search-result-tag {
    font-size: clamp(0.7rem, 1vw + 0.3rem, 0.8rem);
    font-weight: 500;
    color: rgb(163, 163, 163);
}

.search-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.1rem);
    color: rgb(163, 163, 163);
}

.search-no-results {
    text-align: center;
    padding: 60px 20px;
}

.search-no-results p {
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.1rem);
    margin-bottom: 10px;
    color: rgb(163, 163, 163);
}

.search-no-results-hint {
    font-size: clamp(0.8rem, 1.2vw + 0.4rem, 0.95rem) !important;
    color: rgb(163, 163, 163) !important;
}

/* Highlight matched terms */
mark {
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    cursor: pointer;
    background-color: rgba(255, 193, 7, 0.4);
    color: #fff;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-search-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-search-container {
    width: 100%;
    padding: 20px;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 15px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    background-color: rgba(40, 40, 40, 0.95);
}

.mobile-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    background: transparent;
    color: rgb(163, 163, 163);
}

.mobile-search-input::placeholder {
    color: rgba(163, 163, 163, 0.5);
}

.mobile-search-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-search-close:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-search-close svg {
    width: 22px;
    height: 22px;
    color: rgb(163, 163, 163);
}

/* Mobile Navigation - Dynamic Island Style */
.mobile-nav {
    display: grid;
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    padding: 8px 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
    z-index: 9999;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    align-items: center;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(40, 40, 40, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Sliding hover pill indicator */
.mobile-nav::before {
    content: '';
    position: absolute;
    top: var(--hover-top, 0);
    left: var(--hover-left, 0);
    width: var(--hover-width, 0);
    height: var(--hover-height, 0);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.mobile-nav.nav-hover-active::before {
    opacity: 1;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 13px;
    border-radius: 14px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 1;
}

.mobile-nav-item:hover {
    transform: scale(1.05);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.mobile-nav.nav-hover-active .mobile-nav-item.active {
    background-color: transparent;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.mobile-nav-icon {
    width: 17px;
    height: 17px;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.mobile-nav-item:hover .mobile-nav-icon {
    color: rgba(255, 255, 255, 1);
}

/* Mobile adjustments */
@media (max-width: 768px) {

    /* Adjust main content padding for mobile */
    .main-content {
        width: 100%;
        box-sizing: border-box;
        padding: 50px 20px 100px 20px;
    }

    .mobile-nav {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Hero Section Mobile */
    .hero-layout {
        flex-direction: column;
        gap: 1.25rem;
        margin-top: 60px;
    }

    .hero-portrait {
        width: 80px;
        height: 80px;
    }

    .hero-portrait-col {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        margin-top: 0;
        width: 100%;
    }

    .now-playing {
        align-items: stretch;
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .np-controls {
        display: flex;
        width: 60%;
        padding: 6px 12px;
        gap: 8px;
    }

    .np-btn {
        width: 22px;
        height: 22px;
    }

    .np-btn svg {
        width: 12px;
        height: 12px;
    }

    .np-track {
        text-align: left;
        width: auto;
        max-width: 100%;
    }

    .hero-name {
        font-size: clamp(1.44rem, 5.76vw + 0.48rem, 1.92rem);
        margin-bottom: 15px;
        margin-top: 0;
    }

    .content-section p.hero-intro,
    .hero-intro {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .hero-social {
        gap: 16px;
    }

    .social-icon {
        width: 22px;
        height: 22px;
    }
}

/* Writing Section (homepage) */
.writing-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.writing-heading {
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.05rem);
    font-weight: 600;
    margin-bottom: 12px;
}

.writing-heading-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease;
    color: rgb(163, 163, 163);
}

.writing-heading-link:hover {
    opacity: 0.7;
}

.writing-arrow {
    font-weight: 400;
    font-size: 1.1em;
    opacity: 0.5;
}

.writing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.writing-post-item {
    margin: 0;
}

.writing-post-link {
    display: block;
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.05rem);
    font-weight: 500;
    text-decoration: none;
    padding: 2px 12px;
    border-radius: 8px;
    margin-left: -12px;
    transition: background-color 0.2s ease;
    color: rgb(250, 250, 250);
}

.writing-post-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .writing-section {
        margin-top: 60px;
        margin-bottom: 40px;
    }
}

/* Projects Section */
.projects-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.projects-heading {
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.05rem);
    font-weight: 600;
    margin-bottom: 12px;
    color: rgb(163, 163, 163);
}

.projects-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-item {
    margin: 0;
    position: relative;
}


.project-link {
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: rgb(163, 163, 163);
}

.project-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.project-name {
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.05rem);
    flex-shrink: 0;
    color: #ffffff;
}

.project-separator {
    font-weight: 400;
    flex-shrink: 0;
    color: rgb(120, 120, 120);
}

.project-description {
    font-size: clamp(0.9rem, 1.5vw + 0.5rem, 1.05rem);
    font-weight: 400;
    color: rgb(163, 163, 163);
}

.external-icon {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    color: rgb(163, 163, 163);
}

.project-link:hover .external-icon {
    opacity: 1;
}

/* Link Preview Card */
#link-preview {
    position: fixed;
    z-index: 500;
    pointer-events: none;
    width: 260px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(8px);
    filter: blur(8.4px);
    transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
}

#link-preview.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

#link-preview img {
    width: 100%;
    display: block;
}

/* Projects Section Mobile */
@media (max-width: 768px) {
    .projects-section {
        margin-top: 60px;
        margin-bottom: 40px;
    }

    .projects-heading {
        font-size: clamp(0.875rem, 2.2vw + 0.4rem, 1rem);
        margin-bottom: 0;
    }

    .projects-list {
        gap: 0;
    }

    .project-item::before {
        left: -12px;
    }

    .project-link {
        padding: 6px 12px 6px 0;
        flex-wrap: nowrap;
    }

    .project-name {
        font-size: clamp(0.875rem, 2.2vw + 0.4rem, 1rem);
    }

    .project-description {
        font-size: clamp(0.875rem, 2.2vw + 0.4rem, 1rem);
    }

    .external-icon {
        width: 14px;
        height: 14px;
    }
}
