@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #00ff41;
    --secondary-green: #00cc33;
    --dark-bg: #0a0a0a;
    --terminal-bg: #1a1a1a;
    --border-color: #333;
    --text-color: #00ff41;
    --secondary-text: #888;
}

body {
    font-family: 'Fira Code', monospace;
    background: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Matrix rain background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    animation: glitch 2s infinite;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    box-shadow: 0 0 10px var(--primary-green);
}

.download-btn {
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.download-btn:hover {
    background: var(--primary-green);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--primary-green);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border: 1px solid var(--primary-green);
    border-radius: 4px;
    background: transparent;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    box-shadow: 0 0 10px var(--primary-green);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--primary-green);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 1rem;
    gap: 0;
}

.mobile-nav-links li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-links li:last-child {
    border-bottom: none;
}

.mobile-nav-links a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-links a:hover {
    color: var(--primary-green);
    background: rgba(0, 255, 65, 0.1);
    border-left-color: var(--primary-green);
    transform: translateX(10px);
}

.mobile-download-btn {
    display: block;
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    margin: 1rem;
    border-radius: 4px;
}

.mobile-download-btn:hover {
    background: var(--primary-green);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--primary-green);
}

/* Main content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-top: 80px;
}

.section {
    margin: 4rem 0;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards;
}

.section:nth-child(2) {
    animation-delay: 0.2s;
}

.section:nth-child(3) {
    animation-delay: 0.4s;
}

.section:nth-child(4) {
    animation-delay: 0.6s;
}

.section:nth-child(5) {
    animation-delay: 0.8s;
}

.section:nth-child(6) {
    animation-delay: 1s;
}

.section:nth-child(7) {
    animation-delay: 1.2s;
}

.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
}

.terminal-header {
    background: #333;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27ca3f;
}

.terminal-content {
    padding: 2rem;
}

.typing-text {
    overflow: hidden;
    border-right: 3px solid var(--primary-green);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}


/* Terminal styling */
.terminal-window {
    background-color: #111;
    border: 1px solid #444;
    border-radius: 8px;
    font-family: monospace;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.terminal-header {
    background: #222;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.dot-red {
    background-color: #ff5f56;
}

.dot-yellow {
    background-color: #ffbd2e;
}

.dot-green {
    background-color: #27c93f;
}

.terminal-content {
    padding: 1rem;
    color: #00ff00;
    background-color: #111;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #222;
}

#terminal-input {
    width: 100%;
    padding: 1rem;
    border: none;
    background-color: #000;
    color: #00ff00;
    font-size: 1rem;
    border-top: 1px solid #333;
    outline: none;
    font-family: monospace;
}

#terminal-input::placeholder {
    color: #555;
}


/* Home section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-green), var(--secondary-green));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glitch 3s infinite;
}

.hero p {
    font-size: 1.2rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--primary-green);
    color: var(--dark-bg);
    box-shadow: 0 0 30px var(--primary-green);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Section titles */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-green);
    position: relative;
}

.section-title::before {
    content: '$ ';
    color: var(--primary-green);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--primary-green);
    animation: expand 2s ease-in-out infinite;
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    transform: translateY(-5px);
}

.skill-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
    border-radius: 4px;
    animation: loadSkill 2s ease-in-out;
}

/* Experience timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-green);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    background: var(--terminal-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-left: 2rem;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 12px;
    height: 12px;
    background: var(--primary-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-green);
}

.timeline-date {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--secondary-text);
    margin-bottom: 1rem;
}

/* Projects grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    transform: translateY(-10px);
}

.project-header {
    background: #333;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-content {
    padding: 2rem;
}

.project-title {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: rgba(0, 255, 65, 0.1);
    color: var(--primary-green);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--primary-green);
}

.project-links {
    margin-top: 1rem;
}

.project-links a,
.cert-card a {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    margin: 0.3rem 0.6rem 0 0;
    border: 1px solid var(--primary-green);
    border-radius: 4px;
    color: var(--primary-green);
    background-color: transparent;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.project-links a:hover,
.cert-card a:hover {
    background-color: var(--primary-green);
    color: #000;
    text-shadow: none;
    transform: scale(1.05);
}


/* Certificates */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cert-card {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '🏆';
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.cert-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.2);
}

.cert-card a {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.cert-card a:hover {
    text-shadow: 0 0 5px var(--primary-green);
}

/* Contact section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    background: var(--terminal-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 255, 65, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(10px);
}

.contact-item a {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    text-shadow: 0 0 5px var(--primary-green);
}

/* Animations */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--primary-green);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glitch {

    0%,
    100% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(-2px) skew(-1deg);
    }

    20% {
        transform: translateX(2px) skew(1deg);
    }

    30% {
        transform: translateX(-1px) skew(-0.5deg);
    }

    40% {
        transform: translateX(1px) skew(0.5deg);
    }

    50% {
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes expand {

    0%,
    100% {
        width: 100px;
    }

    50% {
        width: 200px;
    }
}

@keyframes loadSkill {
    from {
        width: 0;
    }

    to {
        width: var(--skill-width);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item {
        margin-left: 1rem;
    }

    .timeline-item::before {
        left: -2rem;
    }

    .terminal-content {
        padding: 1rem;
    }

    .nav {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .project-content {
        padding: 1rem;
    }

    .skill-card {
        padding: 1rem;
    }

    .cert-card {
        padding: 1rem;
    }
}

/* Matrix rain effect */
.matrix-char {
    position: absolute;
    color: var(--primary-green);
    font-size: 14px;
    animation: matrixRain 3s linear infinite;
}

@keyframes matrixRain {
    0% {
        opacity: 1;
        transform: translateY(-100vh);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh);
    }
}