/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background-color: var(--background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: slideDown 0.5s ease-out;
}

.navbar.scrolled {
    background-color: color-mix(in srgb, var(--background) 95%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .navbar-container {
        padding: 0 1.5rem;
    }
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--foreground);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-logo::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-logo:hover {
    transform: translateY(-2px);
    color: var(--primary);
}

.navbar-logo:hover::before {
    width: 100%;
}

.navbar-logo-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    transition: all 0.3s ease;
    animation: iconFloat 0.5s ease-out;
    display: inline-block;
}

.navbar-logo:hover .navbar-logo-icon {
    transform: rotate(15deg) scale(1.2);
    color: var(--accent);
    text-shadow: 0 0 10px var(--primary);
}

.navbar-logo-text {
    font-size: 1.125rem;
    font-weight: 500;
    animation: slideIn 0.4s ease-out 0.1s both;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-logo:hover .navbar-logo-text {
    transform: scale(1.05);
    text-shadow: 0 0 8px var(--primary);
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-item {
    position: relative;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    animation: fadeIn 0.3s ease-out forwards;
}

.nav-item:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.nav-item.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

/* Controls */
.navbar-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    background-color: var(--background);
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: scaleIn 0.4s ease-out 0.3s both;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--ring);
}

.theme-dark .control-btn {
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
}

.theme-dark .control-btn:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.control-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.control-btn:hover svg {
    transform: scale(1.1);
}

/* Theme toggle */
#theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transition: all 0.3s ease;
}

.sun-icon {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.theme-dark .sun-icon {
    transform: translate(-50%, -50%) rotate(-90deg) scale(0);
}

.moon-icon {
    transform: translate(-50%, -50%) rotate(90deg) scale(0);
}

.theme-dark .moon-icon {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Prevent hover scaling on theme icons */
#theme-toggle:hover .theme-icon {
    transform-origin: center;
}

#theme-toggle:hover .sun-icon {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

#theme-toggle:hover .theme-dark .sun-icon {
    transform: translate(-50%, -50%) rotate(-90deg) scale(0);
}

#theme-toggle:hover .moon-icon {
    transform: translate(-50%, -50%) rotate(90deg) scale(0);
}

#theme-toggle:hover .theme-dark .moon-icon {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Language toggle */
#current-lang {
    font-size: 0.875rem;
    font-weight: 600;
}

/* GitHub link */
.github-link {
    display: none;
}

@media (min-width: 768px) {
    .github-link {
        display: flex;
    }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: flex;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger-icon,
.close-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.close-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.mobile-menu-toggle.active .hamburger-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.mobile-menu-toggle.active .close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) 0;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    background-color: color-mix(in srgb, var(--accent) 10%, transparent);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-logo-icon {
    width: 28px;
    height: 28px;
}

.mobile-logo span {
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, transparent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    gap: 0.5rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease-out forwards;
}

.mobile-nav-item:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav-item:nth-child(2) { animation-delay: 0.1s; }
.mobile-nav-item:nth-child(3) { animation-delay: 0.15s; }

.mobile-nav-item:hover {
    background-color: color-mix(in srgb, var(--accent) 40%, transparent);
    transform: translateX(4px);
}

.mobile-nav-item.active {
    background-color: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.mobile-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at top, color-mix(in srgb, var(--primary) 10%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, color-mix(in srgb, var(--secondary) 5%, transparent) 0%, transparent 50%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, color-mix(in srgb, var(--primary) 3%, transparent) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, color-mix(in srgb, var(--accent) 2%, transparent) 50%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-title-line {
    display: block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 70%, color-mix(in srgb, var(--primary) 70%, transparent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUp 0.8s ease-out forwards;
}

.hero-title-line:nth-child(1) {
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title-line:nth-child(2) {
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--muted-foreground);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeIn 0.6s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    animation: fadeIn 0.6s ease-out 0.8s both;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: calc(var(--radius) + 2px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.theme-dark .btn:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 85%, black) 100%);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 90%, black) 0%, color-mix(in srgb, var(--primary) 75%, black) 100%);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--primary) 40%, transparent);
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border-color: var(--border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--ring);
}

