:root {
    --container-max-width: 100%;
    --container-side-padding: 20px;
    --accent-color: #f1b61f;
    --accent-glow: rgba(241, 182, 31, 0.25);
    --bg-primary: #131313;
    --bg-secondary: #1c1c1a;
    --bg-surface: #1d1d1b;
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --blur-strength: 8px;
    --transition-speed: 150ms;
}

@media (max-width: 800px) {
    :root { --container-side-padding: 10px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { margin: 0; overflow-x: hidden; cursor: default; }

html, body, button, input, a { font-family: 'Poppins', 'Roboto', sans-serif; font-weight: 400; color: var(--text-primary); }

body {
    font-size: 18px;
    line-height: 150%;
    background: var(--bg-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% -15%, rgba(241, 182, 31, 0.07), transparent 60%),
        radial-gradient(ellipse 50% 35% at 100% 100%, rgba(241, 182, 31, 0.04), transparent 55%);
    z-index: -10;
    pointer-events: none;
}

.space-background {
    position: fixed;
    inset: 0;
    z-index: -5;
    pointer-events: none;
    opacity: 0.35;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
}

h1, h2, h3, h4, h5, h6, p { line-height: 130%; margin: 0 0 20px 0; }

h1 { font-size: 2.5rem; font-weight: 600; letter-spacing: -0.5px; }
h2 { font-size: 1.8rem; font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 500; }

a { text-decoration: none; color: var(--text-primary); transition: color var(--transition-speed); cursor: pointer; }
a:hover { text-decoration: none; color: var(--accent-color); }

.text { color: var(--text-secondary); }
.text, .text :is(p, ul, ol) { font-weight: 400; font-size: 18px; line-height: 150%; }
.text :is(p, ul, ol):not(:last-child) { margin-bottom: 24px; }
.text a { font-weight: normal; color: var(--accent-color); text-decoration: none; position: relative; }
.text a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 1px; background-color: var(--accent-color); transform: scaleX(0); transform-origin: right; transition: transform var(--transition-speed); }
.text a:hover { text-decoration: none; }
.text a:hover::after { transform: scaleX(1); transform-origin: left; }
.text strong { font-weight: 600; color: var(--text-primary); }
.text img { max-width: 100%; height: auto; }

.text ul, .text ol { padding-left: 20px; }
.text blockquote { border-left: 3px solid var(--accent-color); padding-left: 20px; margin-left: 0; font-style: italic; color: var(--text-secondary); }

.container, .Container { max-width: var(--container-max-width); padding-left: var(--container-side-padding); padding-right: var(--container-side-padding); margin-left: auto; margin-right: auto; }

::selection { background-color: rgba(241, 182, 31, 0.3); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.fade-in { animation: fadeIn 0.4s ease forwards; }
.heading-pending { opacity: 0; }

header { height: 100px; }
footer { height: 100px; }
pre {position: relative; tab-size: 4;}
pre canvas {position: absolute; left: 0; top: 0; width: 100%; height: 100%;}

pre code {
	display: block;
	padding: 10px var(--side-padding);
	/*background: #111; /* deep black */
	color: #eee;      /* default code color */
	font-family: 'Cascadia Mono', 'Fira Code', 'Courier New', monospace;
	font-size: 16px;
	line-height: 175%;
	overflow-x: auto;
	position: relative;
	text-shadow: black 1px 1px 10px ;
}

/* Optional: subtle top-left marker bar */
pre::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 3px;
	background: var(--accent-color); /* orange gradient */
	z-index: 1;
}

@media (max-width: 800px) {

	pre::before {width: 2px;}
}

/* Highlight colors */
pre code .keyword {
	color: #3DD17C; /* warm amber */
}

pre code .variable {
	color: #F1B61F; /* light blue */
}

pre code .string {
	color: #E5E5E5; /* soft green */
}

pre code .comment {
	color: #D548FF; /* muted gray */
	/*font-style: italic;*/
}

pre code .number {
	color: #f87171; /* soft red */
}

pre code .punctuation {
	color: #9A9A9A; /* light gray (neutral) */
}

/* Optional: smooth fade-in if you want to animate it */
pre code span {
	transition: color 0.2s ease;
}
body { background: var(--bg-primary); position: relative; transition: background-color var(--transition-speed); }

body.paused * { animation-play-state: paused !important; transition: none !important; }

.container { background: rgba(29, 29, 27, 0.6); border-radius: 6px; border: 1px solid var(--border-subtle); transition: border-color var(--transition-speed); }
.container:hover { border-color: var(--border-hover); }

@media (min-width: 768px) {
  .container { backdrop-filter: blur(var(--blur-strength)); -webkit-backdrop-filter: blur(var(--blur-strength)); background: rgba(29, 29, 27, 0.45); }
}

header, footer { background: rgba(19, 19, 19, 0.92); border-bottom: 1px solid var(--border-subtle); }
footer { border-top: 1px solid var(--border-subtle); border-bottom: none; }

@media (min-width: 768px) {
  header, footer { backdrop-filter: blur(var(--blur-strength)); -webkit-backdrop-filter: blur(var(--blur-strength)); background: rgba(19, 19, 19, 0.85); }
}

main { padding: 30px 0; }

.ArticlesList article { transition: border-color var(--transition-speed); display: grid; grid-template-columns: 1fr; gap: 20px; padding: 0; background: rgba(29, 29, 27, 0.5); border: 1px solid var(--border-subtle); border-radius: 6px; overflow: hidden; }
.ArticlesList article:hover { border-color: rgba(241, 182, 31, 0.25); }

.ArticlesList .image { aspect-ratio: 16 / 9; width: 100%; }
.ArticlesList .image > div { margin: 16px; height: calc(100% - 32px); width: calc(100% - 32px); transition: margin var(--transition-speed), height var(--transition-speed), width var(--transition-speed); overflow: hidden; position: relative; border-radius: 4px; }
.ArticlesList .image > div > div { width: 100%; height: 100%; position: relative; display: flex; }
.ArticlesList .image img { object-fit: cover; width: 100%; height: 100%; object-position: center; display: inline; }

.image { border-radius: 4px; overflow: hidden; position: relative; }
.image img { width: 100%; height: auto; }

h1, h2, h3 { color: var(--text-primary); position: relative; }
h2 { font-size: 1.6rem; margin-bottom: 10px; }
h2::after { content: ""; position: absolute; bottom: -5px; left: 0; width: 32px; height: 1px; background: var(--accent-color); transition: width var(--transition-speed); }
article:hover h2::after { width: 48px; }

.text { color: var(--text-secondary); }

a.btn { display: inline-block; padding: 8px 16px; background: rgba(241, 182, 31, 0.08); color: var(--accent-color); border: 1px solid rgba(241, 182, 31, 0.25); border-radius: 4px; transition: background var(--transition-speed), border-color var(--transition-speed); cursor: pointer; }
a.btn:hover { background: rgba(241, 182, 31, 0.15); border-color: rgba(241, 182, 31, 0.4); text-decoration: none; }

@media (min-width: 768px) { article { grid-template-columns: 200px 1fr; } }

.author-info { display: flex; align-items: center; margin-top: 15px; color: var(--text-secondary); font-size: 0.9rem; }
.author-info .avatar { width: 30px; height: 30px; border-radius: 50%; margin-right: 10px; border: 1px solid rgba(241, 182, 31, 0.3); overflow: hidden; }

button, input[type="submit"], input[type="button"], [role="button"] { cursor: pointer; }
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-ExtraLight.ttf);
    font-weight: 100;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-ExtraLightItalic.ttf);
    font-weight: 100;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-Light.ttf);
    font-weight: 200;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-LightItalic.ttf);
    font-weight: 200;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-Thin.ttf);
    font-weight: 300;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-ThinItalic.ttf);
    font-weight: 300;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-Regular.ttf);
    font-weight: normal;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-RegularItalic.ttf);
    font-weight: normal;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-Medium.ttf);
    font-weight: 500;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-MediumItalic.ttf);
    font-weight: 500;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-SemiBold.ttf);
    font-weight: 550;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-SemiBoldItalic.ttf);
    font-weight: 550;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-Bold.ttf);
    font-weight: bold;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-BoldItalic.ttf);
    font-weight: bold;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-ExtraBold.ttf);
    font-weight: 800;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-ExtraBoldItalic.ttf);
    font-weight: 800;
	font-style: italic;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-Black.ttf);
    font-weight: 900;
}
@font-face {
    font-family: Poppins;
    src: url(/Grace/Projects/Tom/Design/Fonts/Poppins-BlackItalic.ttf);
    font-weight: 900;
	font-style: italic;
}/* Layout Styles */
:root { --header-height: 70px; --footer-height: 70px; }

