/* ===== BASE & VARIABLES ===== */
:root {
    --bg-color: #080808; /* Deep rich black */
    --second-bg-color: #131313;
    --text-color: #ededed;
    --text-muted: #a0a0a0;
    --main-color: #00e0ff; /* Electric cyan */
    --accent-color: #7d2ae8; /* Deep purple */
    --gradient: linear-gradient(90deg, var(--main-color), var(--accent-color));
    
    --bg-glass: rgba(19, 19, 19, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
}

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

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

section {
    min-height: 100vh;
    padding: 8rem 9% 2rem;
}

span {
    color: transparent;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

.heading {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 3rem;
}

/* ===== HEADER & NAVBAR ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 9%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: 0.3s;
}

.header.sticky {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 9%;
}

.logo {
    font-size: 2rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: default;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.navbar a {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-left: 3rem;
    font-weight: 500;
    transition: 0.3s;
    position: relative;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.navbar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

#menu-icon {
    font-size: 2.5rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

/* ===== HERO SECTION ===== */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-content .greeting {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-content .name {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.hero-content .role {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.hero-content .summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

/* Social Links */
.social-links {
    margin-bottom: 2.5rem;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--main-color);
    margin-right: 1.2rem;
    transition: 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient);
    z-index: -1;
    transition: 0.4s ease;
}

.social-links a:hover {
    color: var(--bg-color);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 224, 255, 0.4);
}

.social-links a:hover::before {
    width: 100%;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    border-radius: 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: 0.4s;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(125, 42, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.5);
}

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

.btn-secondary:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 224, 255, 0.3);
}

/* Hero Profile Photo */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 1;
}

.profile-wrapper {
    width: 270px;
    height: 270px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box, 
                var(--gradient) border-box;
    box-shadow: 0 0 30px rgba(125, 42, 232, 0.4), 0 0 60px rgba(0, 224, 255, 0.4);
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s ease;
}

.profile-container:hover .profile-wrapper {
    box-shadow: 0 0 50px rgba(125, 42, 232, 0.6), 0 0 100px rgba(0, 224, 255, 0.6);
    transform: scale(1.02);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 90%; 
    transform: translate(8%, -12%) scale(1.7);
    transform-origin: center center;
}

.glow-ring {
    position: absolute;
    width: 310px;
    height: 310px;
    border: 2px dashed rgba(0, 224, 255, 0.5);
    border-radius: 50%;
    animation: rotate 15s linear infinite;
    z-index: 1;
    border-top: 2px solid var(--accent-color);
    border-bottom: 2px solid var(--main-color);
}

/* Animations */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}

.timeline-box {
    flex: 1;
    min-width: 300px;
    background: var(--bg-glass);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: 0.4s ease;
}

.timeline-box:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 224, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.1);
}

.timeline-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-title i {
    color: var(--main-color);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
    border-left: 2px solid var(--main-color);
}

.timeline-item:last-child {
    padding-bottom: 0;
    border-left: 2px solid transparent;
}

.timeline-dot {
    position: absolute;
    left: -11px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--main-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--main-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--main-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-item p, .timeline-item ul {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.timeline-item ul {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
}

/* ===== SKILLS SECTION ===== */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.skills-box {
    flex: 1;
    min-width: 300px;
    background: var(--bg-glass);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    transition: 0.4s ease;
}

.skills-box:hover {
    transform: translateY(-5px);
    border-color: rgba(125, 42, 232, 0.3);
    box-shadow: 0 0 30px rgba(125, 42, 232, 0.1);
}

.skills-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.tag {
    padding: 0.6rem 1.2rem;
    background: rgba(0, 224, 255, 0.08); /* slight cyan tint */
    border: 1px solid rgba(0, 224, 255, 0.2);
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: 0.3s ease;
    cursor: default;
}

.tag:hover {
    background: var(--gradient);
    border-color: transparent;
    color: var(--bg-color);
    font-weight: 600;
    transform: translateY(-2px);
}

.certifications-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s ease;
}

.cert-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 0 15px rgba(0, 224, 255, 0.2);
    transform: translateX(5px);
}

.cert-card i {
    font-size: 2.5rem;
    color: var(--main-color);
}

.cert-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.cert-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cert-info small {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* ===== PROJECTS SECTION ===== */
.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.portfolio-box {
    position: relative;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    background: var(--second-bg-color);
    border: 1px solid var(--border-glass);
    height: 300px;
    transition: 0.5s ease;
}

.portfolio-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.2);
    border-color: var(--main-color);
}

