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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --hero-gradient-1: #667eea;
    --hero-gradient-2: #764ba2;
}

/* Cybersecurity Theme */
[data-theme="cyber"] {
    --primary-color: #00ff41;
    --secondary-color: #00cc33;
    --text-dark: #e0ffe0;
    --text-light: #a0ffa0;
    --bg-light: #0a0e27;
    --bg-white: #0d1117;
    --border-color: #1a3a1a;
    --shadow: 0 4px 6px -1px rgba(0, 255, 65, 0.1), 0 2px 4px -1px rgba(0, 255, 65, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 255, 65, 0.15), 0 4px 6px -2px rgba(0, 255, 65, 0.1);
    --hero-gradient-1: #0a0e27;
    --hero-gradient-2: #1a2a1a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem;
    display: block;
}

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

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
    outline: none;
}

.theme-toggle:hover {
    background-color: var(--bg-light);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus {
    outline: none;
}

.theme-icon {
    transition: transform 0.3s ease;
}

[data-theme="cyber"] .theme-toggle {
    color: var(--primary-color);
    filter: drop-shadow(0 0 3px var(--primary-color));
}

[data-theme="cyber"] .theme-toggle:hover {
    filter: drop-shadow(0 0 8px var(--primary-color));
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--hero-gradient-1) 0%, var(--hero-gradient-2) 100%);
    color: white;
    padding: 8rem 2rem;
    text-align: center;
    transition: background 0.3s ease;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-credentials {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 2rem;
    display: inline-block;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

/* Section Styles */
.section {
    padding: 5rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* About Section */
.about-section {
    background-color: var(--bg-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

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

/* Experience Section */
.experience-section {
    background-color: var(--bg-white);
}

.experience-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.experience-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.experience-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.experience-company {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.experience-date {
    color: var(--text-light);
    font-size: 0.95rem;
    white-space: nowrap;
    font-weight: 500;
}

.experience-details {
    list-style: none;
    padding: 0;
}

.experience-details li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    color: var(--text-light);
    position: relative;
    line-height: 1.6;
}

.experience-details li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Cyber theme enhancements for experience */
[data-theme="cyber"] .experience-card {
    border-left-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

[data-theme="cyber"] .experience-card:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

/* Skills Section */
.skills-section {
    background-color: var(--bg-light);
}

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

.skill-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

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

.skill-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.skill-card li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Education Section */
.education-section {
    background-color: var(--bg-white);
}

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

.education-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.education-school {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-details {
    color: var(--text-light);
    font-size: 1rem;
}

/* Projects Section */
.projects-section {
    background-color: var(--bg-light);
}

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

.project-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.project-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-date {
    display: inline-block;
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
    opacity: 0.8;
}

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

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

.tech-tag {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-light);
    text-align: center;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem;
}

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

/* Cyber Theme Enhancements */
[data-theme="cyber"] .nav-brand {
    text-shadow: 0 0 10px var(--primary-color);
}

[data-theme="cyber"] .hero-title {
    text-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
}

[data-theme="cyber"] .hero-credentials {
    background-color: rgba(0, 255, 65, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3), inset 0 0 10px rgba(0, 255, 65, 0.1);
}

[data-theme="cyber"] .project-card,
[data-theme="cyber"] .skill-card,
[data-theme="cyber"] .education-card {
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

[data-theme="cyber"] .project-card:hover,
[data-theme="cyber"] .skill-card:hover,
[data-theme="cyber"] .education-card:hover {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    border-color: var(--primary-color);
}

[data-theme="cyber"] .btn-primary {
    background-color: var(--primary-color);
    color: #0d1117;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

[data-theme="cyber"] .btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
}

[data-theme="cyber"] .project-tag {
    background-color: var(--primary-color);
    color: #0d1117;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

[data-theme="cyber"] .contact-link {
    background-color: var(--primary-color);
    color: #0d1117;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

[data-theme="cyber"] .contact-link:hover {
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
}

/* Cyber Theme Scrollbar */
html[data-theme="cyber"] ::-webkit-scrollbar {
    width: 12px;
}

html[data-theme="cyber"] ::-webkit-scrollbar-track {
    background: #0a0e27;
}

html[data-theme="cyber"] ::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

html[data-theme="cyber"] ::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
}

/* Firefox scrollbar */
html[data-theme="cyber"] {
    scrollbar-width: thin;
    scrollbar-color: #00ff41 #0a0e27;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    margin-bottom: 1rem;
}

.newsletter-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-button {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.newsletter-button:active {
    transform: translateY(0);
}

.newsletter-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.newsletter-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
    display: none;
}

.newsletter-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(16, 185, 129, 0.5);
    color: #d1fae5;
}

.newsletter-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: #fee2e2;
}

.newsletter-privacy {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Articles & Writing Section */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="cyber"] .article-card {
    background: rgba(0, 20, 0, 0.3);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="cyber"] .article-card:hover {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
}

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

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

[data-theme="cyber"] .article-meta {
    color: rgba(0, 255, 65, 0.7);
}

.article-description {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

[data-theme="cyber"] .article-description {
    color: var(--text-dark);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.article-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: var(--secondary-color);
}

[data-theme="cyber"] .article-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Smooth transitions for all themed elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        border-top: 1px solid rgba(0,0,0,0.1);
    }

    [data-theme="cyber"] .nav-menu {
        background-color: rgba(0, 15, 0, 0.98);
        border-top: 1px solid rgba(0, 255, 65, 0.2);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        padding: 1rem 2rem;
        width: 100%;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    [data-theme="cyber"] .nav-menu a {
        border-bottom: 1px solid rgba(0, 255, 65, 0.1);
    }

    .nav-menu a:hover {
        background-color: var(--bg-light);
    }

    [data-theme="cyber"] .nav-menu a:hover {
        background-color: rgba(0, 255, 65, 0.1);
    }

    .theme-toggle {
        position: absolute;
        right: 4rem;
    }

    .hero {
        padding: 5rem 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-credentials {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .experience-date {
        white-space: normal;
    }

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

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

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-input-group {
        flex-direction: column;
    }

    .newsletter-button {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .theme-toggle {
        right: 3rem;
    }
}