body { display: flex; flex-direction: column; min-height: 100vh; }

main { flex: 1; padding-top: 40px; padding-bottom: 60px; }

/* Header */
header { height: var(--header-height); display: flex; align-items: center; position: sticky; top: 0; z-index: 100; transition: background var(--transition-speed); }
.header-content { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 20px; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text-primary); }
.accent { color: var(--accent-color); }

nav ul { display: flex; gap: 20px; list-style: none; padding: 0; margin: 0; }
.nav-link { color: var(--text-secondary); position: relative; padding: 5px 0; transition: color var(--transition-speed); cursor: pointer; }
.nav-link:hover { color: var(--text-primary); text-decoration: none; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background-color: var(--accent-color); transition: width var(--transition-speed); }
.nav-link:hover::after { width: 100%; }

/* Footer */
footer { display: flex; align-items: center; }
.footer-content { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 25px; padding: 15px; }
.footer-left, .footer-right { display: flex; flex-direction: column; }
.copyright { color: var(--text-secondary); font-size: 0.85rem; margin-top: 8px; margin-bottom: 0; }

/* Hero Section */
.hero { text-align: center; margin-bottom: 50px; padding: 30px 20px; }
.hero h1 { font-size: 2.8rem; margin-bottom: 16px; color: var(--text-primary); }
.hero h1 .accent { color: var(--accent-color); }
.subtitle { color: var(--text-secondary); font-size: 1.1rem; max-width: 560px; margin: 0 auto; line-height: 1.5; }

