Files
cs249r_book/collabs/assets/styles/style.scss

503 lines
10 KiB
SCSS

/*-- scss:defaults --*/
// Brand colors matching MLSysBook ecosystem
$primary: #2563eb;
$secondary: #64748b;
$success: #22c55e;
$warning: #f59e0b;
$accent: #e94560;
/*-- scss:rules --*/
// ============================================================================
// DARK MODE TOGGLE
// ============================================================================
.quarto-color-scheme-toggle {
color: #6c757d !important;
&:hover {
color: $primary !important;
}
}
// Moon icon in light mode (indicates "switch to dark mode")
.quarto-color-scheme-toggle:not(.alternate) .bi::before {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%234a5568" class="bi bi-moon-stars-fill" viewBox="0 0 16 16"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/><path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"/></svg>') !important;
background-size: contain !important;
background-repeat: no-repeat !important;
background-position: center !important;
content: "" !important;
display: inline-block !important;
width: 1em !important;
height: 1em !important;
}
// ============================================================================
// HERO SECTION
// ============================================================================
.hero-section {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
color: white;
padding: 5rem 2rem;
margin: -1rem -1rem 0 -1rem;
text-align: center;
position: relative;
overflow: hidden;
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 80%, rgba(233, 69, 96, 0.1) 0%, transparent 50%);
pointer-events: none;
}
}
.hero-content {
position: relative;
z-index: 1;
max-width: 800px;
margin: 0 auto;
}
.coming-badge {
display: inline-block;
background: $accent;
color: white;
padding: 0.5rem 1.25rem;
border-radius: 2rem;
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-bottom: 1.5rem;
}
.hero-section h1 {
font-size: 3.5rem;
font-weight: 700;
margin-bottom: 0.75rem;
color: white !important;
letter-spacing: -0.02em;
}
.hero-subtitle {
font-size: 1.5rem;
font-weight: 400;
color: rgba(255, 255, 255, 0.9) !important;
margin-bottom: 0.5rem;
}
.hero-tagline {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.7) !important;
font-style: italic;
}
// ============================================================================
// CONTENT SECTION
// ============================================================================
.content-section {
max-width: 900px;
margin: 0 auto;
padding: 3rem 1.5rem;
h2 {
color: #1e293b;
font-size: 1.75rem;
font-weight: 600;
margin-top: 3rem;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #e2e8f0;
&:first-child {
margin-top: 0;
}
}
p {
color: #475569;
font-size: 1.1rem;
line-height: 1.8;
margin-bottom: 1rem;
}
}
// ============================================================================
// JOURNEY CARDS (Understand → Experiment → Build)
// ============================================================================
.journey-cards {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
margin: 2rem 0 3rem 0;
}
.journey-card {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 1rem;
padding: 2rem 1.5rem;
text-align: center;
transition: all 0.3s ease;
&:hover {
transform: translateY(-4px);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}
&.active {
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
border-color: transparent;
color: white;
h3 {
color: white;
}
p {
color: rgba(255, 255, 255, 0.9);
}
.current {
background: rgba(255, 255, 255, 0.2);
color: white;
padding: 0.25rem 0.75rem;
border-radius: 1rem;
font-size: 0.85rem;
font-weight: 500;
}
}
}
.journey-icon {
font-size: 2.5rem;
margin-bottom: 1rem;
}
.journey-card h3 {
font-size: 1.25rem;
font-weight: 600;
color: #1e293b;
margin-bottom: 0.5rem;
}
.journey-card p {
font-size: 0.95rem;
color: #64748b;
margin-bottom: 1rem;
line-height: 1.5;
}
.journey-card a {
color: $primary;
text-decoration: none;
font-weight: 500;
font-size: 0.9rem;
&:hover {
text-decoration: underline;
}
}
// ============================================================================
// TOPIC GRID
// ============================================================================
.topic-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
margin: 2rem 0;
}
.topic-card {
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 0.75rem;
padding: 1.5rem;
transition: all 0.2s ease;
&:hover {
border-color: $primary;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
h4 {
color: $primary;
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 0.75rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #e2e8f0;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
li {
color: #475569;
font-size: 0.95rem;
padding: 0.35rem 0;
padding-left: 1.25rem;
position: relative;
&::before {
content: '';
position: absolute;
left: 0;
color: #94a3b8;
}
}
}
// ============================================================================
// CTA SECTION
// ============================================================================
.cta-section {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
margin: 2rem 0 3rem 0;
}
.cta-btn {
display: inline-block;
padding: 0.875rem 2rem;
border-radius: 0.5rem;
text-decoration: none;
font-weight: 500;
font-size: 1rem;
transition: all 0.2s ease;
&.primary {
background: $primary;
color: white;
&:hover {
background: darken($primary, 8%);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
}
&.secondary {
background: #f1f5f9;
color: #475569;
border: 1px solid #e2e8f0;
&:hover {
background: #e2e8f0;
color: #1e293b;
transform: translateY(-2px);
}
}
}
// ============================================================================
// LEGACY STYLES (keeping for compatibility)
// ============================================================================
.hero-banner {
text-align: center;
padding: 4rem 2rem;
background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
color: white;
margin: -1rem -1rem 2rem -1rem;
border-radius: 0 0 1rem 1rem;
}
.hero-title {
font-size: 3rem;
font-weight: 700;
margin-bottom: 0.5rem;
color: white !important;
}
.coming-soon-badge {
display: inline-block;
background: rgba(255, 255, 255, 0.2);
border: 2px solid rgba(255, 255, 255, 0.4);
padding: 0.5rem 1.5rem;
border-radius: 2rem;
font-weight: 600;
font-size: 1rem;
letter-spacing: 0.05em;
}
// Grid layout for topics
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.g-col-6 {
background: #f8fafc;
padding: 1.5rem;
border-radius: 0.5rem;
border: 1px solid #e2e8f0;
}
.g-col-6 h3 {
color: $primary;
font-size: 1.1rem;
margin-bottom: 0.75rem;
}
.g-col-6 ul {
margin: 0;
padding-left: 1.25rem;
}
.g-col-6 li {
margin-bottom: 0.25rem;
color: #475569;
}
// CTA buttons (legacy)
.cta-buttons {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
margin: 2rem 0;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
text-decoration: none;
font-weight: 500;
transition: all 0.2s ease;
}
.btn-primary {
background: $primary;
color: white;
&:hover {
background: darken($primary, 10%);
color: white;
}
}
.btn-secondary {
background: #f1f5f9;
color: #475569;
border: 1px solid #e2e8f0;
&:hover {
background: #e2e8f0;
color: #1e293b;
}
}
// Text utilities
.text-center {
text-align: center;
}
// Code block styling
pre {
background: #1e293b;
color: #e2e8f0;
padding: 1.5rem;
border-radius: 0.5rem;
overflow-x: auto;
font-size: 0.85rem;
}
// Table styling
table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
}
th, td {
padding: 0.75rem 1rem;
text-align: left;
border-bottom: 1px solid #e2e8f0;
}
th {
background: #f8fafc;
font-weight: 600;
color: #1e293b;
}
// ============================================================================
// RESPONSIVE ADJUSTMENTS
// ============================================================================
@media (max-width: 768px) {
.hero-section {
padding: 3rem 1.5rem;
margin: -1rem -1rem 0 -1rem;
}
.hero-section h1 {
font-size: 2.25rem;
}
.hero-subtitle {
font-size: 1.2rem;
}
.hero-tagline {
font-size: 1rem;
}
.content-section {
padding: 2rem 1rem;
}
.journey-cards {
grid-template-columns: 1fr;
gap: 1rem;
}
.topic-grid {
grid-template-columns: 1fr;
}
.cta-section {
flex-direction: column;
align-items: center;
}
.cta-btn {
width: 100%;
max-width: 300px;
text-align: center;
}
.hero-banner {
padding: 2rem 1rem;
}
.hero-title {
font-size: 2rem;
}
.cta-buttons {
flex-direction: column;
align-items: center;
}
.btn {
width: 100%;
max-width: 300px;
text-align: center;
}
}