:root {
    --color-bg: #000;
    --color-text: #e4e4e4;
    --color-accent: #ffd700;
    --color-accent-secondary: #daa520;
    --font-body: "MedievalSharp", normal;
    --font-code: "Fira Code", monospace;
    --font-heading: "Cinzel Decorative", serif;
}

/* Reset */
html,
body {
    margin: 0;
    padding-top: 26px;
    overflow-x: hidden;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* ---------- Topbar ---------- */
.topbar-border {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #222;
    border-bottom: 2px solid var(--color-accent);
    z-index: 1000;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 50px;
    max-width: 800px;
    /* your limit */
    margin: 0 auto;
    /* center horizontally */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-accent);
    letter-spacing: 2px;
    border-bottom: none !important;
}

.home-link {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* Desktop nav */
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--color-accent);
}

/* Hamburger hidden on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--color-accent);
    cursor: pointer;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        right: 0;
        width: 120px;
        background: #222;
        border-left: 2px solid var(--color-accent);
        border-bottom: 2px solid var(--color-accent);
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ---------- Headings ---------- */
h1,
h2 {
    font-family: var(--font-heading);
    color: var(--color-accent);
}

h1 {
    margin-bottom: 0.2rem;
}

h3 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.2rem;
    letter-spacing: 1px;
    opacity: 0.85;
}

.s-title {
    margin-top: 0;
    margin-bottom: 2rem;
}

/* ---------- Container ---------- */
.container {
    max-width: 800px;
    margin: auto;
    padding: 2rem;
}

/* ---------- Gif frame ---------- */
.gif-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.gif-frame img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- Code style ---------- */
.keyword-style {
    background-color: #111;
    color: var(--color-accent);
    padding: 2px 6px;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    font-family: var(--font-code);
}

/* ---------- Links ---------- */
a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-accent-secondary);
    transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
    color: var(--color-accent-secondary);
    border-bottom-color: transparent;
}

/* ---------- Quotes ---------- */
q {
    font-style: italic;
    color: var(--color-accent);
    quotes: "“" "”" "‘" "’";
    position: relative;
}

q::before {
    content: open-quote;
    font-size: 1.2em;
    color: var(--color-accent-secondary);
    margin-right: 2px;
}

q::after {
    content: close-quote;
    font-size: 1.2em;
    color: var(--color-accent-secondary);
    margin-left: 2px;
}


/* ----------Lists ---------- */
.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li {
    display: flex;
    align-items: center;
}

.icon {
    width: 20px;
    height: 20px;
    margin-right: 0.6rem;
    margin-bottom: 0.6rem;
    vertical-align: middle;
}

/* ---------- Blogs ---------- */
.coming-soon {
    text-align: center;
    font-style: italic;
    opacity: 0.8;
    margin-top: 1rem;
}

/* ---------- Contact Icons ---------- */
.contact-icons {
    display: flex;
    justify-content: left;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-icons a img {
    width: 40px;
    /* adjust size here */
    height: 40px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.contact-icons a img:hover {
    transform: scale(1.15);
    opacity: 0.85;
}

.contact-icons a {
    border-bottom: none;
}

/* ---------- Footer ---------- */
.footer {
    font-size: smaller;
    color: var(--color-text);
    text-align: center;
    border-top: 2px solid var(--color-accent);
    padding: 0 2rem;
}

.footer span {
    color: var(--color-accent);
}

/* ---------- Emoji style ---------- */
.emoji {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
    /* aligns nicely with text */
    display: inline-block;
}

/* ---------- Magic title (shimmer + halo + float) ---------- */
.magic-title {
    position: relative;
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-accent);
    /* fallback for non-supporting browsers */
    /* animated gradient fill */
    background: linear-gradient(90deg,
            var(--color-accent) 15%,
            var(--color-accent-secondary) 50%,
            var(--color-accent) 85%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: magic-shimmer 4s linear infinite, magic-float 6s ease-in-out infinite;
    /* keep text readable above halo */
    z-index: 1;
    padding: 0 0.1rem;
}

/* soft glow / halo behind text using pseudo-element */
.magic-title::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 2.2rem);
    height: calc(100% + 1.0rem);
    border-radius: 10px;
    pointer-events: none;
    z-index: 0;
    filter: blur(16px);
    opacity: 0.35;
    background: radial-gradient(circle at 30% 30%,
            rgba(197, 156, 107, 0.35) 0%,
            rgba(77, 166, 255, 0.20) 35%,
            transparent 60%);
    animation: magic-halo 5s ease-in-out infinite;
}

