/* =================================================================== 
 *
 *  Modern Clean Theme
 *  Clean Design System with Light/Dark Theme
 *  Inspired by Tailwind/shadcn design principles
 *
 * =================================================================== */

/* ===================================================================
 * # CSS Custom Properties for Clean Theme System
 * ------------------------------------------------------------------- */
:root {
    /* Light theme colors using HSL values */
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(0, 0%, 3.9%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(0, 0%, 3.9%);
    --popover: hsl(0, 0%, 100%);
    --popover-foreground: hsl(0, 0%, 3.9%);
    --primary: hsl(0, 0%, 9%);
    --primary-foreground: hsl(0, 0%, 98%);
    --secondary: hsl(0, 0%, 96.1%);
    --secondary-foreground: hsl(0, 0%, 9%);
    --muted: hsl(0, 0%, 96.1%);
    --muted-foreground: hsl(0, 0%, 45.1%);
    --accent: hsl(0, 0%, 96.1%);
    --accent-foreground: hsl(0, 0%, 9%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --border: hsl(0, 0%, 89.8%);
    --input: hsl(0, 0%, 89.8%);
    --ring: hsl(0, 0%, 3.9%);
    --radius: 0.5rem;

    /* Additional theme variables */
    --glass-bg: hsla(0, 0%, 100%, 0.8);
    --glass-border: hsla(0, 0%, 89.8%, 0.5);
    --shadow-color: hsla(0, 0%, 0%, 0.1);
}

[data-theme="dark"], .dark {
    --background: hsl(0, 0%, 3.9%);
    --foreground: hsl(0, 0%, 98%);
    --card: hsl(0, 0%, 3.9%);
    --card-foreground: hsl(0, 0%, 98%);
    --popover: hsl(0, 0%, 3.9%);
    --popover-foreground: hsl(0, 0%, 98%);
    --primary: hsl(0, 0%, 98%);
    --primary-foreground: hsl(0, 0%, 9%);
    --secondary: hsl(0, 0%, 14.9%);
    --secondary-foreground: hsl(0, 0%, 98%);
    --muted: hsl(0, 0%, 14.9%);
    --muted-foreground: hsl(0, 0%, 63.9%);
    --accent: hsl(0, 0%, 14.9%);
    --accent-foreground: hsl(0, 0%, 98%);
    --destructive: hsl(0, 62.8%, 30.6%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --border: hsl(0, 0%, 14.9%);
    --input: hsl(0, 0%, 14.9%);
    --ring: hsl(0, 0%, 83.1%);

    /* Additional dark theme variables */
    --glass-bg: hsla(0, 0%, 3.9%, 0.8);
    --glass-border: hsla(0, 0%, 14.9%, 0.5);
    --shadow-color: hsla(0, 0%, 0%, 0.5);
}

/* Smooth transitions for theme switching */
.theme-transition,
.theme-transition *,
.theme-transition *:before,
.theme-transition *:after {
    transition: all 300ms !important;
    transition-delay: 0 !important;
}

/* ===================================================================
 * # Font Awesome Icons
 * ------------------------------------------------------------------- */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ===================================================================
 * # Base Styles
 * ------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    border-color: var(--border);
}

html {
    font-size: 10px;
    scroll-behavior: smooth;
}

@media screen and (max-width: 400px) {
    html {
        font-size: 9.2px;
    }
}

html, body {
    height: 100%;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 60px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--background),
        hsla(240, 100%, 50%, 0.4)
    );
    background-size: 100% 100%;
    animation: rotateGradient 60s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateGradient {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    50% {
        background-position: 0% 50%;
        filter: hue-rotate(60deg);
    }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

/* Ensure cursor is visible on all interactive elements */
input, textarea, select, button, a, [role="button"] {
    cursor: pointer !important;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
    cursor: text !important;
}

/* Fix general cursor visibility */
* {
    cursor: inherit;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 2);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px var(--shadow-color),
        0 0 0 1px hsla(210, 100%, 60%, 0.1);
    color: var(--foreground);
    backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        hsla(210, 100%, 60%, 0.1), 
        hsla(280, 100%, 60%, 0.1)
    );
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover::before {
    opacity: 1;
}

.theme-toggle:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 20px var(--shadow-color),
        0 0 0 1px hsla(210, 100%, 60%, 0.3),
        0 0 20px hsla(210, 100%, 60%, 0.2);
    border-color: hsla(210, 100%, 60%, 0.4);
}