.portfolio-layer {
    width: 100%;
    height: 100%;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.1), rgba(125, 42, 232, 0.1));
    transition: 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
    background: linear-gradient(rgba(0,0,0,0.4), var(--accent-color));
}

.portfolio-layer h4 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    transition: 0.3s ease;
}

.portfolio-box:hover .portfolio-layer h4 {
    color: #fff;
}

.portfolio-layer .tech-stack {
    font-size: 0.9rem;
    color: var(--main-color);
    font-weight: 600;
    margin-bottom: 1rem;
    background: rgba(0, 224, 255, 0.1);
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    align-self: flex-start;
}

.portfolio-layer p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: var(--text-color);
    border-radius: 50%;
    margin-top: auto;
    align-self: flex-end;
    transition: 0.4s ease;
}

.portfolio-layer a i {
    font-size: 1.5rem;
    color: var(--bg-color);
}

.portfolio-box:hover .portfolio-layer a {
    background: var(--main-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--main-color);
}

/* ===== SERVICES SECTION ===== */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-box {
    background: var(--bg-glass);
    padding: 3rem 2rem 4rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-glass);
    transition: 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    fill: transparent;
    height: 0%;
    background: var(--gradient);
    z-index: -1;
    transition: 0.4s ease;
    opacity: 0.1;
}

.service-box:hover::after {
    height: 100%;
}

.service-box:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(125, 42, 232, 0.2);
}

.service-box i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    transition: 0.4s ease;
}

.service-box:hover i {
    color: #fff;
    transform: scale(1.1);
}

.service-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: 0.4s ease;
}

.service-box:hover h3 {
    color: #fff;
}

.service-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    transition: 0.4s ease;
}

.service-box:hover p {
    color: #eee;
}

/* ===== CONTACT SECTION ===== */
.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-glass);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.2rem;
    font-size: 1rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-glass);
    transition: 0.3s ease;
}

.contact form .input-box input {
    width: calc(50% - 0.75rem);
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.2);
    outline: none;
}

.contact form textarea {
    resize: none;
    height: 200px;
}

.contact form .btn {
    margin-top: 1rem;
    cursor: pointer;
    border: none;
    width: 100%;
    font-size: 1.2rem;
}

/* ===== FOOTER ===== */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2.5rem 9%;
    background: var(--second-bg-color);
    border-top: 1px solid var(--border-glass);
}

.footer-text p {
    font-size: 1rem;
    color: var(--text-muted);
}

.footer-contact {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color) !important;
}

.footer-contact i {
    color: var(--main-color);
    margin-right: 0.3rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem;
    background: var(--main-color);
    border-radius: 50%;
    transition: 0.4s ease;
}

.footer-iconTop a i {
    font-size: 1.5rem;
    color: var(--bg-color);
}

.footer-iconTop a:hover {
    box-shadow: 0 0 20px var(--main-color);
    transform: translateY(-5px);
}

/* ===== SUCCESS POPUP ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-box {
    background: var(--bg-glass);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 0 30px rgba(0, 224, 255, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: 0.3s ease;
}

.popup-overlay.active .popup-box {
    transform: scale(1);
}

.popup-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

.popup-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.popup-box p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .header { padding: 1.5rem 5%; }
    .header.sticky { padding: 1rem 5%; }
    section { padding: 8rem 5% 2rem; }
    .footer { padding: 2rem 5%; }
}

@media (max-width: 768px) {
    #menu-icon { display: block; }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 5%;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-glass);
        border-bottom: 1px solid var(--border-glass);
        display: none;
        flex-direction: column;
    }

    .navbar.active {
        display: flex;
    }

    .navbar a {
        display: block;
        font-size: 1.2rem;
        margin: 1rem 0;
        text-align: center;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 6rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        margin: 0 0.6rem;
    }

    .btn-group {
        justify-content: center;
    }
    
    .profile-container {
        width: 250px;
        height: 250px;
    }
    
    .profile-wrapper { 
        width: 210px; 
        height: 210px; 
    }
    
    .glow-ring {
        width: 230px;
        height: 230px;
    }
    
    .contact form .input-box input {
        width: 100%;
    }
}

@media (max-width: 450px) {
    .hero-content .name { font-size: 3rem; }
    .hero-content .role { font-size: 1.5rem; }
    .btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; margin-bottom: 0.5rem; }
    
    .footer {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        gap: 1.5rem;
    }
}
