/* ========================================
   miris.xyz — Minimalist Link Hub
   ======================================== */

/* CSS Custom Properties - Design Palette */
:root {
    --color-warm-black: #2A2A28;
    --color-warm-grey: #5A5A58;
    --color-muted-blue: #4A7090;
    --color-off-white: #F8F6F2;
    --color-border-cream: #E0D8D0;
    --color-vintage-warm: #C8B8A0;
    --color-vintage-rose: #C0A090;

    /* Typography */
    --font-display: 'Nunito', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-interactive: 'Inter', sans-serif;

    /* Spacing */
    --sidebar-width: 180px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-warm-grey);
    background-color: var(--color-off-white);
    line-height: 1.75;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Sidebar
   ======================================== */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--color-off-white);
    border-right: 1px solid var(--color-border-cream);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    z-index: 100;
    transition: transform 0.3s ease;
}

#sidebar-brand {
    margin-bottom: 2.5rem;
    text-align: center;
}

#brand-logo {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
}

#brand-logo svg {
    opacity: 0.85;
    stroke: var(--color-warm-black);
}

#brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-warm-black);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

#brand-tagline {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--color-vintage-rose);
    margin-top: 0.25rem;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

/* Sidebar Navigation */
#sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    text-decoration: none;
    font-family: var(--font-interactive);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-warm-grey);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background-color: var(--color-border-cream);
    color: var(--color-warm-black);
}

.nav-link.active {
    background-color: var(--color-border-cream);
    color: var(--color-warm-black);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Sidebar Footer */
#sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-cream);
    text-align: center;
}

#sidebar-footer span {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 0.7rem;
    color: var(--color-vintage-warm);
    letter-spacing: 0.02em;
}

/* ========================================
   Main Content
   ======================================== */
#content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem 4rem;
    min-height: 100vh;
    position: relative;
}

/* Content Sections */
.content-section {
    display: none;
    opacity: 0;
    transform: scale(0.97) translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.content-section.active {
    display: block;
}

.content-section.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    color: var(--color-warm-black);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.section-desc {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--color-warm-grey);
    margin-bottom: 2rem;
}

/* ========================================
   Link Grid
   ======================================== */
.link-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background-color: var(--color-off-white);
    border: 1px solid var(--color-border-cream);
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    opacity: 0;
}

.link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(200,184,160,0.06) 0%, transparent 100%);
    pointer-events: none;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(42,42,40,0.06);
    border-color: var(--color-vintage-warm);
}

.link-card.visible {
    opacity: 1;
}

.link-card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(74,112,144,0.06);
    border-radius: 8px;
    padding: 6px;
}

.link-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-muted-blue);
}

.link-card-info {
    flex: 1;
    min-width: 0;
}

.link-card-title {
    display: block;
    font-family: var(--font-interactive);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-muted-blue);
    margin-bottom: 0.15rem;
    transition: color 0.2s ease;
}

.link-card:hover .link-card-title {
    color: var(--color-warm-black);
}

.link-card-desc {
    display: block;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.82rem;
    color: var(--color-warm-grey);
    line-height: 1.4;
}

.link-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-vintage-warm);
    stroke: var(--color-vintage-warm);
    transition: color 0.2s ease, stroke 0.2s ease, transform 0.2s ease;
}

.link-card:hover .link-arrow {
    color: var(--color-muted-blue);
    stroke: var(--color-muted-blue);
    transform: translate(2px, -2px);
}

/* ========================================
   About Section
   ======================================== */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.about-block {
    opacity: 0;
}

.about-block.visible {
    opacity: 1;
}

.about-block h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--color-warm-black);
    margin-bottom: 0.5rem;
}

.about-block p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--color-warm-grey);
    line-height: 1.75;
    max-width: 600px;
}

.about-block a {
    color: var(--color-muted-blue);
    font-family: var(--font-interactive);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(74,112,144,0.3);
    transition: border-color 0.2s ease;
}

.about-block a:hover {
    border-color: var(--color-muted-blue);
}

/* ========================================
   Vintage Texture Overlay
   ======================================== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23noise)' opacity='0.018'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 1;
}

/* ========================================
   Mobile Hamburger
   ======================================== */
#mobile-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 40px;
    height: 40px;
    background: var(--color-off-white);
    border: 1px solid var(--color-border-cream);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#mobile-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-warm-black);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    #mobile-toggle {
        display: flex;
    }

    #sidebar {
        transform: translateX(-100%);
        width: 220px;
        box-shadow: 4px 0 24px rgba(42,42,40,0.1);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #content {
        margin-left: 0;
        padding: 4.5rem 1.5rem 2rem;
    }

    .link-card {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 480px) {
    #content {
        padding: 4rem 1rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Animations & Scroll-triggered visibility
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card.visible {
    animation: fadeInUp 0.5s ease forwards;
}

.about-block.visible {
    animation: fadeInUp 0.5s ease forwards;
}

.link-card {
    --animation-delay: 0s;
    animation-delay: var(--animation-delay);
}
