/* ==========================================
   ENHANCED STYLES - PROFESSIONAL & INTERACTIVE
   Complete stylesheet for a8d.ai portfolio
   ========================================== */

/* ==========================================
   CUSTOM PROPERTIES EXTENSION
   ========================================== */

:root {
    /* Extended Color Palette */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-cool: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Animation Timings */
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] {
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   SECTION ALTERNATING BACKGROUNDS
   ========================================== */

.section-alt {
    background: var(--light-bg);
    position: relative;
}

.section-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

[data-theme="dark"] .section-alt {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, var(--background) 100%);
}

/* ==========================================
   CREDENTIALS SECTION
   ========================================== */

.credentials {
    overflow: hidden;
}

.credentials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.credentials-column {
    position: relative;
}

.credentials-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.credentials-title i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    font-size: 1.125rem;
}

/* Education Timeline */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-color) 50%, transparent 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s var(--ease-smooth) forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--background);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), 0 0 20px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
    z-index: 1;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3), 0 0 30px rgba(37, 99, 235, 0.5);
}

.timeline-content {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-smooth);
}

.timeline-item:hover .timeline-content {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow-hover);
    transform: translateX(8px);
}

.timeline-item:hover .timeline-content::before {
    transform: scaleX(1);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-primary);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.timeline-org {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.timeline-location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    color: var(--light-text);
}

.timeline-location i {
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* Certifications Grid */
.certs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.cert-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInRight 0.5s var(--ease-smooth) forwards;
}

.cert-badge:nth-child(1) {
    animation-delay: 0.1s;
}

.cert-badge:nth-child(2) {
    animation-delay: 0.15s;
}

.cert-badge:nth-child(3) {
    animation-delay: 0.2s;
}

.cert-badge:nth-child(4) {
    animation-delay: 0.25s;
}

.cert-badge:nth-child(5) {
    animation-delay: 0.3s;
}

.cert-badge:nth-child(6) {
    animation-delay: 0.35s;
}

.cert-badge:nth-child(7) {
    animation-delay: 0.4s;
}

.cert-badge:nth-child(8) {
    animation-delay: 0.45s;
}

.cert-badge::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 ease;
}

.cert-badge:hover::before {
    left: 100%;
}

.cert-badge:hover {
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: var(--card-shadow);
}

.cert-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.cert-badge:hover .cert-icon {
    transform: scale(1.1) rotate(5deg);
}

