@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;700&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-primary: #00f2ff;
    --accent-secondary: #7000ff;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.profile-img {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.02);
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #4facfe;
}

.stat-item p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Blog Cards */
.blog-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid #4facfe;
    color: #4facfe;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.read-more {
    margin-top: 1.5rem;
    color: #00f2fe;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

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

header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-top: 60px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: var(--neon-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.nav-links a:hover, .search-trigger-nav a:hover {
    color: #00f2fe;
}

.search-trigger-nav svg {
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.search-trigger-nav:hover svg {
    transform: scale(1.2);
}

h1 {
    font-size: 5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    max-width: 600px;
}

section {
    padding: 8rem 0;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 20px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
    overflow: hidden;
}

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

.video-card .video-container {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.video-container img, .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: opacity 0.3s ease;
}

.video-container iframe {
    opacity: 0;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 255, 0.2);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.card p {
    color: var(--text-dim);
}

.cta-button {
    margin-top: 3rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    background: var(--accent-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.1);
    background: #fff;
}

footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
}

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

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 {
        font-size: 4rem;
    }
    h2 {
        font-size: 2.5rem;
    }
    .about-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
        letter-spacing: -1px;
    }
    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .subtitle {
        font-size: 1.2rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }
    .stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    .nav-links {
        display: none; /* Consider implementing a hamburger menu if needed */
    }
    section {
        padding: 5rem 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    .container {
        padding: 0 1.5rem;
    }
    .cta-button {
        width: 100%;
        padding: 1rem;
    }
    .logo {
        font-size: 1.2rem;
    }
}

/* --- Article Page Styles --- */
.article-page .article-content {
    max-width: 900px;
    margin: 120px auto;
    padding: 0 1.5rem;
    width: 100%;
}

.article-page header.article-header {
    height: auto;
    display: block;
    text-align: left;
    margin-top: 0;
    padding-top: 0;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

.article-page .article-header h1 {
    font-size: clamp(1.5rem, 8vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-wrap: break-word;
    hyphens: none;
}

.article-page .author-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    color: var(--text-dim);
    font-size: 1rem;
    flex-wrap: wrap;
}

.article-page .author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.article-page .hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 4rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

.article-page .article-body h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 4rem 0 2rem;
    color: var(--accent-primary);
    background: linear-gradient(to right, #00f2ff, #7000ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-align: left;
}

.article-page .article-body p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.article-page .article-body ul {
    margin: 2.5rem 0;
    padding-left: 1.5rem;
}

.article-page .article-body li {
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
    list-style: none;
    position: relative;
}

.article-page .article-body li::before {
    content: "→";
    color: var(--accent-primary);
    font-weight: bold;
    position: absolute;
    left: -1.8rem;
}

.article-page .video-cta {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: clamp(2rem, 8vw, 4rem);
    border-radius: 30px;
    text-align: center;
    margin-top: 6rem;
    backdrop-filter: blur(20px);
}

.article-page .video-cta h3 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 1.5rem;
}

.article-page .video-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: #ff0000;
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.article-page .video-button:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(255,0,0,0.3);
}

.article-page .back-link {
    display: inline-block;
    margin-bottom: 3rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .article-page .article-content {
        margin: 100px auto;
        padding: 0 1rem;
    }
    .article-page .article-header {
        text-align: center;
    }
    .article-page .author-info {
        justify-content: center;
        text-align: center;
    }
    .article-page .article-body h2 {
        text-align: center;
    }
}
/* --- Search Overlay --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-overlay .search-container {
    width: 100%;
    max-width: 800px;
    margin: 100px auto;
    padding: 2rem;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}

.search-header input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
}

.search-header input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

#close-search {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

#close-search:hover {
    color: var(--accent-primary);
}

.search-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.search-result-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-result-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.08);
}

.search-result-item h4 {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.search-result-item p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.search-result-item .badge {
    margin-bottom: 0.5rem;
    font-size: 0.6rem;
}

/* Blog Search Trigger Button */
.blog-search-trigger {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.blog-search-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 600px;
}

.blog-search-btn:hover {
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
    transform: translateY(-2px);
}

/* --- Article Pagination --- */
.article-pagination {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.pagination-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pagination-card:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.pagination-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-primary);
    font-weight: 700;
}

.pagination-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.pagination-card.prev {
    text-align: left;
}

.pagination-card.next {
    text-align: right;
}

@media (max-width: 768px) {
    .search-header input {
        font-size: 1.5rem;
    }
    .search-overlay .search-container {
        padding: 1rem;
        margin-top: 60px;
    }
}
