/* ==========================================================================
   miris-project.net — Glassmorphic Project Dashboard
   Colors: #0D1117, #B4C3DC, #7EB8A2, #5B9BD5, #C47D8E, #E8E4F0
   Fonts: Libre Baskerville, Inter, JetBrains Mono
   ========================================================================== */

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

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

body {
    font-family: 'Inter', sans-serif;
    background: #0D1117;
    color: #B4C3DC;
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Typography --- */
.code-font {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 400;
}

h1, h2 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #E8E4F0;
}

/* --- Void Background --- */
#void-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Watercolor wash - subtle radial gradient blobs */
#watercolor-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 500px at 15% 20%, rgba(91, 155, 213, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 500px 600px at 75% 60%, rgba(196, 125, 142, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 700px 400px at 50% 85%, rgba(91, 155, 213, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 400px 500px at 85% 15%, rgba(196, 125, 142, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 30% 50%, rgba(126, 184, 162, 0.03) 0%, transparent 70%);
}

/* Grid constellation SVG */
#grid-constellation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Sidebar Navigation --- */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100vh;
    z-index: 100;
    background: rgba(180, 195, 220, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(180, 195, 220, 0.08);
    transition: width 300ms ease-out;
    overflow: hidden;
}

#sidebar:hover {
    width: 200px;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 24px;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 18px;
    text-decoration: none;
    color: #B4C3DC;
    transition: color 300ms ease-out, background 300ms ease-out;
    white-space: nowrap;
}

.nav-item:hover {
    color: #E8E4F0;
    background: rgba(180, 195, 220, 0.08);
}

.nav-item.active {
    color: #5B9BD5;
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 300ms ease-out;
}

#sidebar:hover .nav-label {
    opacity: 1;
}

/* --- Main Content --- */
#main-content {
    position: relative;
    z-index: 1;
    margin-left: 60px;
    padding: 0 5vw;
}

/* --- Scroll Sections (ma-space) --- */
.scroll-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5vw 0;
    gap: 78px; /* Golden ratio progression: 48, 78, 126 */
}

#hero {
    padding-top: 10vh;
    padding-bottom: 10vh;
}

/* Section labels */
.section-label {
    align-self: flex-start;
    color: rgba(126, 184, 162, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: -48px;
    padding-left: 2vw;
}

/* --- Glass Panels --- */
.glass-panel {
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(180, 195, 220, 0.08);
    border: 1px solid rgba(180, 195, 220, 0.15);
    border-radius: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 700px;

    /* Initial state for entrance animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.glass-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Panel positioning for zigzag layout */
.glass-panel--hero {
    max-width: 800px;
    align-self: center;
}

.glass-panel--left {
    align-self: flex-start;
    max-width: 620px;
    margin-left: 2vw;
}

.glass-panel--right {
    align-self: flex-end;
    max-width: 620px;
    margin-right: 2vw;
}

.glass-panel--wide {
    max-width: 850px;
    align-self: flex-start;
    margin-left: 2vw;
}

.glass-panel--code {
    max-width: 700px;
    align-self: flex-end;
    margin-right: 2vw;
}

.glass-panel--footer {
    max-width: 100%;
    width: auto;
    align-self: center;
}

/* Panel edge construction animation overlays */
.panel-edge {
    position: absolute;
    background: rgba(180, 195, 220, 0.15);
    z-index: 2;
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.panel-edge--top {
    top: 0;
    left: 0;
    height: 1px;
    width: 0;
    transition: width 400ms ease-out 0ms, opacity 400ms ease-out;
}

.panel-edge--right {
    top: 0;
    right: 0;
    width: 1px;
    height: 0;
    transition: height 400ms ease-out 100ms, opacity 400ms ease-out;
}

.panel-edge--bottom {
    bottom: 0;
    right: 0;
    height: 1px;
    width: 0;
    transition: width 400ms ease-out 200ms, opacity 400ms ease-out;
}

.panel-edge--left {
    bottom: 0;
    left: 0;
    width: 1px;
    height: 0;
    transition: height 400ms ease-out 300ms, opacity 400ms ease-out;
}

.glass-panel.visible .panel-edge {
    opacity: 1;
}

.glass-panel.visible .panel-edge--top {
    width: 100%;
}

.glass-panel.visible .panel-edge--right {
    height: 100%;
}

.glass-panel.visible .panel-edge--bottom {
    width: 100%;
}

.glass-panel.visible .panel-edge--left {
    height: 100%;
}

/* Panel content */
.panel-content {
    position: relative;
    z-index: 1;
    padding: 36px 40px;
}

/* Ripple effect container */
.glass-panel .ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 184, 162, 0.15) 0%, transparent 70%);
    transform: scale(0);
    animation: ripple-expand 600ms ease-out forwards;
    pointer-events: none;
    z-index: 3;
}

@keyframes ripple-expand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Blur entrance animation for panels */
.glass-panel.assembling {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: rgba(180, 195, 220, 0.0);
    border-color: transparent;
}

.glass-panel.assembling.visible {
    animation: blur-in 500ms ease-out forwards;
}

@keyframes blur-in {
    0% {
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        background: rgba(180, 195, 220, 0.0);
    }
    100% {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background: rgba(180, 195, 220, 0.08);
    }
}

