/* --- VARIABLES & BASE STYLES --- */
:root {
    --bg-dark: #121212;
    --bg-medium: #1A1A1A;
    --bg-light: #242424;
    --text-light: #E0E0E0;
    --text-muted: #888888;
    --accent: #FF6B00; /* Vibrant Orange */
    --font-primary: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ANIMATIONS & UTILITIES --- */
.kenburns-top {
    -webkit-animation: kenburns-top 5s ease-out both;
            animation: kenburns-top 5s ease-out both;
}

/**
 * ----------------------------------------
 * animation kenburns-top
 * ----------------------------------------
 */
@keyframes kenburns-top {
  0% {
    -webkit-transform: scale(1) translateY(0);
            transform: scale(1) translateY(0);
    -webkit-transform-origin: 50% 16%;
            transform-origin: 50% 16%;
  }
  100% {
    -webkit-transform: scale(1.25) translateY(-15px);
            transform: scale(1.25) translateY(-15px);
    -webkit-transform-origin: top;
            transform-origin: top;
  }
}

/**
 * ----------------------------------------
 * animation zoom-in-effect
 * ----------------------------------------
 */
@keyframes zoom-in-effect {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.1);
  }
}

/**
 * ----------------------------------------
 * animation pop-in (For Profile Picture)
 * ----------------------------------------
 */
@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}


/* --- NAVIGATION BAR --- */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF6B00;
    text-decoration: none;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}


/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden; /* Hide the zoomed-out parts of the background */
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/circuit-background.png') no-repeat center center;
    background-size: cover;
    z-index: -2;
    animation: zoom-in-effect 15s ease-out forwards;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(7px);
    z-index: -1;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    z-index: 2;
    position: relative;
}

.hero-intro {
    color: var(--text-light);
    font-size: 1.5rem;
    position: relative;
    padding-left: 70px;
    margin-bottom: 0.5rem;
}

.hero-intro::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 50px;
    height: 2px;
    background-color: var(--accent);
}

.hero-text h1 {
    font-size: 4.5rem;
    color: #FF6B00;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--text-muted);
}

.hero-buttons {
    margin-top: 2rem;
}

.btn {
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.2);
}

.btn-secondary {
    border: 1px solid var(--text-muted);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

.hero-image .image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    /* Apply the pop-in animation here */
    animation: pop-in 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s both;
}

.hero-image .image-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent);
    border-radius: 50%;
    top: 0px;
    left: -2px;
    z-index: 2;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    top:2.5px;
    position: relative;
    z-index: 2;
}

/* --- SKILLS BAR --- */
.skills-bar {
    background-color: var(--bg-medium);
    padding: 1.5rem 0;
}

.skills-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
}

/* --- ABOUT SECTION --- */
.about {
    padding: 6rem 0;
}

.about-container {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-services {
    flex: 1;
    position: relative;
    padding-left: 20px;
}

.about-services::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--bg-light);
}

.service-item {
    margin-bottom: 2rem;
    position: relative;
    padding-left: 20px; 
}
.service-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.service-item h3 {
    font-size: 1.2rem;
    color: white;
}
.service-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--bg-light);
    background-color: var(--bg-dark);
}

.about-text {
    flex: 2;
}

.about-text h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

/* --- PROJECTS SECTION --- */
.projects {
    padding: 6rem 0;
    background-color: var(--bg-medium);
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.project-links {
    margin-top: 1rem;
}

.project-links a {
    color: var(--accent);
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 600;
}

/* --- CERTIFICATIONS SECTION --- */
.certifications {
    padding: 6rem 0;
}

.certifications h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-top: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.cert-card h3 {
    color: white;
    margin-bottom: 0.5rem;
    padding-left: 30px;
    position: relative;
}

.cert-card h3::before {
    content: '\f0a3'; 
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent);
    position: absolute;
    left: 0;
    top: 2px;
}

/* --- FOOTER --- */
.footer {
    padding: 4rem 0;
    text-align: center;
}
.footer h2 {
    font-size: 2rem;
}

/* --- SOCIAL LINKS IN FOOTER --- */
.footer-social {
    margin: 2rem 0;
}
.footer-social a {
    color: var(--text-muted);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}
.footer-social a:hover {
    color: var(--accent);
}

/* --- FOOTER COPYRIGHT TEXT --- */
.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* --- CONTACT FORM STYLES --- */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #333;
    background-color: var(--bg-light);
    color: var(--text-light);
    font-family: var(--font-primary);
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form button {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none; /* Hidden by default */
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 1rem;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.active {
    display: block;
    opacity: 1;
    visibility: visible;
}


/* --- RESPONSIVE DESIGN --- */
@media(max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-intro {
        padding-left: 0;
    }
    .hero-intro::before {
        display: none;
    }
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    .about-services::before, .service-item::before {
        display: none;
    }
    .about-services {
        display: flex;
        gap: 2rem;
        padding-left: 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 5rem;
        flex-direction: column;
        background-color: var(--bg-medium);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-link {
        margin: 1.5rem 0;
    }
    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .hero-text h1 {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.5rem;
    }
    .hero-image .image-wrapper {
        width: 280px;
        height: 280px;
    }
    .about-services {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
    .service-item {
        text-align: center;
        padding-left: 0;
    }
}