Files

242 lines
6.4 KiB
CSS

/* ------------------------------------------------------------------
LOCAL FONTS
------------------------------------------------------------------ */
@font-face {
font-family: 'DM Serif Display';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../assets/fonts/dm-serif-display-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'DM Serif Display';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../assets/fonts/dm-serif-display-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300 600;
font-display: swap;
src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300 600;
font-display: swap;
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400 500;
font-display: swap;
src: url('../assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400 500;
font-display: swap;
src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ------------------------------------------------------------------
THEME & VARS
------------------------------------------------------------------ */
:root {
--bg-color: #F8F6F2;
--text-main: #121212;
--text-muted: #666666;
--border-subtle: rgba(0, 0, 0, 0.08);
--card-hover: #FFFFFF;
--accent: #2A45B6;
--accent-secondary: #CC2936;
--tag-bg: rgba(0, 0, 0, 0.04);
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
--font-serif: 'DM Serif Display', serif;
--font-sans: 'Inter', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
/* Article specific vars mostly used in modules but good to have globally */
--card-bg: rgba(255, 255, 255, 0.6);
--border-color: rgba(0, 0, 0, 0.15);
--line-subtle: rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] {
--bg-color: #0E0E0E;
--text-main: #EAEAEA;
--text-muted: #888888;
--border-subtle: rgba(255, 255, 255, 0.1);
--card-hover: #1A1A1A;
--accent: #5C7CFA;
--accent-secondary: #FF4D5A;
--tag-bg: rgba(255, 255, 255, 0.08);
--card-bg: rgba(255, 255, 255, 0.03);
--border-color: rgba(255, 255, 255, 0.2);
--line-subtle: rgba(255, 255, 255, 0.08);
}
/* ------------------------------------------------------------------
RESET & BASE
------------------------------------------------------------------ */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
body {
background-color: var(--bg-color);
color: var(--text-main);
font-family: var(--font-sans);
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
transition: background 0.5s var(--ease-out), color 0.5s;
}
h1,
h2,
h3,
h4 {
font-family: var(--font-serif);
font-weight: 400;
line-height: 1.1;
}
a {
color: inherit;
text-decoration: none;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* ------------------------------------------------------------------
NAVBAR
------------------------------------------------------------------ */
nav {
padding: 2rem 5vw;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 100;
}
/* For Article pages, Nav is fixed/sticky */
nav.sticky {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 1.5rem 5vw;
pointer-events: none;
/* Let clicks pass through */
}
nav.sticky .logo,
nav.sticky .nav-controls,
nav.sticky #themeBtn,
nav.sticky #audioBtn {
pointer-events: auto;
}
nav.sticky .nav-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--bg-color);
opacity: 0.97;
backdrop-filter: blur(5px);
z-index: -1;
}
.logo {
font-family: var(--font-sans);
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 10px;
font-size: 0.9rem;
cursor: pointer;
}
#themeBtn {
background: none;
border: none;
color: var(--text-main);
cursor: pointer;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 0.1em;
display: flex;
align-items: center;
gap: 6px;
font-family: var(--font-sans);
}
.nav-controls {
display: flex;
align-items: center;
gap: 1.5rem;
}
.github-btn {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.8rem;
color: var(--text-main);
font-weight: 500;
transition: opacity 0.2s;
background: var(--tag-bg);
padding: 6px 12px;
border-radius: 100px;
border: 1px solid var(--border-subtle);
}
.github-btn:hover {
opacity: 0.8;
background: var(--border-subtle);
}
#starCount {
font-variant-numeric: tabular-nums;
font-weight: 600;
margin-left: 2px;
}