@charset "UTF-8";

/* =========================================================
   Programming Lab - JavaScript ES6
   File: ./assets/css/styles.css
========================================================= */

:root {
    --bg: #0b1020;
    --bg-soft: #121934;
    --card: rgba(255, 255, 255, 0.08);
    --card-strong: rgba(255, 255, 255, 0.12);
    --text: #f4f7ff;
    --muted: #b7c2e0;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #7dd3fc;
    --accent-2: #a78bfa;
    --accent-3: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --max-width: 1180px;
    --header-height: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family:
        "Inter",
        "Hiragino Sans",
        "Yu Gothic",
        "Meiryo",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background:
        radial-gradient(circle at top right, rgba(167, 139, 250, 0.22), transparent 25%),
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.18), transparent 22%),
        linear-gradient(180deg, #0a1020 0%, #0d1430 50%, #09101f 100%);
    line-height: 1.75;
    letter-spacing: 0.02em;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: min(calc(100% - 32px), var(--max-width));
    margin-inline: auto;
}

/* =========================================================
   Header
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(10, 16, 32, 0.72);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #07101f;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: var(--shadow);
}

.brand-text strong {
    display: block;
    font-size: 1rem;
}

.brand-text span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    border: 0;
    background: var(--card);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: var(--card);
    color: var(--text);
}

/* =========================================================
   Hero
========================================================= */

.hero {
    padding: 72px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: stretch;
}

.hero-panel,
.hero-side {
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -80px -100px auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.22), transparent 65%);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.10);
    color: #d9f3ff;
    border: 1px solid rgba(125, 211, 252, 0.20);
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.hero p.lead {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: 0.2s ease;
    cursor: pointer;
}

.button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06101d;
    font-weight: 700;
}

.button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(125, 211, 252, 0.20);
}

.button.secondary {
    background: var(--card);
    border-color: var(--line);
    color: var(--text);
}

.button.secondary:hover {
    background: var(--card-strong);
}

.hero-meta {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.88rem;
}

.hero-side {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.stat-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.stat-label {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

/* =========================================================
   Sections
========================================================= */

.section {
    padding: 32px 0;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.section-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.05));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 24px;
}

/* =========================================================
   About / Tags
========================================================= */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.about-body p {
    margin-top: 0;
    color: var(--muted);
}

.tag-list,
.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.tag-list li,
.skill-list li {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.20);
    color: #ece7ff;
    font-size: 0.92rem;
}

/* =========================================================
   History Timeline
========================================================= */

.timeline {
    position: relative;
    display: grid;
    gap: 16px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(125, 211, 252, 0.35), rgba(167, 139, 250, 0.35));
}

.timeline-item {
    position: relative;
    margin-left: 0;
    padding-left: 52px;
}

.timeline-dot {
    position: absolute;
    left: 9px;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: 3px solid rgba(11, 16, 32, 0.95);
    box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.08);
}

.timeline-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
}

.timeline-year {
    color: #dff6ff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.timeline-card h3 {
    margin: 8px 0 8px;
    font-size: 1.08rem;
}

.timeline-card p {
    margin: 0;
    color: var(--muted);
}

/* =========================================================
   Lessons
========================================================= */

.lesson-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.search-input,
.filter-select {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

.search-input {
    flex: 1 1 320px;
}

.filter-select {
    min-width: 180px;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lesson-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.2s ease;
}

.lesson-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.09);
}

.lesson-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.06);
    color: var(--muted);
}

.badge.level-beginner {
    background: rgba(52, 211, 153, 0.12);
    color: #d8fff0;
    border-color: rgba(52, 211, 153, 0.22);
}

.badge.level-intermediate {
    background: rgba(251, 191, 36, 0.12);
    color: #fff0c0;
    border-color: rgba(251, 191, 36, 0.22);
}

.badge.level-advanced {
    background: rgba(251, 113, 133, 0.12);
    color: #ffd8e1;
    border-color: rgba(251, 113, 133, 0.22);
}

.lesson-card h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.4;
}

.lesson-card p {
    margin: 0;
    color: var(--muted);
}

.lesson-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.lesson-points li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.94rem;
}

.lesson-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.lesson-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #dff6ff;
}

/* =========================================================
   Contents
========================================================= */

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.content-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.content-card p {
    margin: 0;
    color: var(--muted);
}

/* =========================================================
   Empty / Footer
========================================================= */

.empty-state {
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line);
    text-align: center;
    color: var(--muted);
}

.site-footer {
    padding: 36px 0 60px;
    color: var(--muted);
}

.footer-box {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
}

/* =========================================================
   Utility
========================================================= */

.hidden {
    display: none !important;
}

.skeleton {
    min-height: 120px;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.2s infinite linear;
    border: 1px solid var(--line);
}

@keyframes loading {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1080px) {
    .hero-grid,
    .about-grid,
    .lesson-grid,
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-grid > .panel:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(10, 16, 32, 0.96);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        border-radius: 12px;
    }

    .hero-grid,
    .about-grid,
    .lesson-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-panel,
    .hero-side,
    .panel {
        padding: 20px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 20px), var(--max-width));
    }

    .header-inner {
        min-height: 64px;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero p.lead {
        font-size: 0.98rem;
    }

    .button {
        width: 100%;
    }

    .lesson-controls {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }
}