/* Recent Posts Section */
.recent-posts-section {
    padding: 4rem 1rem;
    background-color: var(--background);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-out;
}

@media (min-width: 640px) {
    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: bold;
    color: var(--foreground);
}

.section-link {
    font-size: 1.125rem;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.section-link:hover {
    transform: translateX(4px);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    animation: slideUp 0.8s ease-out;
}

/* Post Skeleton */
.post-skeleton {
    height: 200px;
    background: linear-gradient(90deg, var(--muted) 0%, color-mix(in srgb, var(--muted) 80%, white) 50%, var(--muted) 100%);
    background-size: 200% 100%;
    border-radius: var(--radius);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Footer */
.footer {
    position: relative;
    border-top: 1px solid var(--border);
    background-color: var(--background);
    animation: fadeIn 0.5s ease-out;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .footer-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 2rem 1.5rem;
    }
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .footer-copyright {
        margin-bottom: 0;
    }
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.social-link:hover {
    color: var(--foreground);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Post Cards */
.post-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out both;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--ring);
}

.theme-dark .post-card {
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.04);
}

.theme-dark .post-card:hover {
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.08);
}

.post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.post-date {
    font-weight: 500;
}

.post-author {
    position: relative;
}

.post-author::before {
    content: "•";
    margin-right: 0.75rem;
    color: var(--muted-foreground);
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    line-height: 1.4;
}

.post-description {
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.post-tag:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

/* Error Message */
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.error-content {
    background-color: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    max-width: 400px;
    margin: 1rem;
}

.error-content h3 {
    color: var(--destructive);
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

/* Theme transitioning */
.theme-transitioning * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Responsive adjustments */
@media (min-width: 640px) {
    .post-image {
        height: 240px;
    }
    
    .post-content {
        padding: 2rem;
    }
    
    .post-title {
        font-size: 1.375rem;
    }
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Article Page */
.article-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.8s ease-out;
}

.article-header {
    margin-bottom: 3rem;
}

.article-header-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 2rem;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb-link {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--muted-foreground);
}

.breadcrumb-current {
    color: var(--foreground);
    font-weight: 500;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    flex-wrap: wrap;
}

.article-category-badge {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-weight: 600;
}

.article-date,
.article-read-time,
.article-author {
    font-weight: 500;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--foreground);
}

.article-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-tag:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
}

.article-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--muted) 0%, color-mix(in srgb, var(--muted) 90%, var(--accent)) 100%);
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
}

.article-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(var(--secondary-rgb), 0.1) 0%, transparent 50%);
    z-index: 1;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-body {
    line-height: 1.8;
    color: var(--foreground);
}

.article-body h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem 0;
    color: var(--foreground);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--foreground);
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--foreground);
}

.article-body p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--primary) 50%, transparent);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.article-body a:hover {
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.article-body strong {
    font-weight: 600;
    color: var(--foreground);
}

.article-body code {
    background-color: var(--muted);
    color: var(--foreground);
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.article-body pre {
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--muted-foreground);
}

/* Article Note */
.article-note {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    margin: 1.5rem 0;
    background-color: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: var(--radius);
}

.article-note-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.article-note-content p {
    margin: 0;
    font-size: 1rem;
}

/* Article Navigation */
.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    gap: 2rem;
}

@media (max-width: 640px) {
    .article-navigation {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

.article-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-nav-link:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
    transform: translateX(-4px);
}

.article-nav-icon {
    width: 16px;
    height: 16px;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-button:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
    transform: translateY(-2px);
}

.share-button svg {
    width: 16px;
    height: 16px;
}

/* About Section */
.about-section {
    padding: 2rem 1rem;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--background) 0%, color-mix(in srgb, var(--background) 97%, var(--primary) 3%) 100%);
}

@media (min-width: 640px) {
    .about-section {
        padding: 4rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .about-section {
        padding: 6rem 2rem;
    }
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.about-hero {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .about-hero {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .about-hero {
        gap: 4rem;
    }
}

.about-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px color-mix(in srgb, var(--primary) 20%, transparent);
}

@media (min-width: 768px) {
    .avatar-image {
        width: 250px;
        height: 250px;
    }
}

.avatar-image:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 60px color-mix(in srgb, var(--primary) 30%, transparent);
}

.avatar-border {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary));
    z-index: -1;
    opacity: 0.5;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.about-intro {
    flex: 1;
    max-width: 600px;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .about-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .about-title {
        font-size: 3rem;
    }
}

