Files
Portfolio_Site/assets/css/extended/custom.css
2026-04-01 09:14:17 +05:45

317 lines
5.9 KiB
CSS

/* Global link styles */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Space+Grotesk:wght@300..700&display=swap");
:root {
--gap: 24px;
--content-gap: 20px;
--nav-width: 1024px;
--main-width: 720px;
--header-height: 60px;
--footer-height: 60px;
--radius: 8px;
--theme: rgb(255, 255, 255);
--entry: rgb(255, 255, 255);
--primary: #282828;
--secondary: #3c3836;
--tertiary: rgb(214, 214, 214);
--content: rgb(31, 31, 31);
--code-block-bg: rgb(28, 29, 33);
--code-bg: rgb(245, 245, 245);
--border: rgb(238, 238, 238);
color-scheme: light;
--red: #cc241d;
--redl: #fb4934;
--green: #98971a;
--greenl: #b8bb26;
--yellow: #d79921;
--yellowl: #fabd2f;
--blue: #458588;
--bluel: #83a598;
--purple: #b16286;
--purplel: #d3869b;
--aqua: #689d6a;
--aqual: #8ec07c;
--gray: #928374;
--grayl: #a89984;
--orange: #d65d0e;
--orangel: #fe8019;
--post-entry-bg: white; /* soft gruvbox light */
--post-entry-fg: #282828;
}
:root[data-theme="dark"] {
--theme: #1d2021;
--entry: #282828;
--primary: #ebdbb2;
--secondary: #a89984;
--tertiary: #3c3836;
--content: #ebdbb2;
--code-block-bg: #282828;
--code-bg: #3c3836;
--border: #3c3836;
color-scheme: dark;
--post-entry-bg: #282828;
--post-entry-fg: #ebdbb2;
--green: #b8bb26;
--greenl: #8ec07c;
}
body {
font-family: "Space Grotesk", monospace;
}
/* *
* UNIVERSAL HOVER ANIMATION (Fill-up Effect)
* Target: Nav spans, main links (except entries), social links, and share icons.
* */
nav #menu a span {
position: relative;
text-decoration: none !important;
color: inherit;
transition: color 0.3s ease;
z-index: 1;
display: inline-block;
padding: 0 8px; /* Reduced vertical padding */
}
main a:not(.entry-link, .anchor),
.social-icons a,
.share-buttons a,
.note-item a {
position: relative;
text-decoration: none !important;
color: inherit;
transition: color 0.3s ease;
z-index: 1;
display: inline-block;
}
/* Note items are full-width flex containers */
.note-item a {
display: flex;
width: 100%;
padding: 8px 12px;
margin: 0 -12px; /* Offset padding for full-row effect */
}
/* The fill background */
nav #menu a span::before,
main a:not(.entry-link, .anchor)::before,
.social-icons a::before,
.share-buttons a::before,
.note-item a::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px; /* Static underline state */
background-color: var(--green);
z-index: -1;
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}
/* Notes list starts with 0 height to stay clean */
.note-item a::before,
.share-buttons a::before {
height: 0;
}
/* Hover state: Fill up the background */
nav #menu a:hover span::before,
main a:hover:not(.entry-link, .anchor)::before,
.social-icons a:hover::before,
.share-buttons a:hover::before,
.note-item a:hover::before {
height: 100%;
}
/* CONTRAST FIX: Switch text/icon color on hover */
nav #menu a:hover span,
main a:hover:not(.entry-link, .anchor),
.social-icons a:hover,
.share-buttons a:hover,
.note-item a:hover .note-title,
.note-item a:hover .note-date {
color: var(--theme) !important;
}
/* Icon specific color switch */
.social-icons a:hover svg,
.share-buttons a:hover svg {
fill: var(--theme) !important;
stroke: var(--theme) !important;
}
/* Active Nav State - remain thick underline */
nav #menu .active span::before {
height: 4px;
}
nav #menu .active a:hover span::before {
height: 100%;
}
main h1 {
color: var(--green);
}
.share-buttons,
.toc,
.post-tags a {
border: 0px;
background: transparent;
}
.post-tags a {
background: var(--tertiary);
color: var(--primary);
padding: 4px 12px;
border-radius: var(--radius);
transition: all 0.3s ease;
}
.post-tags a:hover {
background: var(--green);
color: var(--theme);
transform: translateY(-2px);
}
.share-buttons {
margin-top: 40px;
padding: 20px 0;
border-top: 1px solid var(--tertiary);
display: flex;
justify-content: center;
gap: 12px;
}
.share-buttons a {
padding: 10px;
border-radius: var(--radius);
}
.anchor {
text-decoration: none;
}
/* main h1::before { */
/* content: "#"; */
/* color: var(--red); */
/* color: var(--green); */
/* margin-right: 0.5em; */
/* font-weight: bold; */
/* font-weight: bold; */
/* font-style: italic; */
/* } */
main .post-entry {
border: 1px solid var(--tertiary);
background-color: var(--post-entry-bg);
color: var(--post-entry-fg);
transition: transform 0.2s ease, border-color 0.2s ease;
}
main .post-entry:hover {
transform: translateY(-2px);
border-color: var(--green);
}
/* *
* NOTES SECTION - Compact list style
* */
.notes-list {
list-style: none;
padding: 0;
margin: 0;
}
.note-item {
padding: 12px 0;
border-bottom: 1px solid var(--tertiary);
}
.note-item:last-child {
border-bottom: none;
}
.note-item a:hover .note-title,
.note-item a:hover .note-date {
color: var(--theme) !important;
}
.note-title {
font-size: 1.1rem;
font-weight: 500;
color: var(--primary);
}
.note-date {
font-size: 0.85rem;
color: var(--secondary);
white-space: nowrap;
}
.note-summary {
margin: 4px 0 0 0;
font-size: 0.96rem;
color: var(--secondary);
line-height: 1.5;
}
/* *
* POST CONTENT SPACINGS
* */
.post-content {
font-size: 1.1rem;
line-height: 1.7;
color: var(--primary);
}
.post-content p,
.post-content ol,
.post-content ul,
.post-content dl {
margin-bottom: 1.6em;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
margin-top: 1.8em;
margin-bottom: 0.8em;
color: var(--green);
}
.post-content blockquote {
margin: 2em 0;
padding: 0.5em 1.5em;
border-left: 4px solid var(--green);
background-color: var(--entry);
font-style: italic;
color: var(--secondary);
}
.post-content code {
background-color: var(--tertiary);
color: var(--primary);
border-radius: 4px;
}
.post-content pre code {
background-color: var(--entry) !important;
}