.theme-toggle i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.theme-toggle:hover i {
    transform: rotate(180deg) scale(1.1);
    filter: drop-shadow(0 0 8px hsla(210, 100%, 60%, 0.6));
}

.theme-toggle:active {
    transform: translateY(-1px) scale(1.02);
    transition-duration: 0.1s;
}

@media screen and (max-width: 1100px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
        bottom: auto;
    }
}

@media screen and (max-width: 768px) {
    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }
}

/* ===================================================================
 * # Typography
 * ------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.2;
    margin: 0 0 1.6rem 0;
}

h1 { font-size: 4.8rem; font-weight: 700; }
h2 { font-size: 3.6rem; font-weight: 600; }
h3 { font-size: 2.8rem; }
h4 { font-size: 2.4rem; }
h5 { font-size: 2rem; }
h6 { font-size: 1.8rem; }

@media screen and (max-width: 600px) {
    h1 { font-size: 3.6rem; }
    h2 { font-size: 2.8rem; }
    h3 { font-size: 2.4rem; }
}

p {
    margin-bottom: 2.4rem;
    color: var(--muted-foreground);
}

/* Links with clean hover effect */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--muted-foreground);
    text-decoration: underline;
}

/* ===================================================================
 * # Modern Card System
 * ------------------------------------------------------------------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.card:hover {
    box-shadow: 0 4px 12px var(--shadow-color);
    transform: translateY(-2px);
}

/* ===================================================================
 * # Navigation & Header
 * ------------------------------------------------------------------- */
.s-header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header__logo {
    margin-bottom: 4rem;
}

.header__logo a {
    display: block;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--foreground);
    text-decoration: none;
}

.header__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__nav li {
    margin-bottom: 0.8rem;
}

.header__nav a {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.6rem;
    color: var(--muted-foreground);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header__nav a:hover,
.header__nav a.current {
    color: var(--foreground);
    background: var(--accent);
}

/* ===================================================================
 * # Main Content
 * ------------------------------------------------------------------- */
.s-content {
    margin-left: 0;
    padding: 2rem 2rem 4rem;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: transparent;
    padding: 8rem 2rem;
    text-align: center;
    margin: 0 0 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, hsla(210, 100%, 60%, 0.1), transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 3rem auto;
    overflow: hidden;
    border: 4px solid hsla(210, 100%, 60%, 0.3);
    box-shadow: 0 0 40px hsla(210, 100%, 60%, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px hsla(210, 100%, 60%, 0.5);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-title {
    font-size: 4.8rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 2rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.8rem;
    color: var(--muted-foreground);
    margin-bottom: 3rem;
    line-height: 1.5;
}

.hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, hsl(280, 100%, 60%), hsl(210, 100%, 60%));
    color: #ffffff;
    padding: 1.5rem 3rem;
    border-radius: calc(var(--radius) * 2);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px hsla(210, 100%, 60%, 0.3);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px hsla(210, 100%, 60%, 0.4);
    color: #ffffff;
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    .hero-section {
        padding: 6rem 1.5rem;
    }

    .hero-avatar {
        width: 150px;
        height: 150px;
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 3.6rem;
    }

    .hero-description {
        font-size: 1.6rem;
    }

    .hero-cta {
        padding: 1.2rem 2.4rem;
        font-size: 1.4rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .hero-description {
        font-size: 1.4rem;
    }
}

/* Neon Divider */
.neon-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6rem auto;
    padding: 0 2rem;
    position: relative;
}

.neon-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        hsla(210, 100%, 60%, 0.3) 15%, 
        hsla(280, 100%, 60%, 0.8) 35%,
        hsl(210, 100%, 60%) 50%,
        hsla(280, 100%, 60%, 0.8) 65%,
        hsla(210, 100%, 60%, 0.3) 85%, 
        transparent 100%
    );
    position: relative;
    border-radius: 1px;
    animation: neonPulse 3s ease-in-out infinite;
    box-shadow: 
        0 0 10px hsla(210, 100%, 60%, 0.5),
        0 0 20px hsla(210, 100%, 60%, 0.3),
        0 0 30px hsla(280, 100%, 60%, 0.2);
}

