:root {
    --matrix-green: #00ff41;
    --matrix-dark: #0a0a0a;
    --matrix-darker: #050505;
    --matrix-light: #003b00;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --glow: 0 0 10px var(--matrix-green), 0 0 20px var(--matrix-green);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--matrix-darker);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: transparent;
    color: var(--matrix-green);
    border: 2px solid var(--matrix-green);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn:hover {
    color: var(--matrix-dark);
    box-shadow: var(--glow);
    transform: translateY(-5px);
}

.btn:hover:before {
    left: 100%;
}

.btn:hover:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--matrix-green);
    z-index: -1;
}

/* Matrix Background */
#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navigation */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.nav-container.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--matrix-green);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--matrix-green);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--matrix-green);
}

.nav-links a:hover:after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--matrix-green);
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
    opacity: 0;
    animation: fadeUp 1s ease 0.5s forwards;
}

.hero-title span {
    color: var(--matrix-green);
    text-shadow: var(--glow);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeUp 1s ease 0.8s forwards;
}

.hero-btns {
    opacity: 0;
    animation: fadeUp 1s ease 1.1s forwards;
}

.hero-btns .btn {
    margin-right: 20px;
    margin-bottom: 20px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    opacity: 0;
    animation: fadeIn 1s ease 1.4s forwards;
}

.matrix-terminal {
    width: 500px;
    height: 400px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--matrix-green);
    border-radius: 10px;
    box-shadow: var(--glow);
    overflow: hidden;
    font-family: 'Courier New', monospace;
    position: relative;
}

.terminal-header {
    background: var(--matrix-green);
    color: var(--matrix-dark);
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.terminal-body {
    padding: 20px;
    height: calc(100% - 50px);
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 10px;
    line-height: 1.4;
}

.terminal-prompt {
    color: var(--matrix-green);
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: var(--matrix-green);
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 5px;
}

/* About Section */
.about {
    background: rgba(5, 5, 5, 0.7);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-visual {
    position: relative;
}

.cyber-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--matrix-green);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--glow);
    position: relative;
    overflow: hidden;
    transform: translateX(-50px);
    opacity: 0;
    transition: all 1s ease;
}

.cyber-card.visible {
    transform: translateX(0);
    opacity: 1;
}

.cyber-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--matrix-green), #00cc33, var(--matrix-green));
    z-index: -1;
    border-radius: 10px;
    animation: borderGlow 3s linear infinite;
    background-size: 400%;
}

.cyber-card:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: rgba(10, 10, 10, 0.9);
    border-radius: 8px;
    z-index: -1;
}

.about-text {
    transform: translateX(50px);
    opacity: 0;
    transition: all 1s ease;
}

.about-text.visible {
    transform: translateX(0);
    opacity: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--matrix-green);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.info-list {
    list-style: none;
    margin-top: 30px;
}

.info-list li {
    margin-bottom: 15px;
    display: flex;
}

.info-list .first-block {
    min-width: 150px;
    color: var(--matrix-green);
    font-weight: 600;
}

/* Experience Section */
.experience {
    background: rgba(5, 5, 5, 0.5);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--matrix-green);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background: var(--matrix-green);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--glow);
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--matrix-green);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    box-shadow: var(--glow);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -13px;
    background-color: var(--matrix-dark);
    border: 4px solid var(--matrix-green);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: var(--glow);
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--matrix-green);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--glow);
    transform: translateY(-5px);
}

.timeline-content h3 {
    color: var(--matrix-green);
    margin-bottom: 10px;
}

.timeline-content .company {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 15px;
    display: block;
}

