/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ff88;
    --secondary-color: #0a192f;
    --accent-color: #64ffda;
    --text-color: #8892b0;
    --heading-color: #ccd6f6;
    --bg-dark: #0a192f;
    --bg-light: #112240;
    --bg-lighter: #1e3a5f;
    --danger-color: #ff5555;
    --warning-color: #ffb86c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 255, 136, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

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

.nav-menu a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    position: relative;
}

.glitch {
    position: relative;
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-tagline {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(0, 255, 136, 0.1);
}

.hero-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.security-shield {
    font-size: 15rem;
    color: var(--primary-color);
    opacity: 0.2;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    color: var(--heading-color);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto;
}

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

.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.image-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    z-index: 0;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.resume-download {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

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

.stat {
    text-align: center;
}

.stat h4 {
    font-size: 2rem;
    color: var(--primary-color);
}

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

/* Services Section */
.services {
    padding: 100px 0;
}

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

.service-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

/* AI Red Teaming Section */
.ai-red-teaming {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(17, 34, 64, 0.45), rgba(10, 25, 47, 0.95));
}

.repo-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.repo-overview-card,
.repo-structure-card {
    background-color: var(--bg-light);
    border: 1px solid var(--bg-lighter);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.08);
}

.repo-overview-card h3,
.repo-structure-card h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.repo-overview-card a {
    color: var(--primary-color);
}

.repo-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.repo-tree {
    background-color: var(--bg-dark);
    border-radius: 10px;
    padding: 1rem;
    color: var(--accent-color);
    overflow-x: auto;
    white-space: pre-wrap;
    border: 1px solid rgba(0, 255, 136, 0.12);
}

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

.module-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: block;
    color: inherit;
    text-decoration: none;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.15);
}

.module-card.complete {
    border-color: rgba(0, 255, 136, 0.45);
}

.module-card.in-progress {
    border-color: rgba(100, 255, 218, 0.45);
}

.module-card.pending {
    border-color: rgba(136, 146, 176, 0.35);
}

.module-label {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.module-card h3 {
    color: var(--heading-color);
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

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

.page-showcase {
    padding-top: 40px;
}

.page-showcase .section-title {
    margin-top: 3rem;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background-color: var(--bg-light);
}

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

.skill-category {
    background-color: var(--bg-dark);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.skill-category h3 {
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category ul {
    list-style: none;
}

.cert-img {
    width: 96px;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.04);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}

.skill-category .cert-item-link,
.skill-category .cert-item-link:link,
.skill-category .cert-item-link:visited,
.skill-category .cert-item-link:hover,
.skill-category .cert-item-link:active,
.skill-category .cert-item-link:focus {
    color: var(--heading-color) !important;
    text-decoration: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-color);
    position: relative;
    padding-left: 20px;
}

.skill-category li::before {
    content: '▹';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: flex;
    gap: 4rem;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    min-width: 30px;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    background-color: var(--bg-light);
    border: 1px solid var(--bg-lighter);
    border-radius: 5px;
    color: var(--heading-color);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Blog Styles */
.blog-header {
    padding: 150px 0 80px;
    text-align: center;
}

.blog-header h1 {
    font-size: 3rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.blog-section {
    padding: 50px 0 100px;
}

.blog-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--bg-lighter);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
}

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

.blog-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-date {
    color: var(--text-color);
}

.reading-time {
    color: var(--accent-color);
    font-size: 0.85rem;
}

.reading-time i {
    margin-right: 4px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--bg-lighter);
    border-bottom: 1px solid var(--bg-lighter);
    margin: 1rem 0;
}

.share-buttons span {
    color: var(--text-color);
    font-weight: 600;
}

.share-buttons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-buttons a:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.blog-card h3 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.blog-excerpt {
    color: var(--text-color);
    line-height: 1.6;
}

.blog-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.delete-btn {
    padding: 8px 15px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background-color: #ff3333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--bg-light);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-large {
    max-width: 900px;
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

#newPostForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

#newPostForm input,
#newPostForm select,
#newPostForm textarea {
    padding: 12px;
    background-color: var(--bg-dark);
    border: 1px solid var(--bg-lighter);
    border-radius: 5px;
    color: var(--heading-color);
    font-family: inherit;
}

#newPostForm input:focus,
#newPostForm select:focus,
#newPostForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#postContent h2 {
    color: var(--heading-color);
    margin-bottom: 1rem;
}

#postContent .post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-lighter);
}

#postContent .post-body {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

#postContent .post-body h3 {
    color: var(--heading-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#postContent .post-body p {
    margin-bottom: 1rem;
}

#postContent .post-body code {
    background-color: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--primary-color);
}

#postContent .post-body pre {
    background-color: var(--bg-dark);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle::before {
    content: 'Dark Mode';
    position: absolute;
    right: 70px;
    background-color: var(--bg-light);
    color: var(--heading-color);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: 600;
    border: 2px solid var(--primary-color);
}

body.light-mode .dark-mode-toggle::before {
    content: 'Light Mode';
}

.dark-mode-toggle:hover::before {
    opacity: 1;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
}

body.light-mode .dark-mode-toggle {
    background-color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

body.light-mode .dark-mode-toggle:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--bg-dark);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.5);
}

/* Light Mode Styles */
body.light-mode {
    --primary-color: #00cc6f;
    --secondary-color: #f5f5f5;
    --accent-color: #00b8a3;
    --text-color: #333333;
    --heading-color: #1a1a1a;
    --bg-dark: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #e9ecef;
}

body.light-mode .navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-menu a {
    color: #1a1a1a;
}

body.light-mode .nav-menu a:hover,
body.light-mode .nav-menu a.active {
    color: #00cc6f;
}

body.light-mode .logo {
    color: #00cc6f;
}

body.light-mode .hero::before {
    background: radial-gradient(circle, rgba(0, 204, 111, 0.05) 0%, transparent 70%);
}

body.light-mode .service-card,
body.light-mode .skill-category,
body.light-mode .blog-card {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-mode .service-card:hover,
body.light-mode .blog-card:hover {
    box-shadow: 0 10px 30px rgba(0, 204, 111, 0.2);
}

.professional-summary {
    font-size: 1.15rem;
    line-height: 1.8;
    padding: 1rem;
    background-color: rgba(0, 255, 136, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .security-shield {
        font-size: 8rem;
    }

    .about-content,
    .contact-content {
        flex-direction: column;
    }

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

    .about-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .blog-filter {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}
