/* DGN-2 dedicated stylesheet — moved from inline styles to file
   Purpose: differentiated background, two-column layout, responsive rules,
   skip-link accessibility, and foundation for archive-item card style.
*/
:root {
    /* DGN-2 Intermediate Theme: Purple/Orange */
    --primary: #9b59b6;
    --primary-hover: #8e44ad;
    --secondary: #f39c12;
    --secondary-hover: #e67e22;
    --tertiary: #1abc9c;

    --bg: rgba(15, 23, 42, 0.85);
    --bg-card: rgba(30, 41, 59, 0.90);
    --text: #f1f5f9;
    --text-light: #cbd5e1;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s ease;

    /* Project specific colors */
    --visual-journal-accent: #1e5eff;
    --visual-journal-bg: #c7e9fe;
    --redshaw-accent: #ff8ca1;
    --redshaw-bg: #9a2a3b;
    --redshaw-text: #ffd6db;
    --carbon-accent: #26e957;
    --carbon-bg: #58886b;
    --carbon-text: #b8ffb7;

    --footer-height: 64px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: var(--footer-height);
    position: relative;
}

/* Differentiated Background Layer */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -3;
    background: 
        radial-gradient(ellipse 120% 80% at 70% 20%, rgba(155, 89, 182, 0.15), transparent 50%),
        radial-gradient(ellipse 100% 60% at 30% 10%, rgba(243, 156, 18, 0.12), transparent 60%),
        radial-gradient(ellipse 90% 70% at 50% 0%, rgba(26, 188, 156, 0.10), transparent 65%),
        radial-gradient(ellipse 110% 50% at 80% 30%, rgba(155, 89, 182, 0.08), transparent 40%),
        #000000;
}

/* Animated Grid with Jiggling Dots */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px, 20px 20px;
    animation: jiggleDots 4s ease-in-out infinite;
}

@keyframes jiggleDots {
    0%, 100% { background-position: 0 0, 0 0, 0 0; }
    25% { background-position: 2px -2px, 2px -2px, 2px -2px; }
    50% { background-position: -2px 2px, -2px 2px, -2px 2px; }
    75% { background-position: 2px 2px, 2px 2px, 2px 2px; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.page-wrapper {
    display: flex;
    gap: clamp(20px, 2.5vw, 40px);
    max-width: min(95vw, 1400px);
    width: 100%;
    margin: clamp(20px, 4vh, 60px) auto;
    padding: clamp(24px, 3vh, 48px) clamp(18px, 3vw, 40px);
    flex: 1 1 auto;
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(18,24,38,0.72), rgba(18,24,38,0.64));
    backdrop-filter: blur(22px) saturate(115%);
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(2,6,23,0.65), 0 6px 20px rgba(0,0,0,0.42);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: calc(100vh - 120px);
    position: relative;
    z-index: 5;
}

.left-section { flex: 0 0 clamp(280px, 25vw, 350px); display:flex; flex-direction:column; gap:clamp(12px,1.5vh,20px); }
.right-section { flex:1; min-width:0; display:flex; flex-direction:column; }

header { display:flex; flex-direction:column; gap:16px; }

.archive-header { text-align:center; }
.course-badge { display:inline-block; background:linear-gradient(135deg,var(--primary),var(--secondary)); color:white; padding:8px 18px; border-radius:24px; font-weight:600; }

.archive-header h1 { font-size:clamp(1.5rem,3vw,2rem); margin:0; color:var(--text); }
.archive-header .subtitle { font-style:italic; color:var(--text); }
.archive-header .bio { color:var(--text-light); }
.archive-date { display:inline-block; background: rgba(155,89,182,0.2); color:var(--text-light); padding:6px 14px; border-radius:8px; }

.nav-links { display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.nav-btn { background:var(--primary); color:white; padding:12px 20px; border-radius:var(--border-radius); font-weight:600; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.nav-btn.secondary { background:var(--secondary); }

main[role="main"] { display:flex; flex-direction:column; min-height:0; }

.section-title { font-size:clamp(1.15rem,2vw,1.4rem); font-weight:500; color:var(--text); display:flex; align-items:center; gap:12px; }
.section-title::before { content:''; width:4px; height:24px; background:linear-gradient(180deg,var(--primary),var(--secondary)); border-radius:2px; }

.projects { display:flex; flex-direction:column; gap:clamp(12px,2vh,18px); }

.project-card {
    background:var(--bg-card);
    border-radius:var(--border-radius);
    padding:clamp(16px,2.5vh,24px);
    box-shadow:0 2px 8px var(--shadow);
    border:1px solid rgba(255,255,255,0.1);
    display:flex; flex-direction:column; gap:clamp(8px,1vh,12px);
}

.project-card h3 { display:flex; align-items:center; justify-content:space-between; gap:clamp(12px,2vw,20px); }
.project-card .description { color:var(--text-light); line-height:1.5; }

.project-link { display:inline-flex; align-items:center; gap:6px; background:var(--text); color:var(--bg); padding:8px 14px; border-radius:8px; text-decoration:none; }

/* archived badge */
.archived-badge { display:inline-block; background: rgba(155,89,182,0.2); color:#d8b4fe; padding:4px 10px; border-radius:6px; font-weight:600; text-transform:uppercase; }

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    background: #111827;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 9999;
}

/* Legacy mobile nav container hidden (we consolidate into one nav) */
.nav-btn--mobile { display: none !important; }

/* Small helper for future archive-item style */
.archive-item { display:flex; align-items:center; gap:12px; padding:12px; border-radius:10px; text-decoration:none; color:var(--text-light); background:rgba(255,255,255,0.02); }
.archive-item .archive-code { font-family: 'JetBrains Mono', monospace; color:var(--primary); font-weight:700; }
.archive-item .archive-info { flex:1; }
.archive-item .archive-meta { text-align:right; color:var(--text-light); }

/* Responsive rules */
@media (max-width: 768px) {
    .page-wrapper { flex-direction: column; gap: 24px; padding: 20px 16px; }
    .left-section { width:100%; order:1; }
    .right-section { width:100%; order:2; }
    .nav-links { flex-direction:row; flex-wrap:wrap; }
}

@media (max-width:480px) {
    .nav-links { flex-direction:column; }
    .nav-btn { width:100%; }
}