/* --- Hero Section --- */
.hero-title {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #E8E4F0;
    margin-bottom: 16px;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.hero-title .letter.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-title .letter-space {
    display: inline-block;
    width: 0.3em;
}

.hero-subtitle {
    color: #B4C3DC;
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 560px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease-out 500ms, transform 600ms ease-out 500ms;
}

.glass-panel.visible .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.hero-meta {
    display: flex;
    gap: 18px;
    margin-top: 24px;
    flex-wrap: wrap;
    align-items: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease-out 700ms, transform 600ms ease-out 700ms;
}

.glass-panel.visible .hero-meta {
    opacity: 1;
    transform: translateY(0);
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7EB8A2;
    font-size: 0.85rem;
}

.meta-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.meta-dot--active {
    background: #7EB8A2;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 4px rgba(126, 184, 162, 0.4); }
    50% { opacity: 1; box-shadow: 0 0 10px rgba(126, 184, 162, 0.8); }
}

/* --- Project Cards --- */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.project-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: #E8E4F0;
}

.project-desc {
    color: #B4C3DC;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 16px;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.status-svg {
    width: 12px;
    height: 12px;
}

.status-indicator--active {
    color: #7EB8A2;
}

.status-indicator--active .status-pulse {
    fill: #7EB8A2;
    animation: status-pulse-anim 2s ease-in-out infinite;
}

@keyframes status-pulse-anim {
    0%, 100% { opacity: 0.5; r: 3; }
    50% { opacity: 1; r: 4.5; }
}

.status-indicator--paused {
    color: #C47D8E;
}

.status-indicator--paused .status-glow {
    fill: #C47D8E;
    opacity: 0.7;
}

.status-indicator--archived {
    color: #B4C3DC;
    opacity: 0.5;
}

.status-indicator--archived .status-fade {
    fill: #B4C3DC;
    animation: status-fade-anim 3s ease-in-out infinite;
}

@keyframes status-fade-anim {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.45; }
}

/* Tech tags */
.project-tech {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tech-tag {
    padding: 4px 12px;
    background: rgba(126, 184, 162, 0.1);
    border: 1px solid rgba(126, 184, 162, 0.2);
    border-radius: 6px;
    color: #7EB8A2;
    font-size: 0.8rem;
}

/* Project stats */
.project-stats {
    display: flex;
    gap: 20px;
    color: rgba(180, 195, 220, 0.5);
    font-size: 0.8rem;
    flex-wrap: wrap;
}

/* --- Technical Section --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.tech-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: rgba(180, 195, 220, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(180, 195, 220, 0.08);
}

.tech-cell-label {
    color: #7EB8A2;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tech-cell-value {
    color: #E8E4F0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.tech-cell-note {
    color: rgba(180, 195, 220, 0.45);
    font-size: 0.75rem;
}

/* Code block */
.code-block {
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid rgba(180, 195, 220, 0.1);
    border-radius: 10px;
    padding: 24px;
    overflow-x: auto;
    line-height: 1.7;
    color: #B4C3DC;
    margin-top: 16px;
}

.code-comment { color: rgba(180, 195, 220, 0.35); }
.code-keyword { color: #C47D8E; }
.code-type { color: #5B9BD5; }
.code-fn { color: #7EB8A2; }

/* --- Timeline Section --- */
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 20px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(180, 195, 220, 0.06);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    color: #7EB8A2;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 80px;
    padding-top: 3px;
}

.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-event {
    color: #E8E4F0;
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1rem;
}

.timeline-detail {
    color: #B4C3DC;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- About Section / Members --- */
.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: rgba(180, 195, 220, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(180, 195, 220, 0.08);
    transition: background 300ms ease-out, border-color 300ms ease-out;
}

.member-card:hover {
    background: rgba(180, 195, 220, 0.08);
    border-color: rgba(180, 195, 220, 0.15);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        hsla(var(--hue), 50%, 55%, 0.3),
        hsla(var(--hue), 50%, 35%, 0.5)
    );
    border: 1px solid rgba(180, 195, 220, 0.15);
}

.member-name {
    color: #E8E4F0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
}

.member-role {
    color: #7EB8A2;
    font-size: 0.75rem;
    text-align: center;
}

/* --- Footer --- */
#footer {
    min-height: auto;
    padding: 48px 0 80px;
}

.glass-panel--footer .panel-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 32px;
    flex-wrap: wrap;
}

.footer-text {
    color: rgba(180, 195, 220, 0.4);
    font-size: 0.8rem;
}

.footer-divider {
    color: rgba(180, 195, 220, 0.15);
}

/* --- Scroll-based floating offset --- */
.glass-panel[data-float-offset] {
    will-change: transform;
}

/* --- Graceful degradation for backdrop-filter --- */
@supports not (backdrop-filter: blur(20px)) {
    .glass-panel {
        background: rgba(13, 17, 23, 0.85);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    #sidebar {
        background: rgba(13, 17, 23, 0.9);
    }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .glass-panel--left,
    .glass-panel--right {
        margin-left: 0;
        margin-right: 0;
        align-self: center;
    }

    .glass-panel--wide,
    .glass-panel--code {
        margin-left: 0;
        margin-right: 0;
        align-self: center;
    }
}

@media (max-width: 640px) {
    #sidebar {
        display: none;
    }

    #main-content {
        margin-left: 0;
        padding: 0 4vw;
    }

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

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-content {
        padding: 24px 20px;
    }

    .scroll-section {
        gap: 48px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 8px;
    }

    .project-stats {
        flex-direction: column;
        gap: 6px;
    }
}