.cert-icon.security-plus {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.cert-icon.pentest {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cert-icon.ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.cert-icon.network {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.cert-icon.leadership {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.cert-icon.security {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.cert-info {
    flex: 1;
}

.cert-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.cert-badge:hover .cert-info h4 {
    color: var(--primary-color);
}

.cert-info p {
    font-size: 0.8rem;
    color: var(--light-text);
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

.project-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s var(--ease-smooth) forwards;
}

.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.15s;
}

.project-card:nth-child(3) {
    animation-delay: 0.2s;
}

.project-card:nth-child(4) {
    animation-delay: 0.25s;
}

.project-card:nth-child(5) {
    animation-delay: 0.3s;
}

.project-card:nth-child(6) {
    animation-delay: 0.35s;
}

.project-card:nth-child(7) {
    animation-delay: 0.4s;
}

.project-card:nth-child(8) {
    animation-delay: 0.45s;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-smooth);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card.featured {
    border: 2px solid transparent;
    background: linear-gradient(var(--background), var(--background)) padding-box,
        var(--gradient-primary) border-box;
}

.project-card.featured::after {
    content: '★ Featured';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: var(--gradient-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.project-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(37, 99, 235, 0.1), transparent 30%);
    animation: rotate 10s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.project-image i {
    font-size: 3.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.project-card:hover .project-image i {
    transform: scale(1.15);
}

.project-content {
    padding: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags .tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: var(--transition);
}

.tag.ai {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.tag.security {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag.nlp {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.tag.gov {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag.research {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.tag.data {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.project-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.project-card:hover .project-content h3 {
    color: var(--primary-color);
}

.project-content p {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--light-text);
    background: var(--light-bg);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card:hover .project-tech span {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================
   STAT PLUS SIGN
   ========================================== */

.stat-plus {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 2px;
}

/* ==========================================
   NEWS SECTION STYLES
   ========================================== */

.news-section {
    background: var(--light-bg);
}

/* News Controls */
.news-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 1.75rem;
    background: var(--background);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.search-box i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    pointer-events: none;
    transition: var(--transition);
}

.search-box input:focus+i,
.search-box:focus-within i {
    color: var(--primary-color);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-color);
    background: var(--background);
    transition: var(--transition);
}

.search-box input::placeholder {
    color: var(--light-text);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-refresh {
    padding: 1rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-refresh:hover {
    transform: rotate(180deg) scale(1.05);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-refresh:active {
    transform: rotate(180deg) scale(0.95);
}

.btn-refresh.loading {
    pointer-events: none;
}

.btn-refresh.loading i {
    animation: spin 1s linear infinite;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.filter-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-chip.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Last Update */
.last-update {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--light-text);
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.last-update i {
    color: var(--primary-color);
}

/* Loading State */
.news-loading {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.skeleton-card {
    height: 420px;
    background: linear-gradient(90deg,
            var(--light-bg) 25%,
            var(--border-color) 50%,
            var(--light-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 16px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Error State */
.news-error {
    text-align: center;
    padding: 4rem 2rem;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.news-error i {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

.news-error h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.news-error p {
    color: var(--light-text);
    margin-bottom: 2rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* News Card */
.news-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-bg);
    transition: var(--transition);
}

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

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.news-card-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-category.ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.news-card-category.cybersecurity {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.news-card-category.cloud {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.news-card-category.programming {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.news-card-category.technology {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.news-card-read-time {
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover .news-card-title {
    color: var(--primary-color);
}

.news-card-excerpt {
    color: var(--light-text);
    margin-bottom: 1.25rem;
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.news-card-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
}

.news-card-source i {
    color: var(--primary-color);
}

.news-card-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    color: var(--light-text);
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.action-btn.bookmarked {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-results i {
    font-size: 4rem;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--light-text);
}

/* ==========================================
   ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.5);
    }
}

/* Staggered News Card Animations */
.news-card:nth-child(1) {
    animation-delay: 0.1s;
}

.news-card:nth-child(2) {
    animation-delay: 0.15s;
}

.news-card:nth-child(3) {
    animation-delay: 0.2s;
}

.news-card:nth-child(4) {
    animation-delay: 0.25s;
}

.news-card:nth-child(5) {
    animation-delay: 0.3s;
}

.news-card:nth-child(6) {
    animation-delay: 0.35s;
}

.news-card:nth-child(7) {
    animation-delay: 0.4s;
}

.news-card:nth-child(8) {
    animation-delay: 0.45s;
}

.news-card:nth-child(9) {
    animation-delay: 0.5s;
}

.news-card:nth-child(n+10) {
    animation-delay: 0.55s;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

#toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s var(--ease-spring);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    max-width: 350px;
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-info {
    background: var(--gradient-primary);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ==========================================
   INTERACTIVE HOVER EFFECTS
   ========================================== */

/* Magnetic Button Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Card Tilt Effect (works with JS) */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Underline Animation */
.animated-link {
    position: relative;
}

.animated-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s var(--ease-smooth);
}

.animated-link:hover::after {
    width: 100%;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 1024px) {
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-controls {
        padding: 1.25rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .btn-refresh {
        width: 100%;
    }

    .category-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .news-grid,
    .news-loading {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    #toast-container {
        left: 1rem;
        right: 1rem;
        top: 80px;
    }

    .toast {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-marker {
        left: -2rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .cert-badge {
        padding: 0.875rem;
    }

    .cert-icon {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }

    .project-image {
        height: 140px;
    }

    .project-content {
        padding: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    .news-grid,
    .news-loading {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   DARK MODE ADJUSTMENTS
   ========================================== */

[data-theme="dark"] .news-controls {
    background: var(--light-bg);
}

[data-theme="dark"] .skeleton-card {
    background: linear-gradient(90deg,
            var(--light-bg) 25%,
            rgba(255, 255, 255, 0.05) 50%,
            var(--light-bg) 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .news-card {
    background: var(--light-bg);
}

[data-theme="dark"] .news-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .timeline-content,
[data-theme="dark"] .cert-badge,
[data-theme="dark"] .project-card {
    background: var(--light-bg);
}

[data-theme="dark"] .project-tech span {
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   PLACEHOLDER IMAGE STYLES
   ========================================== */

.news-card-image.placeholder,
.news-card-image[src*="placeholder"] {
    background: var(--gradient-cool);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-image.error {
    background: var(--gradient-primary);
}

/* ==========================================
   SECURITY TOOLS SECTION
   ========================================== */

.tools-section {
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.tools-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 200, 150, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Terminal Header */
.tools-terminal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #1a1b2e;
    padding: 0.75rem 1.25rem;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dots .dot.red {
    background: #ff5f57;
}

.terminal-dots .dot.yellow {
    background: #ffbd2e;
}

.terminal-dots .dot.green {
    background: #28c840;
}

.terminal-title {
    font-family: 'Courier New', 'Fira Code', monospace;
    color: #00c896;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Tools Controls */
.tools-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1f35;
    padding: 1rem 1.25rem;
    border-radius: 0 0 12px 12px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tools-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tools-filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tools-filter-btn:hover {
    background: rgba(0, 200, 150, 0.1);
    border-color: rgba(0, 200, 150, 0.3);
    color: #00c896;
}

.tools-filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.2) 0%, rgba(0, 200, 150, 0.05) 100%);
    color: #00c896;
    border-color: #00c896;
    box-shadow: 0 0 15px rgba(0, 200, 150, 0.15);
}

/* Telegram Button */
.btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.25);
    text-decoration: none;
}

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

.btn-telegram.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    border-radius: 12px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* Tool Card */
.tool-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s var(--ease-smooth) forwards;
}

.tool-card:nth-child(1) {
    animation-delay: 0.05s;
}

.tool-card:nth-child(2) {
    animation-delay: 0.1s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.15s;
}

.tool-card:nth-child(4) {
    animation-delay: 0.2s;
}

.tool-card:nth-child(5) {
    animation-delay: 0.25s;
}

.tool-card:nth-child(6) {
    animation-delay: 0.3s;
}

.tool-card:nth-child(7) {
    animation-delay: 0.35s;
}

.tool-card:nth-child(8) {
    animation-delay: 0.4s;
}

.tool-card:nth-child(9) {
    animation-delay: 0.45s;
}

.tool-card:nth-child(10) {
    animation-delay: 0.5s;
}

.tool-card:nth-child(11) {
    animation-delay: 0.55s;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tool-accent, #00c896);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-smooth);
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--tool-accent, rgba(0, 200, 150, 0.06)) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(40%, -40%);
    transition: transform 0.5s var(--ease-smooth), opacity 0.3s ease;
    opacity: 0;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.1);
    border-color: var(--tool-accent, rgba(0, 200, 150, 0.3));
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover::after {
    opacity: 1;
    transform: translate(30%, -30%);
}

/* Tool Card Header */
.tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tool-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.3rem;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    z-index: 1;
}

.tool-icon.recon {
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.12) 0%, rgba(0, 200, 150, 0.04) 100%);
    color: #00c896;
    border: 1px solid rgba(0, 200, 150, 0.15);
}

.tool-icon.dns {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.04) 100%);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.tool-icon.security {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(-5deg);
}

.tool-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #00c896;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    background: rgba(0, 200, 150, 0.08);
    border: 1px solid rgba(0, 200, 150, 0.15);
}

.tool-status .status-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00c896;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.4);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 4px rgba(0, 200, 150, 0);
    }
}

/* Tool Card Content */
.tool-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.tool-card:hover .tool-card-title {
    color: var(--tool-accent, #00c896);
}

.tool-card-desc {
    font-size: 0.85rem;
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Tool Card Footer */
.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.tool-card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tool-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: var(--light-bg);
    color: var(--light-text);
    border: 1px solid var(--border-color);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tool-card-launch {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--light-text);
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    text-decoration: none;
}

.tool-card-launch:hover {
    background: #0088cc;
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

/* CTA Banner */
.tools-cta {
    margin-top: 2.5rem;
}

.tools-cta-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #1a1b2e 0%, #0f1023 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.tools-cta-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 136, 204, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tools-cta-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.2) 0%, rgba(0, 136, 204, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 136, 204, 0.2);
    color: #0088cc;
    font-size: 1.5rem;
}

.tools-cta-text {
    flex: 1;
}

.tools-cta-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.tools-cta-text p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Dark mode */
[data-theme="dark"] .tool-card {
    background: var(--light-bg);
}

[data-theme="dark"] .tool-tag {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .tools-terminal-header {
        border-radius: 10px 10px 0 0;
        padding: 0.65rem 1rem;
    }

    .terminal-title {
        font-size: 0.72rem;
    }

    .tools-controls {
        flex-direction: column;
        align-items: stretch;
        border-radius: 0 0 10px 10px;
    }

    .tools-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .tools-filters::-webkit-scrollbar {
        display: none;
    }

    .tools-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .btn-telegram {
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-cta-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   SIMPLIFIED CONTACT CARDS
   ========================================== */

.contact-grid-simple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card-simple {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.contact-card-simple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-smooth);
}

.contact-card-simple:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px -8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.contact-card-simple:hover::before {
    transform: scaleX(1);
}

.contact-icon-simple {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.03) 100%);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.12);
    transition: all 0.3s var(--ease-smooth);
}

.contact-card-simple:hover .contact-icon-simple {
    transform: scale(1.1) rotate(-5deg);
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.contact-card-simple h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.contact-card-simple p {
    font-size: 0.8rem;
    color: var(--light-text);
    margin: 0;
}

/* Dark mode */
[data-theme="dark"] .contact-card-simple {
    background: var(--light-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-grid-simple {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .contact-card-simple {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .contact-grid-simple {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .contact-card-simple {
        padding: 1.25rem 0.75rem;
    }

    .contact-icon-simple {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}

/* ==========================================
   TYPING ANIMATION
   ========================================== */

.typing-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 1rem;
    min-height: 2rem;
}

.typing-text {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-cursor {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--primary-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .typing-wrapper {
        justify-content: center;
    }

    .typing-text {
        font-size: 1rem;
    }
}

/* ==========================================
   YOUTUBE SECTION
   ========================================== */

.youtube-section {
    background: var(--background);
    position: relative;
    overflow: hidden;
}

.youtube-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.youtube-section::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* YouTube Controls */
.yt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.yt-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.yt-filter-btn {
    padding: 0.65rem 1.5rem;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.yt-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.yt-filter-btn:hover {
    border-color: #ff0000;
    color: #ff0000;
    transform: translateY(-2px);
}

.yt-filter-btn.active {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.yt-filter-btn.active::before {
    opacity: 1;
}

/* YouTube Subscribe Button */
.btn-youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.25);
}

.btn-youtube:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}

.btn-youtube i {
    font-size: 1.2rem;
}

/* YouTube Video Grid */
.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

/* YouTube Video Card */
.yt-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s var(--ease-smooth) forwards;
}

.yt-card:nth-child(1) {
    animation-delay: 0.1s;
}

.yt-card:nth-child(2) {
    animation-delay: 0.2s;
}

.yt-card:nth-child(3) {
    animation-delay: 0.3s;
}

.yt-card:nth-child(4) {
    animation-delay: 0.4s;
}

.yt-card:nth-child(5) {
    animation-delay: 0.5s;
}

.yt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-smooth);
    z-index: 5;
}

.yt-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.3);
}

.yt-card:hover::before {
    transform: scaleX(1);
}

/* Thumbnail Container */
.yt-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    background: #000;
}

.yt-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-smooth), filter 0.3s ease;
}

.yt-card:hover .yt-thumb img {
    transform: scale(1.08);
    filter: brightness(0.7);
}

/* Play Button Overlay */
.yt-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.yt-card:hover .yt-play-overlay {
    opacity: 1;
}

.yt-play-btn {
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-spring);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.yt-play-btn i {
    color: white;
    font-size: 1.5rem;
    margin-left: 3px;
}

.yt-card:hover .yt-play-btn {
    transform: scale(1.15);
    background: rgba(255, 0, 0, 1);
}

/* Duration Badge */
.yt-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    z-index: 3;
}

/* Card Content */
.yt-card-content {
    padding: 1.5rem;
}

.yt-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.yt-card-category {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.yt-card-category.ai {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.yt-card-category.cybersecurity {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.yt-card-open {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--light-text);
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.yt-card-open:hover {
    background: #ff0000;
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.yt-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.6rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.yt-card:hover .yt-card-title {
    color: #ff0000;
}

.yt-card-desc {
    font-size: 0.875rem;
    color: var(--light-text);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.yt-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.yt-card-channel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.yt-card-channel i {
    color: #ff0000;
    font-size: 1rem;
}

.yt-card-watch {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.yt-card:hover .yt-card-watch {
    color: #ff0000;
}

/* ==========================================
   YOUTUBE MODAL / LIGHTBOX
   ========================================== */

.yt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-smooth), visibility 0.4s var(--ease-smooth);
}

.yt-modal.active {
    opacity: 1;
    visibility: visible;
}

.yt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.yt-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: var(--background);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.85) translateY(30px);
    transition: transform 0.5s var(--ease-spring);
    z-index: 1;
}

.yt-modal.active .yt-modal-content {
    transform: scale(1) translateY(0);
}

.yt-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.yt-modal-close:hover {
    background: #ff0000;
    border-color: #ff0000;
    transform: rotate(90deg);
}

.yt-modal-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background: #000;
}

.yt-modal-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.yt-modal-info {
    padding: 1.5rem 2rem;
}

.yt-modal-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.yt-modal-info p {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.6;
}

/* Dark mode adjustments */
[data-theme="dark"] .yt-card {
    background: var(--light-bg);
}

[data-theme="dark"] .yt-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .yt-modal-content {
    background: var(--light-bg);
}

/* YouTube section responsive */
@media (max-width: 768px) {
    .yt-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .yt-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .yt-filters::-webkit-scrollbar {
        display: none;
    }

    .yt-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .btn-youtube {
        justify-content: center;
    }

    .youtube-grid {
        grid-template-columns: 1fr;
    }

    .yt-modal-content {
        width: 95%;
        border-radius: 16px;
    }

    .yt-modal-close {
        top: -48px;
    }

    .yt-modal-info {
        padding: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {

    .news-controls,
    .news-card-actions,
    .back-to-top,
    .particles-container,
    .yt-modal,
    .yt-controls,
    .header,
    .footer,
    .preloader {
        display: none !important;
    }

    .news-grid,
    .projects-grid {
        display: block;
    }

    .news-card,
    .project-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .timeline-item,
    .cert-badge,
    .project-card,
    .news-card {
        opacity: 1;
        transform: none;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

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

[data-theme="dark"]::-webkit-scrollbar-track {
    background: var(--background);
}

[data-theme="dark"]::-webkit-scrollbar-thumb {
    background: var(--border-color);
}