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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-heading);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 1;
}

/* Scanline Effect */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 10;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: fixed;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }

    100% {
        bottom: -100%;
    }
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

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

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
}

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

#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.3s;
}

#theme-toggle:hover {
    background: var(--accent-primary);
    color: #000;
}

.mobile-menu-btn {
    display: none;
}

/* Sections Common */
.container {
    padding: 5rem 10%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-family: var(--font-mono);
}

.section-title .hash {
    color: var(--accent-primary);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-social-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1;
    align-items: center;
}

.hero-social-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: 0.3s;
    min-width: 180px;
}

.hero-social-link i {
    font-size: 1.4rem;
    color: var(--accent-secondary);
    width: 24px;
    text-align: center;
    transition: 0.3s;
}

.hero-social-link:hover {
    border-color: var(--accent-primary);
    transform: translateX(-5px);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.15);
}

.hero-social-link:hover i {
    color: var(--accent-primary);
}

.terminal-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
    border-radius: 4px;
    background: rgba(0, 255, 157, 0.05);
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

#hero-name {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--text-color), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 2rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.primary-btn {
    background: var(--accent-primary);
    color: #000;
    border: none;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.4);
}

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

.secondary-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.stat-grid {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--accent-secondary);
}

.stat-item p {
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

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

.terminal-window {
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    color: #d4d4d4;
    font-family: var(--font-mono);
    border: 1px solid #333;
}

.terminal-header {
    background: #2d2d2d;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.title {
    font-size: 0.8rem;
    color: #999;
    margin-left: 1rem;
}

.terminal-body {
    padding: 1.5rem;
    overflow-x: auto;
}

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

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    transition: 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.skill-category.full-width {
    grid-column: 1 / -1;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.skill-tag:hover {
    background: var(--accent-secondary);
    color: #000;
    border-color: transparent;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: 0.3s;
}

.cert-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 6px 20px rgba(0, 255, 157, 0.12);
}

.cert-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}


.cert-body {
    flex: 1;
}

.cert-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-secondary);
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.cert-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.65;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cert-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: 0.2s;
    flex-shrink: 0;
}

.cert-link:hover {
    background: var(--accent-primary);
    color: #000;
}

/* Experience Section */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--bg-color);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 1;
}

.job-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.job-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.role {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.company {
    color: var(--accent-secondary);
    margin-left: 0.5rem;
}

.date {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    opacity: 0.7;
}

.location {
    font-size: 0.9rem;
    opacity: 0.7;
    display: block;
    margin-top: 0.2rem;
}

.job-details li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

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

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(0, 255, 157, 0.15);
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-icon {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.project-header h3 {
    font-size: 1.15rem;
    color: var(--accent-secondary);
    line-height: 1.4;
}

.project-details {
    list-style: none;
}

.project-details li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.project-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.project-status.completed {
    background: rgba(0, 255, 157, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.project-status.in-progress {
    background: rgba(255, 189, 46, 0.1);
    color: #ffbd2e;
    border: 1px solid #ffbd2e;
}

.project-footer {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.project-github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    background: transparent;
    transition: 0.3s;
    text-transform: none;
    letter-spacing: 0;
}

.project-github-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

/* Contact */
.contact-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.contact-info h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-secondary);
}

.contact-info a {
    font-size: 1.1rem;
    font-family: var(--font-mono);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: inherit;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-social-sidebar {
        display: none;
    }

    .navbar {
        padding: 0 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        font-size: 1.5rem;
    }

    .hero-section {
        padding: 0 5%;
        justify-content: center;
        text-align: center;
    }

    #hero-name {
        font-size: 2.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .stat-grid {
        justify-content: center;
    }

    .about-grid,
    .contact-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .container {
        padding: 4rem 5%;
    }

    /* Mobile Nav Dropdown */
    .nav-links.active {
        display: flex !important;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: #0a0a0f;
        /* Explicit solid background */
        flex-direction: column;
        padding: 2rem 0;
        border-bottom: 1px solid var(--accent-primary);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        z-index: 1001;
    }

    .nav-links.active a {
        padding: 1rem 0;
        width: 100%;
        text-align: center;
        font-size: 1.2rem;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 0;
    border: 1px solid var(--accent-primary);
    width: 90%;
    max-width: 1000px;
    height: 90%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.close-modal {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

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

.modal-body {
    flex: 1;
    padding: 0;
    background: #525659;
    /* PDF Viewer neutral bg */
    overflow: hidden;
}

.modal-body iframe {
    border: none;
    width: 100%;
    height: 100%;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
}

/* Toast Notification */
#form-status {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    min-height: 1.5rem;
    transition: 0.3s;
}

#form-status.success {
    color: var(--accent-primary);
}

#form-status.error {
    color: #ff5f56;
}