/* Certification Badge Styles */
.cert-badge {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    vertical-align: middle;
    border-radius: 5px;
    border: 1px solid var(--matrix-green);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.cert-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cert-text {
    flex: 1;
}

/* Timeline Section Header */
.timeline-section-header {
    text-align: center;
    margin: 40px 0;
    position: relative;
    width: 100%;
}

.timeline-section-title {
    font-size: 2rem;
    color: var(--matrix-green);
    display: inline-block;
    background: rgba(5, 5, 5, 0.9);
    padding: 10px 30px;
    border: 1px solid var(--matrix-green);
    border-radius: 5px;
    box-shadow: var(--glow);
    z-index: 2;
    position: relative;
}

/* Skills Section */
.skills {
    background: rgba(5, 5, 5, 0.7);
}

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

.skill-category {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--matrix-green);
    border-radius: 10px;
    padding: 30px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(50px);
}

.skill-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-category:hover {
    box-shadow: var(--glow);
    transform: translateY(-10px);
}

.skill-category h3 {
    color: var(--matrix-green);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.skill-item {
    background: rgba(0, 255, 65, 0.1);
    color: var(--matrix-green);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 65, 0.3);
    transition: var(--transition);
}

.skill-item:hover {
    background: rgba(0, 255, 65, 0.2);
    transform: translateY(-3px);
}

/* Contact Section */
.contact {
    background: rgba(5, 5, 5, 0.5);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--matrix-green);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(10, 10, 10, 0.6);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 65, 0.1);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--matrix-green);
    box-shadow: var(--glow);
    transform: translateY(-5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--matrix-green);
    font-size: 1.5rem;
    border: 1px solid rgba(0, 255, 65, 0.3);
    transition: var(--transition);
    flex-shrink: 0;
}

.contact-item:hover .contact-icon {
    background: rgba(0, 255, 65, 0.2);
    transform: rotate(15deg) scale(1.1);
}

.contact-details h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text);
}

.contact-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Contact Form */
.contact-form {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--matrix-green);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-form:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--matrix-green), #00cc33, var(--matrix-green));
    z-index: -1;
    border-radius: 15px;
    animation: borderGlow 3s linear infinite;
    background-size: 400%;
}

.contact-form:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: rgba(10, 10, 10, 0.95);
    border-radius: 13px;
    z-index: -1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Exo 2', sans-serif;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--matrix-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    display: flex;
    justify-content: center;
}

.form-submit .btn {
    padding: 15px 50px;
    font-size: 1rem;
}

/* Footer - IMPROVED VERSION */
footer {
    background: rgba(5, 5, 5, 0.98);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(0, 255, 65, 0.1);
    position: relative;
    overflow: hidden;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--matrix-green), transparent);
    box-shadow: 0 0 10px var(--matrix-green);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 10px;
}

.footer-logo .logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--matrix-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
}

.footer-logo .logo span {
    color: var(--text);
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--matrix-green);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid rgba(0, 255, 65, 0.3);
    position: relative;
    overflow: hidden;
}

.social-link:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.3), transparent);
    transition: 0.5s;
}

.social-link:hover {
    background: rgba(0, 255, 65, 0.2);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--glow);
}

.social-link:hover:before {
    left: 100%;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

.footer-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    background: var(--matrix-green);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--matrix-green);
}

.footer-links a:hover:after {
    width: 100%;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.3), transparent);
    margin: 30px 0;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.copyright .footer-note {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 10px;
}

.copyright .footer-note i {
    margin: 0 5px;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes borderGlow {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Matrix Rain */
.matrix-char {
    color: var(--matrix-green);
    text-shadow: 0 0 8px var(--matrix-green);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.2rem;
    }
    
    .matrix-terminal {
        width: 400px;
        height: 350px;
    }
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        margin-bottom: 60px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 18px;
    }

    .timeline-item:nth-child(even)::after {
        left: 18px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 80px;
        transition: var(--transition);
    }

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

    .nav-links li {
        margin: 20px 0;
    }

    .hamburger {
        display: block;
    }

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

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

    .matrix-terminal {
        width: 100%;
        height: 300px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-badge {
        width: 60px;
        height: 60px;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .social-links {
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.8rem;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .cert-badge {
        width: 50px;
        height: 50px;
    }
    
    .footer-logo .logo {
        font-size: 1.8rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}