.neon-line::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        hsla(210, 100%, 60%, 0.1) 15%, 
        hsla(280, 100%, 60%, 0.3) 35%,
        hsla(210, 100%, 60%, 0.4) 50%,
        hsla(280, 100%, 60%, 0.3) 65%,
        hsla(210, 100%, 60%, 0.1) 85%, 
        transparent 100%
    );
    border-radius: 3px;
    filter: blur(2px);
    animation: neonGlow 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        opacity: 0.8;
        transform: scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.02);
    }
}

@keyframes neonGlow {
    0%, 100% {
        opacity: 0.6;
        filter: blur(2px);
    }
    50% {
        opacity: 1;
        filter: blur(3px);
    }
}

@media screen and (max-width: 768px) {
    .neon-divider {
        margin: 4rem auto;
        padding: 0 1.5rem;
    }

    .neon-line {
        height: 1.5px;
    }

    .neon-line::before {
        height: 4px;
        top: -1.5px;
    }
}

/* Enhanced Filter Container */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 0 auto 4rem auto;
    padding: 0 1rem;
    max-width: 1200px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--foreground);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-dropdown, .search-input {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 2rem;
    font-size: 1.4rem;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.filter-dropdown {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3.5rem;
}

.search-input {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'%3e%3c/circle%3e%3cpath d='m21 21-4.35-4.35'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3.5rem;
    cursor: text;
}

.search-input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.7;
}

.clear-filters-btn {
    background: linear-gradient(135deg, hsl(280, 100%, 60%), hsl(210, 100%, 60%));
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    padding: 1.2rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px hsla(210, 100%, 60%, 0.3);
    align-self: flex-end;
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px hsla(210, 100%, 60%, 0.4);
    background: linear-gradient(135deg, hsl(280, 100%, 55%), hsl(210, 100%, 55%));
}

.filter-dropdown:hover {
    box-shadow: 0 4px 16px var(--shadow-color);
    background: transparent;
}

.filter-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px hsla(210, 100%, 60%, 0.2);
}

.filter-dropdown option {
    background: var(--card);
    color: var(--foreground);
    padding: 1rem 1.4rem; /* Reduced padding */
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2rem; /* Reduced font size */
}

.filter-dropdown option:hover,
.filter-dropdown option:focus {
    background: var(--accent);
    color: var(--accent-foreground);
}

@media screen and (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-dropdown, .search-input {
        min-width: 100%;
    }
    
    .clear-filters-btn {
        align-self: stretch;
        margin-top: 1rem;
    }
}

@media screen and (max-width: 600px) {
    .filter-dropdown, .search-input {
        font-size: 1.3rem;
        padding: 1rem 1.5rem;
        padding-right: 3rem;
    }
    
    .filter-label {
        font-size: 1.1rem;
    }
}

/* Project Grid - Equal Height Rows */
.masonry {
    display: grid;
    gap: 2rem;
    margin: 4rem 0;
    padding: 0 1rem;
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    align-items: stretch;
}

@media screen and (max-width: 600px) {
    .masonry {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin: 2rem 0 !important;
        padding: 0 0.5rem !important;
    }
}

