/* ==========================================================================
   PBA - DEVELOPMENT RESOURCES STYLESHEET
   Matching PBA & UDN Design Language (Obsidian Dark & Clean Light)
   ========================================================================== */

:root {
    --bg-color: #060608;
    --surface: #0e0e12;
    --surface-card: rgba(14, 14, 18, 0.85);
    --surface-hover: #16161c;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.22);
    
    --text-primary: #f2f2f5;
    --text-secondary: #888899;
    --text-muted: #666677;
    
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.15);
    --accent-glow: rgba(16, 185, 129, 0.35);
    
    --code-bg: #090a0f;
    --nav-bg: rgba(6, 6, 8, 0.85);
    --nav-height: 80px;
    
    --font-display: 'Syne', sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.3);
}

html.light {
    --bg-color: #f5f5f8;
    --surface: #ffffff;
    --surface-card: rgba(255, 255, 255, 0.92);
    --surface-hover: #ebebf0;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.22);
    
    --text-primary: #0d0d14;
    --text-secondary: #555566;
    --text-muted: #888899;
    
    --accent: #059669;
    --accent-hover: #047857;
    --accent-light: rgba(5, 150, 105, 0.1);
    --accent-glow: rgba(5, 150, 105, 0.2);
    
    --code-bg: #1e1e28;
    --nav-bg: rgba(245, 245, 248, 0.88);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 1;
}

html.light .noise-overlay {
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* ── Dynamic Background Suite (Matching Main Website) ── */
#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Animated Drifting Engineering Grid (UDN Box Design) */
.animated-grid {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(rgba(0, 212, 255, 0.045) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 212, 255, 0.045) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

html.light .animated-grid {
    background-image: linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

@keyframes gridDrift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(60px, 60px) rotate(1deg); }
}

/* Floating Geometric Wireframe Box Shapes (UDN Design) */
.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.22);
    opacity: 0.75;
    will-change: transform;
}

.shape-1 {
    width: 80px;
    height: 80px;
    border-radius: 20%;
    top: 12%;
    left: 8%;
    animation: shapeFloat1 18s ease-in-out infinite, shapeSpin 25s linear infinite;
}

.shape-2 {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    top: 25%;
    right: 15%;
    border-color: rgba(16, 185, 129, 0.22);
    animation: shapeFloat2 22s ease-in-out infinite, shapeSpin 30s linear infinite reverse;
}

.shape-3 {
    width: 60px;
    height: 60px;
    border-radius: 30%;
    bottom: 20%;
    left: 12%;
    border-color: rgba(56, 189, 248, 0.2);
    animation: shapeFloat3 20s ease-in-out infinite, shapeSpin 20s linear infinite;
}

.shape-4 {
    width: 32px;
    height: 32px;
    top: 60%;
    right: 8%;
    border-color: rgba(0, 212, 255, 0.2);
    animation: shapeFloat1 24s ease-in-out infinite reverse, shapeSpin 35s linear infinite;
}

.shape-5 {
    width: 52px;
    height: 52px;
    border-radius: 40%;
    top: 8%;
    right: 35%;
    border-color: rgba(16, 185, 129, 0.18);
    animation: shapeFloat2 16s ease-in-out infinite, shapeSpin 28s linear infinite reverse;
}

.shape-6 {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    bottom: 15%;
    right: 30%;
    border-color: rgba(56, 189, 248, 0.22);
    animation: shapeFloat3 26s ease-in-out infinite reverse, shapeSpin 22s linear infinite;
}

html.light .shape {
    border-color: rgba(5, 150, 105, 0.15);
    opacity: 0.55;
}
html.light .shape-2 { border-color: rgba(14, 165, 233, 0.15); }
html.light .shape-3 { border-color: rgba(5, 150, 105, 0.15); }

@keyframes shapeFloat1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(25px,-35px)} }
@keyframes shapeFloat2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,25px)} }
@keyframes shapeFloat3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(20px,30px)} }
@keyframes shapeSpin   { 0%{transform:rotate(0deg)} 100%{transform:rotate(360deg)} }

/* Background Glowing Ambient Orbs */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    will-change: transform;
    pointer-events: none;
}

.orb-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    top: -10%;
    left: 10%;
    animation: float-orb-1 20s ease-in-out infinite alternate;
}

