* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0e27;
    --bg-card: #111827;
    --accent-cyan: #00f0ff;
    --accent-green: #00ff88;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --border-color: #1f2937;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Menu Button */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 2px solid var(--accent-cyan);
    border-radius: 4px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    transition: all 0.3s;
}

.menu-btn:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.menu-btn span {
    width: 30px;
    height: 3px;
    background: var(--accent-cyan);
    transition: all 0.3s;
}

.menu-btn:hover span {
    background: var(--accent-green);
}

/* Table of Contents Menu */
.toc-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 2px solid var(--accent-cyan);
    z-index: 999;
    padding: 80px 30px 30px;
    transition: left 0.3s ease;
    overflow-y: auto;
}

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

.toc-menu h3 {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.toc-menu ul {
    list-style: none;
    padding: 0;
}

.toc-menu li {
    margin-bottom: 15px;
}

.toc-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: block;
    padding: 10px;
    border-left: 3px solid transparent;
}

.toc-menu a:hover {
    color: var(--accent-green);
    border-left-color: var(--accent-green);
    padding-left: 20px;
}

.toc-menu a.active {
    color: var(--accent-green);
    border-left-color: var(--accent-green);
    padding-left: 20px;
    background: rgba(0, 255, 136, 0.1);
}

#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

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

section {
    padding: 100px 0;
    position: relative;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    white-space: nowrap;
}

.glitch {
    position: relative;
}

.glitch span {
    display: inline-block;
    animation: glitch-letter 2s infinite;
    animation-delay: var(--delay);
}

@keyframes glitch-letter {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(-3px, 3px); }
    92% { transform: translate(3px, -3px); }
    93% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    95% { transform: translate(-3px, 1px); }
}

#hero h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-cyan);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--accent-green);
    color: var(--bg-dark);
    font-weight: 600;
}

.btn-secondary:hover {
    box-shadow: 0 0 20px var(--accent-green);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-outline:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

/* Section Titles */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 50px;
    color: var(--text-primary);
}

.collapsible-section {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.collapsible-section:hover {
    color: var(--accent-green);
}

.section-arrow {
    font-size: 0.6em;
    transition: transform 0.3s;
    margin-left: 20px;
}

.collapsible-section.collapsed .section-arrow {
    transform: rotate(-90deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.section-content.expanded {
    max-height: 20000px;
}

.accent {
    color: var(--accent-green);
}

/* About Section */
.about-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

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

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

.skill-category:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateY(-5px);
}

.skill-category h3 {
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: var(--bg-dark);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.skill-tags span:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

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

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

.project-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    transform: translateY(-5px);
}

.project-card h3 {
    color: var(--accent-cyan);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

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

/* Experience Section */
.experience-grid {
    display: grid;
    gap: 30px;
}

.experience-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-cyan);
    transition: all 0.3s;
    cursor: pointer;
}

.experience-card:hover {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateX(5px);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exp-header h3 {
    color: var(--accent-cyan);
    font-size: 1.5rem;
}

.year {
    color: var(--accent-green);
    font-weight: 600;
}

.experience-card h4 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.experience-card ul {
    list-style: none;
    padding-left: 0;
}

.experience-card li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.experience-card li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-green);
}

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

.cert-card {
    background: var(--bg-dark);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

.cert-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: scale(1.05);
}

.cert-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.cert-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* References Section */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.reference-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
}

.reference-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateY(-5px);
}

.quote-icon {
    font-size: 4rem;
    color: var(--accent-green);
    line-height: 1;
    margin-bottom: 15px;
    opacity: 0.3;
}

.reference-quote {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}

.reference-author h4 {
    color: var(--accent-cyan);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.reference-author p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reference-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-cyan);
    margin-bottom: 15px;
}

/* Contact Section */
#contact {
    text-align: center;
}

.contact-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 15px 40px;
    background: var(--bg-card);
    color: var(--accent-cyan);
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid var(--accent-cyan);
    transition: all 0.3s;
    font-size: 1.1rem;
}

.contact-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--accent-cyan);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .container {
        padding: 0 15px;
    }

    #hero h1 {
        font-size: 2.2rem !important;
        white-space: normal;
        line-height: 1.3;
        word-spacing: 0.2rem;
    }

    #hero h2 {
        font-size: 1.5rem;
        line-height: 1.4;
    }

    .subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

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

    .btn {
        width: 100%;
        max-width: 300px;
        font-size: 0.9rem;
        padding: 12px 25px;
    }

    .skills-grid,
    .projects-grid,
    .cert-grid,
    .references-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-category,
    .project-card,
    .experience-card,
    .cert-card,
    .reference-card {
        padding: 20px;
    }

    .skill-category h3,
    .project-card h3 {
        font-size: 1.2rem;
    }

    .about-content p,
    .project-card p,
    .reference-quote {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .menu-btn {
        width: 45px;
        height: 45px;
    }

    .toc-menu {
        width: 250px;
    }

    .reference-photo {
        width: 60px;
        height: 60px;
    }

    .exp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 1.8rem !important;
    }

    #hero h2 {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 1.05rem;
    }

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

    .btn {
        font-size: 0.85rem;
        padding: 10px 20px;
    }

    .skill-tags span {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .toc-menu {
        width: 220px;
    }

    .menu-btn {
        width: 40px;
        height: 40px;
        top: 15px;
        left: 15px;
    }
}