/* Section Titles */
.section-title { font-size: 1.5rem; font-weight: 600; margin: 40px 0 24px; position: relative; display: inline-block; color: var(--text-primary); }
.section-title::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 32px; height: 1px; background: var(--accent-color); }

/* Featured Article */
.featured-article-wrapper { margin-bottom: 60px; max-width: 1200px; margin-left: auto; margin-right: auto; padding: 0 20px; }

.featured-article { display: block; position: relative; height: 100%; }
.featured-article:hover { text-decoration: none; }

.featured-article article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  background: rgba(29, 29, 27, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color var(--transition-speed);
  height: 100%;
}

.featured-article:hover article { border-color: rgba(241, 182, 31, 0.25); }

.featured-content { display: flex; flex-direction: column; justify-content: center; padding: 28px; }

.featured-content h2 { font-size: 1.7rem; margin-bottom: 12px; color: var(--text-primary); line-height: 1.3; }
.featured-content h2::after { display: none; }

.featured-content .text { font-size: 1rem; margin-bottom: 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-secondary); }

.featured-article .author-info { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 10px; }

.featured-article .author-info .avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(241, 182, 31, 0.25); overflow: hidden; }

.featured-article .read-more { margin-top: 20px; font-weight: 500; font-size: 0.9rem; display: inline-flex; align-items: center; color: var(--accent-color); transition: color var(--transition-speed); }

.featured-article:hover .read-more { color: var(--text-primary); }

.featured-article .arrow { margin-left: 8px; transition: transform var(--transition-speed); }
.featured-article:hover .arrow { transform: translateX(4px); }

.featured-article .featured-image { position: relative; overflow: hidden; height: 100%; }

.featured-article .featured-image > div { margin: 16px; height: calc(100% - 32px); width: calc(100% - 32px); overflow: hidden; position: relative; border-radius: 4px; }
.featured-article .featured-image > div > div { width: 100%; height: 100%; position: relative; display: flex; }
.featured-article .featured-image img { object-fit: cover; width: 100%; height: 100%; object-position: center; display: inline; }

@media (min-width: 768px) {
  .featured-article article { backdrop-filter: blur(var(--blur-strength)); -webkit-backdrop-filter: blur(var(--blur-strength)); }
}

@media (min-width: 768px) {
  .featured-article article { grid-template-columns: 1fr 1fr; height: 360px; }
  .featured-article .featured-content { overflow: hidden; max-width: 500px; padding: 24px; }
  .featured-content h2 { font-size: 2rem; margin-bottom: 16px; }
  .featured-article .featured-image { grid-row: 1; grid-column: 2; }
}

/* Articles Grid */
.articles-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 50px; }

@media (min-width: 768px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }

.article-link { display: block; height: 100%; border-radius: 6px; }
.article-link:hover { text-decoration: none; }

.articles-grid article {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(29, 29, 27, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color var(--transition-speed);
}

@media (min-width: 768px) {
  .articles-grid article { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
}

.article-link:hover article { border-color: rgba(241, 182, 31, 0.2); }

.articles-grid .image { overflow: hidden; position: relative; }
.articles-grid .image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.articles-grid article .content { display: flex; flex-direction: column; flex: 1; padding: 20px; position: relative; }

.articles-grid h2 { font-size: 1.25rem; margin-bottom: 8px; line-height: 1.4; transition: color var(--transition-speed); }
.article-link:hover h2 { color: var(--accent-color); }

.articles-grid .text { font-size: 0.9rem; margin-bottom: 12px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.articles-grid .author-info { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-subtle); font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; }

.author-info .avatar { overflow: hidden; }
.author-info .avatar img { width: 100%; height: 100%; object-fit: cover; }
.articles-grid .author-info .avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(241, 182, 31, 0.25); }

.articles-grid .read-more { margin-top: 16px; font-weight: 500; font-size: 0.85rem; display: inline-flex; align-items: center; color: var(--accent-color); transition: color var(--transition-speed); }
.article-link:hover .read-more { color: var(--text-primary); }

.articles-grid .arrow { margin-left: 4px; transition: transform var(--transition-speed); }
.article-link:hover .arrow { transform: translateX(3px); }

/* Article Detail */
.article-detail { max-width: 800px; margin: 0 auto; }

.article-detail h1 { font-size: 2.4rem; margin-bottom: 16px; color: var(--text-primary); }
.article-detail h1::after { display: none; }

.article-detail .author-info { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: var(--text-secondary); }

.article-detail .author-info .avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(241, 182, 31, 0.25); overflow: hidden; }