.orb-2 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    bottom: 10%;
    right: -5%;
    animation: float-orb-2 25s ease-in-out infinite alternate;
}

.orb-3 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation: float-orb-3 22s ease-in-out infinite alternate;
}

html.light .orb-1 {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.1) 0%, transparent 70%);
}
html.light .orb-2 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
}
html.light .orb-3 {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.08) 0%, transparent 70%);
}

@keyframes float-orb-1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, -60px) scale(1.1); }
    100% { transform: translate(-20px, 30px) scale(0.9); }
}

@keyframes float-orb-2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-50px, 40px) scale(0.95); }
    100% { transform: translate(30px, -20px) scale(1.05); }
}

@keyframes float-orb-3 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, 50px) scale(1.15); }
    100% { transform: translate(-40px, -30px) scale(0.85); }
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.15;
}

.grad-text {
    background: linear-gradient(135deg, var(--text-primary) 20%, var(--accent) 80%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

html.light .grad-text {
    background: linear-gradient(135deg, #0d0d14 30%, var(--accent-hover) 85%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Nav */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.back-link:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateX(-3px);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.logo-light { display: none !important; }
.logo-dark { display: block !important; }
html.light .logo-dark { display: none !important; }
html.light .logo-light { display: block !important; }

.brand-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.brand-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.25);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--border-hover);
    transform: scale(1.05);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    background: var(--surface-hover);
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    font-weight: 700;
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

/* Hero Section */
.hero-section {
    padding-top: calc(var(--nav-height) + 5rem);
    padding-bottom: 5rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.8rem, 5.5vw, 4.6rem);
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}



/* Section Header */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.section-title {
    font-size: clamp(2rem, 3.8vw, 3rem);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Resource Catalog & Filter */
.catalog-section {
    padding: 4rem 0 6rem;
}

.catalog-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.filter-btn {
    padding: 0.65rem 1.4rem;
    border-radius: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.filter-btn.active {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem;
}

.resource-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: default;
}

/* Mousemove Radial Spotlight (Signature PBA Box Effect) */
.resource-card::before,
.principle-card::before,
.org-banner::before,
.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

html.light .resource-card::before,
html.light .principle-card::before,
html.light .org-banner::before,
html.light .cta-box::before {
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(0, 0, 0, 0.04) 0%, transparent 60%);
}

.resource-card:hover::before,
.principle-card:hover::before,
.org-banner:hover::before,
.cta-box:hover::before {
    opacity: 1;
}

/* Top Border 1px Highlight Accent Line */
.resource-card::after,
.principle-card::after,
.org-banner::after,
.cta-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 2;
}

html.light .resource-card::after,
html.light .principle-card::after,
html.light .org-banner::after,
html.light .cta-box::after {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.15), transparent);
}

.resource-card:hover::after,
.principle-card:hover::after,
.org-banner:hover::after,
.cta-box:hover::after {
    opacity: 1;
}

/* Diagonal Shine Sweep Effect */
.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transform: skewX(-20deg);
    transition: left 0.75s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

html.light .card-shine {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.03), transparent);
}

.resource-card:hover .card-shine,
.principle-card:hover .card-shine,
.org-banner:hover .card-shine,
.cta-box:hover .card-shine {
    left: 160%;
}

/* Elevated Hover State */
.resource-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html.light .resource-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.version-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.version-pill .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    display: inline-block;
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.card-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

html.light .card-icon-wrap {
    background: rgba(0, 0, 0, 0.03);
}

.resource-card:hover .card-icon-wrap {
    transform: scale(1.1) rotate(5deg);
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-color);
}

.card-arrow {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    margin-left: 0.4rem;
}

html.light .card-arrow {
    background: rgba(0, 0, 0, 0.02);
}

.resource-card:hover .card-arrow {
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translate(2px, -2px);
    background: rgba(255, 255, 255, 0.08);
}

html.light .resource-card:hover .card-arrow {
    background: rgba(0, 0, 0, 0.06);
}

.category-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 500;
}

html.light .category-tag {
    background: rgba(0, 0, 0, 0.03);
}

