1
0
mirror of https://github.com/avinal/avinal.github.io.git synced 2026-07-04 07:40:09 +05:30

feat: redesign my webiste from scratch

- remove hugo and paper box theme
- inspiration https://jay.fish
- use astro based system

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
2026-02-25 19:46:43 +05:30
committed by Morumotto
parent 62efd95607
commit 6b07ea345f
145 changed files with 10397 additions and 90 deletions
+407
View File
@@ -0,0 +1,407 @@
/* ============================================
Global styles — uses CSS vars from theme config.
All token values live in src/config/theme.ts.
============================================ */
@layer reset, base, layout, components, utilities;
/* --- Reset --- */
@layer reset {
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
scroll-behavior: smooth;
}
body {
min-height: 100dvh;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
a {
color: inherit;
text-decoration: none;
}
ul,
ol {
list-style: none;
}
}
/* --- Base --- */
@layer base {
body {
font-family: var(--font-sans);
font-size: var(--text-base);
line-height: var(--leading-normal);
color: var(--text);
background-color: var(--bg);
transition: color var(--duration-normal) var(--ease-out),
background-color var(--duration-normal) var(--ease-out);
}
h1,
h2,
h3,
h4 {
line-height: var(--leading-tight);
letter-spacing: var(--tracking-tight);
font-weight: 700;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
p + p {
margin-top: var(--space-4);
}
code {
font-family: var(--font-mono);
font-size: 0.9em;
}
:not(pre) > code {
padding: 0.15em 0.35em;
border-radius: var(--radius-sm);
background-color: var(--bg-surface-hover);
}
pre {
padding: var(--space-4);
border-radius: var(--radius-md);
overflow-x: auto;
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
}
a:not(.nav-link) {
color: var(--accent);
transition: color var(--duration-fast) var(--ease-out);
}
a:not(.nav-link):hover {
color: var(--accent-hover);
}
::selection {
background-color: var(--accent);
color: white;
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
}
/* --- Layout --- */
@layer layout {
.page-wrapper {
display: flex;
flex-direction: column;
min-height: 100dvh;
}
.main-content {
flex: 1;
width: 100%;
max-width: var(--max-w-page);
margin-inline: auto;
padding-inline: var(--space-6);
padding-block: var(--space-12);
}
.prose {
max-width: var(--max-w-prose);
}
.section {
padding-block: var(--space-16);
}
.section + .section {
border-top: 1px solid var(--border);
}
.bento {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: var(--space-4);
}
.bento-full { grid-column: span 12; }
.bento-8 { grid-column: span 8; }
.bento-6 { grid-column: span 6; }
.bento-4 { grid-column: span 4; }
@media (max-width: 900px) {
.bento-8,
.bento-6,
.bento-4 {
grid-column: span 12;
}
}
@media (min-width: 901px) and (max-width: 1100px) {
.bento-8 { grid-column: span 12; }
.bento-4 { grid-column: span 6; }
}
}
/* --- Components --- */
@layer components {
.badge {
display: inline-block;
padding: var(--space-1) var(--space-3);
font-size: var(--text-xs);
font-weight: 500;
border-radius: var(--radius-full);
background-color: var(--accent-subtle);
color: var(--accent);
letter-spacing: 0.01em;
}
.card {
padding: var(--space-6);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background-color: var(--bg-surface);
box-shadow: var(--shadow);
transition: box-shadow var(--duration-normal) var(--ease-out),
border-color var(--duration-normal) var(--ease-out);
}
.card:hover {
box-shadow: var(--shadow-md);
border-color: var(--border-strong);
}
.btn {
display: inline-flex;
align-items: center;
gap: var(--space-2);
padding: var(--space-2) var(--space-5);
font-size: var(--text-sm);
font-weight: 500;
border-radius: var(--radius-md);
border: 1px solid var(--border);
background-color: var(--bg-surface);
color: var(--text);
cursor: pointer;
transition: all var(--duration-fast) var(--ease-out);
}
.btn:hover {
background-color: var(--bg-surface-hover);
border-color: var(--border-strong);
}
.btn-accent {
background-color: var(--accent);
color: white;
border-color: var(--accent);
}
.btn-accent:hover {
background-color: var(--accent-hover);
border-color: var(--accent-hover);
}
.widget-title {
display: flex;
align-items: center;
gap: var(--space-2);
font-size: var(--text-xs);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--accent);
}
.widget-title svg {
color: var(--accent);
}
}
/* --- Prose (blog post content) --- */
@layer components {
.prose {
line-height: var(--leading-relaxed);
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
margin-top: 1.8em;
margin-bottom: 0.6em;
}
.prose h1:first-child,
.prose h2:first-child {
margin-top: 0;
}
.prose p {
margin-bottom: 1.2em;
}
.prose ul,
.prose ol {
list-style: revert;
padding-left: 1.8em;
margin-bottom: 1.2em;
}
.prose li {
margin-bottom: 0.3em;
}
.prose li > ul,
.prose li > ol {
margin-top: 0.3em;
margin-bottom: 0;
}
.prose blockquote {
border-left: 3px solid var(--accent);
padding-left: var(--space-4);
margin-block: 1.2em;
color: var(--text-secondary);
font-style: italic;
}
.prose img {
border-radius: var(--radius-md);
margin-block: 1.5em;
}
.prose img.img-left {
float: left;
max-width: 45%;
margin: 0 1.5em 1em 0;
}
.prose img.img-right {
float: right;
max-width: 45%;
margin: 0 0 1em 1.5em;
}
@media (max-width: 600px) {
.prose img.img-left,
.prose img.img-right {
float: none;
max-width: 100%;
margin: 1.5em 0;
}
}
.prose hr {
border: none;
border-top: 1px solid var(--border);
margin-block: 2em;
}
.prose table {
width: 100%;
border-collapse: collapse;
margin-block: 1.5em;
font-size: var(--text-sm);
}
.prose th,
.prose td {
padding: var(--space-2) var(--space-3);
border: 1px solid var(--border);
text-align: left;
}
.prose th {
background-color: var(--bg-surface);
font-weight: 600;
}
.prose a {
text-decoration: underline;
text-underline-offset: 2px;
}
.prose .heading-anchor {
margin-left: 0.3em;
color: var(--border-strong);
text-decoration: none;
font-weight: 400;
opacity: 0;
transition: opacity var(--duration-fast) var(--ease-out);
}
.prose h1:hover .heading-anchor,
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor,
.prose .heading-anchor:focus {
opacity: 1;
color: var(--accent);
}
.prose pre {
margin-block: 1.5em;
}
.prose .clearfix::after {
content: "";
display: table;
clear: both;
}
}
/* --- Utilities --- */
@layer utilities {
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-mono { font-family: var(--font-mono); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
}