/* Add universal theme transition for all elements that use CSS variables */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease, 
                box-shadow 0.3s ease,
                fill 0.3s ease,
                stroke 0.3s ease;
}

/* Enhanced theme transition for smooth switching */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                fill 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Exclude elements that have their own specific transitions */
.btn,
.nav-link,
.dark-mode-toggle,
.skill-tag,
.post-card,
.video-item,
.nav-logo a {
    transition: var(--transition);
}

/* Ensure dark mode toggle has smooth rotation */
.dark-mode-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition), transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.dark-mode-toggle:hover {
    border-color: var(--accent);
    transform: rotate(180deg);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --accent: #89CFF0;
    --accent-hover: #ADD8E6;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --accent: #89CFF0;
    --accent-hover: #764ba2;
    --border: #4a5568;
    --shadow: rgba(0, 0, 0, 0.3);
    --card-bg: #2d3748;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--theme-transition);
}

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

/* Navigation */
.navbar {
    background-color: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--theme-transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo a:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}



/* Main Content */
.main-content {
    margin-top: 70px;
}

/* Page Content */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.typing-text {
    color: var(--accent);
    border-right: 3px solid var(--accent);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--accent); }
    51%, 100% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.9s forwards;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    background: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow);
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 1.7s forwards;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.skills {
    margin-top: 3rem;
}

.skills h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-tag {
    background-color: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* Page Header */
.page-header {
    padding: 50px 0;
    text-align: center;
    background-color: var(--bg-secondary);
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Blog Posts */
.blog-posts {
    padding: 50px 0;
}

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

.post-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow);
    transition: var(--theme-transition), transform 0.3s ease;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow);
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.post-tag {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

.coming-soon {
    text-align: center;
    padding: 3rem;
    background-color: var(--bg-secondary);
    border-radius: 15px;
    border: 2px dashed var(--border);
}

.coming-soon h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.coming-soon p {
    color: var(--text-secondary);
}

/* Videos Section */
.videos-section {
    padding: 50px 0;
}

.videos-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}
/* Update the video wrapper to properly contain iframes */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Remove the placeholder styles when using real videos */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--bg-secondary), var(--border));
}

.video-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow);
    border: 1px solid var(--border);
    transition: var(--theme-transition), transform 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--bg-secondary), var(--border));
}

.video-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.coming-soon-video {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 15px;
    color: white;
}

.coming-soon-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.coming-soon-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.coming-soon-content .btn {
    background-color: white;
    color: var(--accent);
}

.coming-soon-content .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
/* Modal styles for enlarged blog posts */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* Modal styles for enlarged blog posts */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal .post-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-card {
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .video-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        justify-content: center;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .post-card,
    .video-item {
        padding: 1.5rem;
    }
    
    .coming-soon-video {
        padding: 3rem 1.5rem;
    }
}