.resource-name {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.resource-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.spec-list {
    list-style: none;
    margin-bottom: 1.75rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.spec-list li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-list li i {
    color: var(--accent);
    font-size: 0.75rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.tech-pills {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.tech-pill {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Code Preview Terminal */
.code-section {
    padding: 5rem 0;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.terminal-card {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    max-width: 980px;
    margin: 0 auto;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-tabs {
    display: flex;
    gap: 0.5rem;
}

.code-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.terminal-body {
    padding: 2rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.7;
    color: #e2e8f0;
}

.terminal-body pre {
    margin: 0;
}

.code-keyword { color: #f43f5e; font-weight: 600; }
.code-func { color: #38bdf8; }
.code-string { color: #a3e635; }
.code-comment { color: #64748b; font-style: italic; }
.code-num { color: #fbbf24; }

/* Principles Section */
.principles-section {
    padding: 6rem 0;
    position: relative;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.principle-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: default;
}

.principle-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html.light .principle-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
}

.principle-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.principle-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(0, 212, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #00d4ff;
    transition: all 0.35s ease;
}

html.light .principle-icon-wrap {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(14, 165, 233, 0.1));
    border-color: rgba(5, 150, 105, 0.25);
    color: #059669;
}

.principle-card:hover .principle-icon-wrap {
    transform: scale(1.1) rotate(4deg);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.3);
    color: #38bdf8;
    border-color: rgba(0, 212, 255, 0.5);
}

html.light .principle-card:hover .principle-icon-wrap {
    box-shadow: 0 0 25px rgba(5, 150, 105, 0.25);
    color: #047857;
}

.principle-number {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-muted);
    opacity: 0.25;
    letter-spacing: -0.05em;
    transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.principle-card:hover .principle-number {
    opacity: 0.85;
    color: #00d4ff;
    transform: translateY(-2px);
}

html.light .principle-card:hover .principle-number {
    color: #059669;
}

.principle-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.principle-card:hover .principle-title {
    color: #ffffff;
}

html.light .principle-card:hover .principle-title {
    color: #0d0d14;
}

.principle-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Card */
.cta-section {
    padding: 4rem 0 7rem;
}

.cta-box {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.cta-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.cta-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Footer (Matching Design & Drafting and UDN site) */
footer {
    position: relative;
    z-index: 10;
    background: var(--bg-color);
    border-top: 1px solid var(--border) !important;
    padding: 3.5rem 0 0;
    margin-top: 5rem;
}

html.light footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border) !important;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.footer-brand .logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--border);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-branding-row {
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 1.75rem 1.5rem 2.25rem;
    background: var(--bg-color);
    position: relative;
    z-index: 10;
}

html.light .footer-branding-row {
    background: var(--bg-color);
    border-top: 1px solid var(--border);
}

.footer-branding-text {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.footer-branding-text .brand-dot {
    margin: 0 0.8rem;
    color: var(--text-primary);
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 1024px) {
    .resource-grid { grid-template-columns: repeat(2, 1fr); }
    .principles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-bar { padding: 0 1.5rem; }
    .nav-links { display: none; }
    .resource-grid { grid-template-columns: 1fr; }
    .principles-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; gap: 1.5rem; }
    .footer-brand { flex-direction: column; gap: 0.75rem; }
    .footer-brand p { border-left: none; padding-left: 0; }
    .footer-links { justify-content: center; gap: 1.25rem; }
}

/* ==========================================================================
   GitHub Enhancements, Badges, Install Boxes & Org Hub Banner
   ========================================================================== */

.btn-github {
    background: #1f2328;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

html.light .btn-github {
    background: #24292f;
    color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15);
}

.btn-github:hover {
    background: #2d333b;
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.org-banner {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem 2.5rem;
    margin-bottom: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.org-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #00d4ff, #10b981);
}

.org-banner-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.org-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.org-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.org-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.org-handle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.org-banner-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.stat-pill {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.repo-handle {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #38bdf8;
    margin-bottom: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.repo-handle:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.install-box {
    margin: 1.35rem 0;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.install-box:hover {
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 0, 0, 0.72);
}

html.light .install-box {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.1);
}

html.light .install-box:hover {
    background: #e2e8f0;
    border-color: rgba(5, 150, 105, 0.3);
}

.install-box code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #a3e635;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.light .install-box code {
    color: #15803d;
}

.btn-copy-install {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-copy-install:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
}

.copy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10b981;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}