.article-detail .featured-image { margin: 24px 0 0 0; border-radius: 6px; overflow: hidden; position: relative; border: 1px solid var(--border-subtle); }

.article-detail .featured-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

.article-content { margin: 32px 0; position: relative; --side-padding: 20px; padding-top: 24px; background: rgba(255, 255, 255, 0.01); backdrop-filter: blur(var(--blur-strength)); -webkit-backdrop-filter: blur(var(--blur-strength)); padding-bottom: 24px; border-radius: 0 0 6px 6px; border: 1px solid var(--border-subtle); border-top: none; }

@media (max-width: 800px) { .article-content { --side-padding: 10px; } }

.article-content .text > *:not(pre) { padding-left: var(--side-padding); padding-right: var(--side-padding); }
.article-content .text pre { margin-bottom: 20px; }
.article-content .text :is(ul, ol) { margin-left: 40px; }
.article-content h2 { margin-bottom: 16px; margin-top: 32px; }
.article-content h2::after { left: var(--side-padding); }

.article-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag { display: inline-block; padding: 5px 10px; background: rgba(255, 255, 255, 0.04); border-radius: 4px; font-size: 0.8rem; color: var(--text-secondary); transition: color var(--transition-speed), border-color var(--transition-speed); border: 1px solid var(--border-subtle); }
.tag:hover { color: var(--accent-color); border-color: rgba(241, 182, 31, 0.2); }

.share { display: flex; align-items: center; gap: 12px; }
.share span { color: var(--text-secondary); }

.share-link { color: var(--text-secondary); font-size: 0.9rem; position: relative; padding: 5px 0; cursor: pointer; }
.share-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: var(--accent-color); transform: scaleX(0); transform-origin: right; transition: transform var(--transition-speed); }
.share-link:hover { color: var(--accent-color); }
.share-link:hover::after { transform: scaleX(1); transform-origin: left; }

.back-to-home { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }

.btn { display: inline-block; padding: 10px 18px; background: rgba(241, 182, 31, 0.08); color: var(--accent-color); border: 1px solid rgba(241, 182, 31, 0.25); border-radius: 4px; font-weight: 500; transition: background var(--transition-speed), border-color var(--transition-speed); cursor: pointer; }
.btn:hover { background: rgba(241, 182, 31, 0.15); border-color: rgba(241, 182, 31, 0.4); color: var(--accent-color); text-decoration: none; }

.featured-image { border-radius: 6px; overflow: hidden; position: relative; }
.featured-image img { width: 100%; height: auto; display: block; }

@media (max-width: 800px) {
  .featured-article-wrapper { padding: 0; }
  .featured-content { padding: 16px; }
  .featured-article .featured-image > div, .ArticlesList .image > div { width: 100%; height: 100%; margin: 0; border-radius: 0; }
  .featured-article .featured-image > div > div, .ArticlesList .image > div > div { position: static; width: 100%; height: 100%; }
  .article-detail { padding: 0; }
  .article-detail h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.2rem; }
}
/* Performance optimizations */

@media screen and (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  article:hover { transform: none !important; }
  article:hover .image img { transform: none !important; }
}

html.reduced-motion * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }

.critical-performance-mode * { animation: none !important; transition: none !important; transform: none !important; filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }

@media screen and (max-width: 767px) {
  :root { --blur-strength: 0px; }
  header, footer, article, .container { backdrop-filter: none !important; }
  h2::after { transition: none !important; }
}
.articles-grid article {display: flex; gap: 20px;}
.ArticlesList article > * {flex: 1;}

.ArticlesList .Image {max-width: 300px;}
.ArticlesList .Image img {max-width: 100%; height: auto;}
.ArticlesList h2 {margin-top: 0;}

.Article .Image img {max-width: 100%; height: auto;}

@media (max-width: 900px) {
	.ArticlesList article {display: block; margin-bottom: 65px;}
	.ArticlesList article .Image {margin-bottom: 15px; max-width: none;}
}