mirror of
https://github.com/andwati/pwnforfunandprofit.xyz.git
synced 2026-12-04 22:28:49 +00:00
370 lines
6.4 KiB
SCSS
370 lines
6.4 KiB
SCSS
// Premium Design Variables
|
|
:root {
|
|
--bg-color: #f9fafb;
|
|
--text-color: #1a1a1a;
|
|
--text-muted: #6b7280;
|
|
--accent-color: #10b981; // Emerald
|
|
--surface-color: #ffffff;
|
|
--border-color: rgba(0, 0, 0, 0.05);
|
|
--shadow-color: rgba(0, 0, 0, 0.05);
|
|
|
|
--font-sans: 'Outfit', sans-serif;
|
|
--font-mono: 'JetBrains Mono', monospace;
|
|
|
|
--transition-spring: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
--transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
}
|
|
|
|
// Dark Mode Overrides
|
|
html.dark {
|
|
--bg-color: #0a0a0a;
|
|
--text-color: #f9fafb;
|
|
--text-muted: #a1a1aa;
|
|
--surface-color: #141414;
|
|
--border-color: rgba(255, 255, 255, 0.1);
|
|
--shadow-color: rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
// Global Reset & Base
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html {
|
|
font-family: var(--font-sans);
|
|
font-size: 100%; // Starts fluid typography
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
scroll-behavior: smooth;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
}
|
|
|
|
body {
|
|
line-height: 1.7;
|
|
min-height: 100dvh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
transition: var(--transition-smooth);
|
|
}
|
|
|
|
// Typography Scale (Fluid)
|
|
h1, h2, h3, h4, h5, h6 {
|
|
font-weight: 700;
|
|
line-height: 1.1;
|
|
letter-spacing: -0.02em;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
|
|
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
|
|
h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); margin-top: 1.5em; }
|
|
|
|
p, ul, ol, figure, blockquote {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
p {
|
|
max-width: 65ch; // Optimal reading width
|
|
}
|
|
|
|
code, pre {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
pre {
|
|
padding: 1.25rem;
|
|
border-radius: 8px;
|
|
overflow-x: auto;
|
|
border: 1px solid var(--border-color);
|
|
background: #1e1e2e; // Match Catppuccin Mocha for code blocks
|
|
}
|
|
|
|
code {
|
|
background: var(--surface-color);
|
|
padding: 0.2em 0.4em;
|
|
border-radius: 4px;
|
|
color: var(--accent-color);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
pre code {
|
|
background: transparent;
|
|
color: inherit;
|
|
padding: 0;
|
|
border: none;
|
|
}
|
|
|
|
// Layout Constraints
|
|
.site-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 0 5vw;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100dvh;
|
|
}
|
|
|
|
// Component: Header
|
|
.site-header {
|
|
padding: 2rem 0;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
background-color: rgba(var(--bg-color), 0.8);
|
|
backdrop-filter: blur(12px);
|
|
-webkit-backdrop-filter: blur(12px);
|
|
}
|
|
|
|
.nav-container {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.brand-text {
|
|
font-weight: 700;
|
|
font-size: 1.2rem;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.nav-links {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.nav-item {
|
|
font-weight: 500;
|
|
font-size: 0.95rem;
|
|
position: relative;
|
|
}
|
|
|
|
.nav-item::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 0;
|
|
height: 2px;
|
|
bottom: -4px;
|
|
left: 0;
|
|
background-color: var(--accent-color);
|
|
transition: var(--transition-smooth);
|
|
}
|
|
|
|
.nav-item:hover::after {
|
|
width: 100%;
|
|
}
|
|
|
|
// Component: Theme Toggle
|
|
.theme-toggle {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-color);
|
|
cursor: pointer;
|
|
padding: 0.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
transition: var(--transition-smooth);
|
|
|
|
svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
}
|
|
|
|
html.dark .sun-icon { display: block; }
|
|
html.dark .moon-icon { display: none; }
|
|
html:not(.dark) .sun-icon { display: none; }
|
|
html:not(.dark) .moon-icon { display: block; }
|
|
|
|
// Main Content
|
|
.main-content {
|
|
flex-grow: 1;
|
|
padding-bottom: 5rem;
|
|
}
|
|
|
|
// Hero Section
|
|
.hero {
|
|
padding: 8rem 0 6rem 0;
|
|
max-width: 800px;
|
|
}
|
|
|
|
.hero-title {
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.hero-subtitle {
|
|
font-size: clamp(1.1rem, 1.5vw, 1.3rem);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
// Post Feed
|
|
.post-feed {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.feed-item {
|
|
display: block;
|
|
}
|
|
|
|
.item-link {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.item-date {
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
font-variant-numeric: tabular-nums;
|
|
letter-spacing: 0.05em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.item-title {
|
|
margin: 0;
|
|
font-size: clamp(1.5rem, 2vw, 2rem);
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.item-link:hover .item-title {
|
|
color: var(--accent-color);
|
|
}
|
|
|
|
.item-desc {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
// Pagination
|
|
.pagination {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 5rem;
|
|
padding-top: 2rem;
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
|
|
// Post Detail
|
|
.post-detail {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding-top: 4rem;
|
|
}
|
|
|
|
.post-header {
|
|
margin-bottom: 4rem;
|
|
}
|
|
|
|
.post-title {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.post-meta {
|
|
color: var(--text-muted);
|
|
font-size: 0.9rem;
|
|
font-style: italic;
|
|
}
|
|
|
|
.post-toc {
|
|
background: var(--surface-color);
|
|
border: 1px solid var(--border-color);
|
|
padding: 1.5rem;
|
|
border-radius: 12px;
|
|
margin-bottom: 3rem;
|
|
|
|
summary {
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
list-style: none; /* Hide default arrow */
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
|
|
&::before {
|
|
content: "↓";
|
|
color: var(--accent-color);
|
|
transition: transform 0.2s ease;
|
|
}
|
|
}
|
|
|
|
&[open] summary::before {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
ul {
|
|
margin-top: 1rem;
|
|
margin-bottom: 0;
|
|
list-style-type: none;
|
|
padding-left: 1rem;
|
|
}
|
|
|
|
li {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
a {
|
|
color: var(--text-muted);
|
|
font-size: 0.95em;
|
|
&:hover { color: var(--accent-color); }
|
|
}
|
|
}
|
|
|
|
.post-tags {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-top: 4rem;
|
|
|
|
.tag {
|
|
background: var(--surface-color);
|
|
border: 1px solid var(--border-color);
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 99px;
|
|
font-size: 0.85rem;
|
|
font-family: var(--font-mono);
|
|
}
|
|
}
|
|
|
|
// Footer
|
|
.site-footer {
|
|
padding: 3rem 0;
|
|
border-top: 1px solid var(--border-color);
|
|
color: var(--text-muted);
|
|
font-size: 0.9rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
// Utilities / Interactions
|
|
.hover-scale {
|
|
transition: var(--transition-spring);
|
|
|
|
&:active {
|
|
transform: scale(0.98);
|
|
}
|
|
}
|
|
|
|
.typeit-element::after {
|
|
content: '|';
|
|
animation: blink 1s step-end infinite;
|
|
color: var(--accent-color);
|
|
}
|
|
|
|
@keyframes blink {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0; }
|
|
}
|