@media screen and (min-width: 601px) and (max-width: 767px) {
    .masonry {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {
    .masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media screen and (min-width: 1200px) {
    .masonry {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.masonry .entry {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-main-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.entry__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 2.4rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.entry__excerpt {
    margin-top: auto;
}



/* External Link Button (for home page cards) */
.external-link-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 10;
    background: linear-gradient(135deg, hsl(210, 100%, 60%), hsl(280, 100%, 60%));
    color: #ffffff !important;
    padding: 0.6rem 1.2rem;
    border-radius: calc(var(--radius) * 1.5);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px hsla(210, 100%, 60%, 0.3);
    border: 1px solid hsla(210, 100%, 60%, 0.4);
}

.external-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px hsla(210, 100%, 60%), 0.5);
    background: linear-gradient(135deg, hsl(210, 100%, 55%), hsl(280, 100%, 55%));
    color: #ffffff !important;
    text-decoration: none !important;
}

.external-link-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px hsla(210, 100%, 60%, 0.3);
}

/* External Link Button (overlay on page images) */
.entry__post-thumb {
    position: relative;
    overflow: hidden;
}

.external-link-btn-image {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    background: linear-gradient(135deg, hsl(210, 100%, 60%), hsl(280, 100%, 60%));
    color: #ffffff !important;
    padding: 0.8rem 1.6rem;
    border-radius: calc(var(--radius) * 1.5);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px hsla(210, 100%, 60%, 0.4);
    border: 2px solid hsla(210, 100%, 60%, 0.6);
    backdrop-filter: blur(10px);
    opacity: 0.9;
}

.external-link-btn-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px hsla(210, 100%, 60%, 0.6);
    background: linear-gradient(135deg, hsl(210, 100%, 55%), hsl(280, 100%, 55%));
    color: #ffffff !important;
    text-decoration: none !important;
    border-color: hsla(210, 100%, 60%, 0.8);
    opacity: 1;
}

.external-link-btn-image:focus {
    outline: none;
    box-shadow: 0 0 0 3px hsla(210, 100%, 60%, 0.3);
}

@media screen and (max-width: 768px) {
    .external-link-btn-image {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 1.1rem;
        letter-spacing: 0.4px;
    }
}

@media screen and (max-width: 480px) {
    .external-link-btn-image {
        top: 0.8rem;
        right: 0.8rem;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        letter-spacing: 0.3px;
    }
}

.masonry .entry:hover {
    transform: translateY(-8px);
    border-color: hsla(210, 100%, 60%, 0.6);
}

.entry__thumb {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.entry__thumb {
    aspect-ratio: 16/10;
    height: 240px;
    width: 100%;
}

.entry__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.masonry .entry:hover .entry__thumb img {
    transform: scale(1.15);
}

.entry__thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, hsla(210, 100%, 60%, 0.1), hsla(280, 100%, 60%, 0.1));
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.masonry .entry:hover .entry__thumb::after {
    opacity: 1;
}

.entry__text {
    padding: 2.4rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.masonry .entry:hover .entry__text {
    background: linear-gradient(135deg, hsla(210, 100%, 60%, 0.02), hsla(280, 100%, 60%, 0.02));
}

.masonry .entry:hover .entry__title {
    color: hsla(210, 100%, 60%, 0.9);
    text-shadow: 0 0 10px hsla(210, 100%, 60%, 0.3);
}

.entry__title {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    color: var(--foreground);
}

.entry__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
    transform: translateZ(0); /* Force GPU layer to prevent movement */
}

.entry__tag {
    display: inline-block;
    background: hsla(210, 100%, 60%, 0.1);
    color: hsl(210, 100%, 60%);
    padding: 0.4rem 1rem;
    border-radius: calc(var(--radius) * 1.5);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid hsla(210,100%, 60%, 0.3);
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0); /* Prevent individual tag movement */
}

.masonry .entry:hover .entry__tag {
    background: hsla(210, 100%, 60%, 0.2);
    border-color: hsla(210, 100%, 60%, 0.5);
    color: hsl(210, 100%, 50%);
}