/* subtle smaller glow pulse on a second pseudo-element for depth */
.magic-title::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 0.6rem);
    height: calc(100% + 0.2rem);
    border-radius: 6px;
    pointer-events: none;
    z-index: 0;
    filter: blur(6px);
    opacity: 0.25;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), transparent 40%);
    animation: magic-halo-2 3.6s ease-in-out infinite;
}

/* Keyframes */
@keyframes magic-shimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes magic-float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes magic-halo {
    0% {
        transform: translate(-50%, -50%) scale(0.98);
        opacity: 0.32;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.06);
        opacity: 0.45;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.98);
        opacity: 0.32;
    }
}

@keyframes magic-halo-2 {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.18;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 0.28;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.18;
    }
}

/* Slightly slower or smaller for h2 to keep hierarchy */
h2.magic-title {
    animation-duration: 5s, 7s;
    /* shimmer, float durations */
}

/* Accessibility: respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .magic-title,
    .magic-title::before,
    .magic-title::after {
        animation: none !important;
        transform: none !important;
    }

    .magic-title {
        color: var(--color-accent);
        /* fallback solid color */
        -webkit-background-clip: unset;
        background-clip: unset;
    }
}

body {
    background: #000;
    background-image:
        radial-gradient(circle, rgba(255, 215, 0, 0.15) 1px, transparent 1px),
        radial-gradient(circle, rgba(218, 165, 32, 0.15) 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px;
    animation: stardust 30s linear infinite;
}

@keyframes stardust {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 200px 400px, -300px 600px;
    }
}

/* Prism.js code block styling */
.code-container {
    max-width: 900px;
    margin: 2rem auto;
    border-radius: 12px;
    padding: 1rem;
}

pre {
    margin: 0;
    overflow-x: auto;
    border-radius: 8px;
    background: #111111a0 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Scrollbar for Webkit browsers (Chrome, Edge, Safari) */
pre::-webkit-scrollbar {
    height: 10px;
    /* horizontal scrollbar height */
}

pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    /* subtle track */
    border-radius: 8px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    /* your royal yellow */
    border-radius: 8px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #ffd633;
    /* brighter yellow on hover */
}

/* Firefox scrollbar */
pre {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) rgba(255, 255, 255, 0.05);
}

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem auto;
    padding: 1rem;
    max-width: 800px;
}

.blog-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.blog-nav a:hover {
    color: var(--color-accent-secondary);
}

/* Stack vertically on small screens */
@media (max-width: 700px) {
    .blog-nav {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Blog Grid */
.blogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
}

.blog-link {
    text-decoration: none;
    color: inherit;
}

.blog-card {
    background: #111;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-bottom: none !important;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Title, subtitle, date */
.blog-title {
    margin: 0 0 0.3rem;
    font-size: 1.2rem;
    color: var(--color-accent);
}

.blog-subtitle {
    font-size: 0.9rem;
    color: var(--color-text);
    margin: 0 0 0.5rem;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--color-text);
    margin-bottom: 0.8rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.blog-tag {
    background: var(--color-text);
    color: #000;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.show-more {
    border: none;
    background: transparent;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

.show-more:hover {
    text-decoration: underline;
}

/* Show all blogs button */
.show-all {
    text-align: center;
    margin-top: 2rem;
}

.show-all .btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--color-accent);
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.show-all .btn:hover {
    background: var(--color-secondary);
    color: #fff;
}

/* ---------- Responsive Tables ---------- */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
}

/* WebKit browsers (Chrome, Edge, Safari) */
.table-container::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-button {
    display: none;
    /* hides left/right scroll buttons */
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    border-bottom: 2px solid #ccc;
    font-size: 0.95rem;
    min-width: 400px;
}

.responsive-table th,
.responsive-table td {
    text-align: left;
    padding: 0.75em 1em;
    white-space: nowrap;
    border-left: none;
    border-right: none;
}

.responsive-table th {
    font-weight: 600;
    border-bottom: 2px solid #ccc;
}

.responsive-table tr:not(:last-child) td {
    border-bottom: 1px solid #e0e0e0;
}
