* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #1f1c2c, #928dab);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

nav {
    background: rgba(31, 28, 44, 0.95);
    color: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    padding: 1.2rem 2.5rem 1.2rem 2rem;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: auto;
    width: 100vw;
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 0 24px 24px;
    flex-wrap: wrap;
    overflow-x: visible;
}

nav .logo {
    margin-right: 2.5rem;
    font-size: 1.1rem;
    white-space: nowrap;
    color: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
    margin-left: auto;
    margin-right: 0;
    padding: 0;
    width: auto;
    overflow-x: visible;
    flex-wrap: nowrap;
    align-items: center;
}

nav ul.nav-links {
    margin-right: 2.5rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    display: block;
    white-space: nowrap;
    flex-shrink: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0.2em;
    width: 100%;
    height: 2px;
    background: #64b5f6;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    transform-origin: left;
}

nav a:hover::after, nav a.active::after {
    transform: scaleX(1);
}

nav a:hover, nav a.active {
    color: #64b5f6;
    background: #232136;
}

main {
    max-width: 95%;
    margin: 6rem auto 0 auto;
    padding: 2rem;
    background: transparent;
    color: #fff;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 1;
    flex: 1;
}

section {
    margin-bottom: 4rem;
}

#blogs-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

#blogs-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #fff;
}

#blogs-header p {
    font-size: 1.2rem;
    color: #b0bec5;
}

#blogs-content {
    background: #ffffff;
    border-radius: 18px;
    padding: 3rem 2.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    margin-top: 2rem;
}

.blogs-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.blog-card {
    background: #ffffff;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:last-child {
    border-bottom: none;
}

.blog-card:hover {
    transform: translateX(8px);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.blog-date {
    color: #928dab;
    font-weight: 500;
}

.blog-category {
    background: #f0f0f0;
    color: #232136;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
}

.blog-card h2 {
    color: #232136;
    font-size: 1.6rem;
    margin: 0.5rem 0 1rem 0;
    font-weight: 700;
}

.blog-card p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1.2rem 0;
}

.blog-read-more {
    color: #64b5f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    cursor: pointer;
}

.blog-read-more:hover {
    color: #38d39f;
}

.blog-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    overflow: hidden;
    animation: none;
}

.blog-content h3 {
    color: #232136;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem 0;
    font-weight: 700;
}

.blog-content p {
    color: #555;
    font-size: 1rem;
    line-height: 1.8;
    margin: 0 0 1rem 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    background: rgba(31, 28, 44, 0.95);
    color: #fff;
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
    margin-top: auto;
    width: 100%;
}

.footer-copy {
    font-size: 1rem;
    color: #b0bec5;
}

.social-pallet {
    position: fixed;
    top: 50%;
    right: 2vw;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(31, 28, 44, 0.18);
    border-radius: 18px;
    padding: 1.2rem 0.7rem;
    z-index: 1200;
    box-shadow: 0 2px 16px rgba(100,181,246,0.10);
    align-items: center;
    transition: background 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(2px);
}

.social-icon {
    color: #fff;
    opacity: 0.85;
    font-size: 1.7rem;
    transition: color 0.2s, transform 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0.3rem;
    background: none;
}

.social-icon:hover {
    color: #64b5f6;
    opacity: 1;
    transform: scale(1.18) translateY(-3px) rotate(-8deg);
    background: rgba(100,181,246,0.08);
}

#bg-anim {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    width: var(--size, 120px);
    height: var(--size, 120px);
    left: var(--left, 10%);
    top: var(--top, 100%);
    background: radial-gradient(circle at 30% 30%, var(--color, #64b5f6) 0%, rgba(255,255,255,0) 65%);
    border-radius: var(--round, 50%);
    opacity: var(--opa, 0.22);
    filter: blur(var(--blur, 10px));
    transform: translateY(0) translateX(0) rotate(var(--rot, 0deg));
    will-change: transform, opacity;
    animation-name: floatUp;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--dur, 18s);
    animation-delay: var(--delay, 0s);
    mix-blend-mode: screen;
}

@keyframes floatUp {
    0% {
        transform: translateY(120vh) translateX(0) rotate(var(--rot, 0deg));
        opacity: 0;
    }
    8% {
        opacity: var(--opa, 0.12);
    }
    92% {
        opacity: var(--opa, 0.12);
    }
    100% {
        transform: translateY(-30vh) translateX(var(--drift, 0px)) rotate(calc(var(--rot, 0deg) + 360deg));
        opacity: 0;
    }
}

/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 1rem;
    order: 2;
    z-index: 202;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 4px 0;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    nav ul.nav-links {
        display: none;
        position: fixed;
        top: 64px;
        right: 2vw;
        left: auto;
        margin-top: 0;
        background: rgba(31, 28, 44, 0.98);
        flex-direction: column;
        gap: 0;
        min-width: 180px;
        width: max-content;
        max-width: 92vw;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18), 0 2px 8px 0 rgba(100,181,246,0.10);
        padding: 0.7rem 0;
        z-index: 12001;
        justify-content: flex-start;
        pointer-events: none;
    }

    nav ul.nav-links.open {
        display: flex;
        pointer-events: auto;
    }

    nav ul.nav-links.open li {
        width: 100%;
    }

    nav ul.nav-links.open li a {
        text-align: left;
        justify-content: flex-start;
        padding-left: 1.2rem;
    }

    .mobile-nav-backdrop.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0);
        z-index: 10999;
        pointer-events: none;
    }

    .mobile-nav-backdrop {
        pointer-events: none;
        display: none;
    }

    nav {
        padding: 1rem 1rem;
        overflow-x: hidden;
    }

    #blogs-header h1 {
        font-size: 2rem;
    }

    #blogs-content {
        padding: 1.5rem 1rem;
    }

    main {
        padding: 1rem;
    }

    .blog-card h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 700px) {
    .social-pallet {
        right: 0.5vw;
        padding: 0.7rem 0.2rem;
        gap: 1rem;
        max-width: 95vw;
        overflow: hidden;
    }

    .social-icon {
        font-size: 1.3rem;
        padding: 0.15rem;
        flex-shrink: 0;
    }
}

@media (max-width: 500px) {
    .social-pallet {
        right: 0.2vw;
        padding: 0.5rem 0.1rem;
        gap: 0.7rem;
        max-width: 90vw;
    }

    .social-icon {
        font-size: 1.1rem;
        padding: 0.1rem;
    }

    #blogs-header h1 {
        font-size: 1.5rem;
    }

    #blogs-header p {
        font-size: 1rem;
    }
}

html {
    scroll-behavior: smooth;
}

/* Page transition animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-content {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