/* Filter Feedback */
.filter-feedback {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.filter-feedback p {
    color: var(--muted-foreground);
    font-size: 1.6rem;
    margin: 0;
}

/* CSS-only animations for masonry cards */
.masonry__brick.entry {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered animation delays for natural entrance */
.masonry__brick.entry:nth-child(1) { animation-delay: 0.1s; }
.masonry__brick.entry:nth-child(2) { animation-delay: 0.2s; }
.masonry__brick.entry:nth-child(3) { animation-delay: 0.3s; }
.masonry__brick.entry:nth-child(4) { animation-delay: 0.4s; }
.masonry__brick.entry:nth-child(5) { animation-delay: 0.5s; }
.masonry__brick.entry:nth-child(6) { animation-delay: 0.6s; }
.masonry__brick.entry:nth-child(7) { animation-delay: 0.7s; }
.masonry__brick.entry:nth-child(8) { animation-delay: 0.8s; }
.masonry__brick.entry:nth-child(9) { animation-delay: 0.9s; }
.masonry__brick.entry:nth-child(n+10) { animation-delay: 1s; }

/* Disable transitions during resize to prevent conflicts */
.masonry.resizing .entry,
.masonry.resizing .entry * {
    transition: none !important;
    animation: none !important;
}

/* Enhanced fade-in animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===================================================================
 * # Buttons
 * ------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    background: var(--primary);
    color: var(--primary-foreground);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--muted);
    color: var(--muted-foreground);
    transform: translateY(-1px);
}

/* ===================================================================
 * # Footer
 * ------------------------------------------------------------------- */
.s-footer {
    margin-left: 0;
    padding: 2rem;
    text-align: center;
    color: var(--muted-foreground);
    background: var(--background);
    border-top: 1px solid var(--border);
}

/* ===================================================================
 * # Responsive Design
 * ------------------------------------------------------------------- */
@media screen and (max-width: 1100px) {
    .s-content,
    .s-footer {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    body {
        padding-top: 60px;
    }
}

@media screen and (max-width: 600px) {
    body {
        padding-top: 60px;
    }

    .s-content {
        padding: 1.6rem;
    }

    h1 { font-size: 3.2rem; }
    h2 { font-size: 2.4rem; }
}

/* ===================================================================
 * # Animations & Effects
 * ------------------------------------------------------------------- */
.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Hover animation for cards */
@keyframes cardHover {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 2px 4px var(--shadow-color);
    }
    100% {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 
            0 20px 40px var(--shadow-color),
            0 0 0 1px hsla(210, 100%, 60%, 0.3),
            0 0 20px hsla(210, 100%, 60%, 0.2);
    }
}

/* Smooth scroll animation */
@keyframes smoothScroll {
    0% { transform: translateY(10px); opacity: 0.8; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Page load animation */
body.ss-loaded .masonry .entry {
    animation-play-state: running;
}

body.ss-preload .masonry .entry {
    animation-play-state: paused;
}

/* Gradient HR Styling */
hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        hsla(210, 100%, 60%, 0.3) 10%, 
        hsla(280, 100%, 60%, 0.8) 25%,
        hsl(210, 100%, 60%) 40%,
        hsl(280, 100%, 60%) 50%,
        hsl(210, 100%, 60%) 60%,
        hsla(280, 100%, 60%, 0.8) 75%,
        hsla(210, 100%, 60%, 0.3) 90%, 
        transparent 100%
    );
    border-radius: 2px;
    margin: 4rem 0;
    width: 100%;
}

@media screen and (max-width: 768px) {
    hr {
        height: 2px;
        margin: 3rem 0;
    }

    hr::before {
        height: 6px;
        top: -2px;
    }
}

/* Page Title Styling */
.display-1.entry__title {
    text-align: center;
    font-size: 5.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, 
        hsl(210, 100%, 60%), 
        hsl(280, 100%, 60%), 
        hsl(210, 100%, 60%)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 2rem auto 3rem auto;
    position: relative;
    display: block;
    line-height: 1.1;
}

.content__page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.entry__header-meta {
    text-align: center;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.entry__header-meta li {
    color: var(--muted-foreground);
    font-size: 1.4rem;
}

.entry__header-meta a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry__header-meta a:hover {
    color: hsl(210, 100%, 60%);
}



@media screen and (max-width: 768px) {
    .display-1.entry__title {
        font-size: 4.2rem;
        margin: 3rem auto;
    }
}

@media screen and (max-width: 480px) {
    .display-1.entry__title {
        font-size: 3.2rem;
        margin: 2rem auto;
    }
}

/* Page Content Images - Rounded corners and zoom effect */
.s-content img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.s-content img:hover {
    transform: scale(1.05);
}

/* Ensure images scale within their container */
.s-content p, 
.s-content div {
    overflow: hidden;
}

.s-content p img,
.s-content div img {
    display: block;
    max-width: 100%;
}

/* Exclude cover images and avatar from the effect */
.entry__post-thumb img,
.hero-avatar img {
    border-radius: var(--radius);
}

.entry__post-thumb img:hover,
.hero-avatar img:hover {
    transform: scale(1.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--foreground);
}

/* Loading states */
body.loading * {
    transition: none !important;
}

/* Selection styling */
::selection {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* Text cursor styling */
input, textarea {
    caret-color: var(--primary);
}

/* Print styles */
@media print {
    .theme-toggle,
    .s-header {
        display: none;
    }

    .s-content {
        margin-left: 0;
        padding: 2rem;
    }
}

.card-main-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.card-main-link:hover {
    text-decoration: none;
    color: inherit;
}

.read-more-text {
    color: hsl(210, 100%, 60%);
    font-weight: 500;
}

.entry__thumb .entry__meta {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--foreground);
    padding: 0.6rem 1.4rem;
    border-radius: calc(var(--radius) * 2);
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
    transform: translateY(0);
}

.entry__thumb:hover .entry__meta {
    opacity: 1;
    transform: translateY(-2px);
    background: var(--card);
    border-color: var(--accent);
}

.entry__thumb .entry__meta span {
    color: var(--foreground);
    transition: color 0.3s ease;
}
.entry__post-thumb {
    text-align: -webkit-center;
}