.about-subtitle {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .about-subtitle {
        font-size: 1.25rem;
    }
}

.about-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--foreground);
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (min-width: 640px) {
    .about-description {
        font-size: 1.125rem;
    }
}

.about-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .about-buttons {
        flex-direction: row;
        gap: 1.5rem;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .about-buttons {
        justify-content: flex-start;
    }
}

/* Skills and Interests - Updated */
.about-skills {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
    .about-skills {
        margin-top: 6rem;
        padding-top: 6rem;
    }
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.skill-item {
    background: linear-gradient(135deg, var(--card) 0%, color-mix(in srgb, var(--card) 98%, var(--primary) 2%) 100%);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: var(--primary);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    font-size: 1.5rem;
}

.skill-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.skill-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

/* About page specific styles */
.about-section-card {
    background: linear-gradient(135deg, var(--card) 0%, color-mix(in srgb, var(--card) 98%, var(--primary) 2%) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .about-section-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

.about-section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: var(--primary);
}

.about-section-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--foreground);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

@media (max-width: 640px) {
    .about-section-card h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

/* Skills categories */
.skills-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.skill-category {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .skill-category {
        padding: 1rem;
    }
}

.skill-category:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 10%, transparent);
}

.skill-category h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
}

@media (max-width: 640px) {
    .skill-category h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

/* Skill tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 80%, var(--accent)) 100%);
    color: var(--primary-foreground);
    padding: 0.375rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

@media (max-width: 640px) {
    .skill-tag {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary) 30%, transparent);
}

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

.focus-list li {
    position: relative;
    padding: 0.75rem 0;
    padding-left: 2rem;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
    line-height: 1.6;
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .focus-list li {
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        font-size: 0.9rem;
    }
}

.focus-list li:last-child {
    border-bottom: none;
}

.focus-list li::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: var(--primary);
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .focus-list li::before {
        top: 0.5rem;
        font-size: 0.6rem;
    }
}

.focus-list li:hover {
    padding-left: 2.5rem;
    color: var(--primary);
}

@media (max-width: 640px) {
    .focus-list li:hover {
        padding-left: 2rem;
    }
}

.focus-list li:hover::before {
    color: var(--accent);
    transform: scale(1.2);
}

/* Contact links */
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .contact-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 85%, var(--accent)) 100%);
    color: var(--primary-foreground);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

@media (max-width: 640px) {
    .contact-link {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        justify-content: center;
    }
}

.contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--primary) 40%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 90%, white) 0%, color-mix(in srgb, var(--primary) 75%, var(--accent)) 100%);
}

.contact-link svg {
    transition: transform 0.3s ease;
}

.contact-link:hover svg {
    transform: scale(1.1);
}

/* About Content Container */
.about-content {
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {
    .about-content {
        margin-top: 2rem;
    }
}

/* Make sure about section takes full container */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .about-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .about-container {
        padding: 0 2rem;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes iconFloat {
    from {
        opacity: 0;
        transform: rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Enhanced Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 20%, transparent);
    }
    50% {
        box-shadow: 0 0 40px color-mix(in srgb, var(--primary) 40%, transparent);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* Page entrance animations */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced hover effects for main sections */
.main-content {
    animation: pageEnter 0.8s ease-out;
}

.hero-section,
.about-section,
.projects-section,
.articles-section {
    animation: pageEnter 0.6s ease-out both;
}

.hero-section {
    animation-delay: 0.1s;
}

.about-section {
    animation-delay: 0.2s;
}

.projects-section {
    animation-delay: 0.3s;
}

.articles-section {
    animation-delay: 0.4s;
}

/* Mobile-First Responsive Improvements */

/* Mobile typography improvements */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-logo-text {
        font-size: 1rem;
    }
    
    .navbar-logo-icon {
        font-size: 1rem;
    }
}

/* Mobile card improvements */
@media (max-width: 640px) {
    .project-card,
    .article-card,
    .post-card {
        margin: 0 0.5rem;
    }
    
    .btn {
        min-width: 120px;
        padding: 0.75rem 1.5rem;
        font-size: 0.8rem;
    }
}

/* Mobile spacing improvements */
@media (max-width: 640px) {
    .hero-section,
    .projects-section,
    .articles-section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .section-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}

/* Mobile grid improvements */
@media (max-width: 640px) {
    .projects-grid,
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile footer improvements */
@media (max-width: 640px) {
    .footer {
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Touch improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover,
    .article-card:hover,
    .btn:hover {
        transform: none;
    }
    
    .project-card:active,
    .article-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* Improved mobile menu */
@media (max-width: 768px) {
    .mobile-menu {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .mobile-nav-item {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
}

/* Better mobile loading screen */
@media (max-width: 640px) {
    .loading-screen {
        padding: 2rem;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* Mobile text selection improvements */
@media (max-width: 640px) {
    ::selection {
        background: color-mix(in srgb, var(--primary) 30%, transparent);
    }
    
    ::-moz-selection {
        background: color-mix(in srgb, var(--primary) 30%, transparent);
    }
}

/* Projects Section Styles */
.projects-header-section {
    padding: 3rem 1rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--background) 0%, color-mix(in srgb, var(--background) 98%, var(--primary) 2%) 100%);
}

.projects-header {
    max-width: 800px;
    margin: 0 auto;
}

.projects-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--foreground) 0%, color-mix(in srgb, var(--foreground) 80%, var(--primary) 20%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-subtitle {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.projects-section {
    padding: 2rem 1rem 4rem;
    background: var(--background);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Project Card */
.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--foreground) 8%, transparent);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--foreground) 15%, transparent);
    border-color: color-mix(in srgb, var(--primary) 50%, var(--border) 50%);
}

.project-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.project-card.featured {
    border-color: var(--primary);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary) 20%, transparent);
}

.project-card.featured:hover {
    box-shadow: 0 8px 30px color-mix(in srgb, var(--primary) 30%, transparent);
}

/* Project Image */
.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--muted) 0%, color-mix(in srgb, var(--muted) 90%, var(--primary) 10%) 100%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.project-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

.project-status-active {
    background: color-mix(in srgb, #22c55e 90%, transparent);
    color: #16a34a;
}

.project-status-maintained {
    background: color-mix(in srgb, #f59e0b 90%, transparent);
    color: #d97706;
}

.project-status-archived {
    background: color-mix(in srgb, var(--muted-foreground) 90%, transparent);
    color: var(--muted-foreground);
}

/* Project Content */
.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    line-height: 1.3;
}

.project-category {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.project-description {
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Project Technologies */
.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--muted);
    color: var(--muted-foreground);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: color-mix(in srgb, var(--primary) 20%, var(--muted));
    color: var(--foreground);
}

/* Project Actions */
.project-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    position: relative;
}

.project-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.project-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.github-link {
    background: var(--muted);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
}

.github-link:hover {
    background: var(--foreground);
    color: var(--background);
}

.demo-link {
    background: var(--primary);
    color: var(--primary-foreground);
    border: 1px solid var(--primary);
}

.demo-link:hover {
    background: color-mix(in srgb, var(--primary) 90%, black);
}

.project-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Project Skeleton Loading */
.project-skeleton {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.project-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 15%, transparent), transparent);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--muted-foreground);
    grid-column: 1 / -1;
}

.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.error-message p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .project-card {
        margin: 0;
    }
    
    .projects-title {
        font-size: 2rem;
    }
    
    .projects-subtitle {
        font-size: 1rem;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .project-link {
        flex: none;
    }
}

@media (max-width: 480px) {
    .projects-header-section {
        padding: 2rem 1rem 1.5rem;
    }
    
    .projects-section {
        padding: 1.5rem 0.5rem 3rem;
    }
    
    .projects-title {
        font-size: 1.75rem;
    }
    
    .project-content {
        padding: 1rem;
    }
}