/* =========================================
   1. GLOBAL VARIABLES & RESET
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-color: #FFD700;
    --primary-glow: rgba(255, 215, 0, 0.4);
    --bg-color: #000000;
    --card-bg: rgba(20, 20, 20, 0.6);
    --text-color: #E0E0E0;
    --heading-color: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }
::-webkit-scrollbar { display: none; }
html { scrollbar-width: none; -ms-overflow-style: none; }

body {
    background: radial-gradient(circle at 50% 0%, #1a1500 0%, #000000 85%);
    background-attachment: fixed; color: var(--text-color); line-height: 1.6; min-height: 100vh; overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--heading-color); margin-bottom: 1rem; font-weight: 600; }
a { text-decoration: none; color: var(--primary-color); transition: var(--transition); }
.highlight { color: var(--primary-color); text-shadow: 0px 0px 15px var(--primary-glow); }

/* --- BUTTONS --- */
.btn {
    display: inline-block; padding: 12px 30px; border: 1px solid var(--primary-color);
    color: var(--primary-color); border-radius: 4px; background: transparent; cursor: pointer;
    font-weight: 600; letter-spacing: 0.5px; transition: var(--transition);
    box-shadow: 0 0 10px rgba(0,0,0,0.5); text-align: center; position: relative; overflow: hidden;
}
.btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 215, 0, 0.2), transparent); transition: 0.5s;
}
.btn:hover::before { left: 100%; }
.btn:hover { background-color: var(--primary-color); color: #000; box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow); transform: translateY(-3px); }

.btn-secondary { border: 1px solid #555; color: #fff; display: inline-block; padding: 12px 30px; border-radius: 4px; transition: var(--transition); }
.btn-secondary:hover { border-color: var(--primary-color); color: var(--primary-color); box-shadow: 0 0 15px rgba(255, 215, 0, 0.1); }

.btn-resume { border: 1px solid var(--primary-color); padding: 8px 20px; border-radius: 50px; color: #000 !important; background-color: var(--primary-color); font-weight: 600; }
.btn-resume:hover { background-color: #fff; color: #000 !important; box-shadow: 0 0 15px rgba(255, 255, 255, 0.5); transform: scale(1.05); }

/* --- NAVBAR --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 50px;
    background-color: rgba(0, 0, 0, 0.8); position: fixed; width: 100%; top: 0;
    z-index: 1000; backdrop-filter: blur(15px); border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}
.logo { font-size: 1.8rem; font-weight: 700; color: var(--heading-color); letter-spacing: 1px; }
.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li { margin-left: 30px; }
.nav-links a { color: #ccc; font-size: 0.95rem; font-weight: 400; position: relative; padding-bottom: 5px; }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: var(--primary-color); transition: width 0.3s ease-in-out;
    box-shadow: 0 0 10px var(--primary-glow);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--primary-color); text-shadow: 0 0 10px var(--primary-glow); }
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 3px; background-color: var(--heading-color); margin: 5px; }

/* --- HERO --- */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 160px; width: 100%; }
.hero-content { max-width: 900px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

/* =========================================
   UPDATED PROFILE IMAGE LOGIC
   1. The Container = The Shape + Border + Glow
   2. The Image = Content inside with overflow hidden
========================================= */

.profile-container {
    display: block;
    margin: 0 auto 30px auto;
    width: 250px; /* Frame Size */
    height: 250px;

    /* The Squircle Shape */
    border-radius: 40px;

    /* The Golden Border */
    border: 5px solid var(--primary-color);

    /* The Glow */
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);

    /* CRITICAL: This keeps the image INSIDE the border */
    overflow: hidden;

    /* Levitation Animation on the Container */
    animation: float 6s ease-in-out infinite;
    background: #000;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills the box perfectly */
    display: block;
    transition: transform 0.5s ease;
}

/* Hover Effect */
.profile-container:hover {
    border-color: #fff;
    box-shadow: 0 0 70px rgba(255, 215, 0, 0.8);
    animation-play-state: paused;
}

.profile-container:hover .profile-img {
    transform: scale(1.1); /* Zoom the image slightly inside the frame */
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.hero h1 { font-size: 4rem; letter-spacing: -1px; margin-bottom: 10px; width: 100%; }
.hero h3 { font-size: 2rem; color: var(--primary-color); min-height: 40px; text-shadow: 0 0 20px rgba(255, 215, 0, 0.2); width: 100%; }
.hero-bio { max-width: 650px; margin: 25px auto; color: #bbb; font-size: 1.15rem; }
.hero-tech { margin-bottom: 40px; font-size: 1.5rem; color: #888; display: flex; justify-content: center; align-items: center; width: 100%; }
.hero-tech i { color: #fff; margin: 0 15px; transition: var(--transition); }
.hero-tech i:hover { color: var(--primary-color); transform: scale(1.3) rotate(5deg); text-shadow: 0 0 20px var(--primary-color); }
.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 40px; width: 100%; }
.hero-socials { display: flex; justify-content: center; width: 100%; }
.hero-socials a { font-size: 2rem; margin: 0 20px; color: #555; transition: var(--transition); }
.hero-socials a:hover { color: var(--primary-color); transform: translateY(-5px); text-shadow: 0 0 20px var(--primary-glow); }
.typing-text::after { content: "|"; animation: blink 1s infinite; color: var(--primary-color); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- SECTIONS --- */
section { padding: 100px 50px; }
.container { max-width: 1100px; margin: 0 auto; width: 100%; }
.section-title { font-size: 2.5rem; text-align: center; margin: 0 auto 60px auto; color: var(--heading-color); display: block; width: fit-content; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary-color); margin: 10px auto 0; box-shadow: 0 0 10px var(--primary-glow); transition: width 0.3s; }
.section-title:hover::after { width: 100%; }

.about-card, .contact-card { background: var(--card-bg); padding: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); text-align: center; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); margin: 0 auto; max-width: 800px; }
.skill-card { background: var(--card-bg); padding: 30px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); transition: var(--transition); text-align: center; font-size: 1.1rem; color: #fff; min-width: 150px; }
.skill-card i { display: block; font-size: 2rem; margin-bottom: 10px; color: var(--primary-color); transition: transform 0.3s; }
.skill-card:hover { border-color: var(--primary-color); transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); background: rgba(30, 30, 30, 0.8); }
.skill-card:hover i { transform: scale(1.2); }
.skills-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }

/* --- TIMELINE --- */
.projects-grid { display: flex; flex-direction: column; position: relative; gap: 60px; width: 100%; padding: 20px 0; }
.projects-grid::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: var(--primary-color); transform: translateX(-50%); box-shadow: 0 0 15px var(--primary-glow); border-radius: 2px; }
.project-card { background: var(--card-bg); padding: 30px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); transition: var(--transition); position: relative; width: calc(50% - 50px); text-align: left; cursor: pointer; }
.project-card:nth-child(odd) { align-self: flex-start; }
.project-card:nth-child(even) { align-self: flex-end; }
.project-card::after { content: ''; position: absolute; top: 50%; width: 50px; height: 4px; background: var(--primary-color); box-shadow: 0 0 10px var(--primary-glow); transform: translateY(-50%); transition: width 0.3s; }
.project-card:nth-child(odd)::after { right: -50px; }
.project-card:nth-child(even)::after { left: -50px; }
.project-card::before { content: ''; position: absolute; top: 50%; width: 20px; height: 20px; background: var(--bg-color); border: 4px solid var(--primary-color); border-radius: 50%; z-index: 2; transform: translateY(-50%); box-shadow: 0 0 15px var(--primary-glow); transition: var(--transition); }
.project-card:nth-child(odd)::before { right: -60px; }
.project-card:nth-child(even)::before { left: -60px; }
.project-card:hover { transform: translateY(-5px) scale(1.02); border-color: var(--primary-color); box-shadow: 0 0 30px rgba(0,0,0,0.8); }
.project-card:hover::before { background: var(--primary-color); box-shadow: 0 0 25px var(--primary-color); }
.project-card h3 { font-size: 1.5rem; color: var(--primary-color); }
.tech-stack span { font-size: 0.85rem; font-family: monospace; margin-right: 10px; color: #888; background: rgba(255, 255, 255, 0.05); padding: 2px 8px; border-radius: 4px; display: inline-block; }
.cert-icon { font-size: 3.5rem; color: var(--primary-color); margin-bottom: 20px; text-align: center; text-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
.click-hint { margin-top: 15px; font-size: 0.8rem; color: var(--primary-color); opacity: 0; transform: translateX(-10px); transition: var(--transition); }
.project-card:hover .click-hint { opacity: 1; transform: translateX(0); }

/* --- MODAL --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.modal.active { display: flex; opacity: 1; }
.modal-content { background-color: #000; background-size: cover; background-position: center; background-repeat: no-repeat; width: 90%; max-width: 700px; border-radius: 12px; border: 1px solid var(--primary-color); box-shadow: 0 0 40px rgba(255, 215, 0, 0.3); overflow: hidden; position: relative; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: #fff; }
.modal.active .modal-content { transform: scale(1); }
.modal-header { padding: 40px 40px 10px 40px; background: transparent; position: relative; z-index: 2; }
.modal-header h2 { font-size: 2.5rem; margin-bottom: 15px; color: var(--primary-color); text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
.modal-tech span { background: rgba(0, 0, 0, 0.6); color: var(--primary-color); padding: 5px 12px; border-radius: 4px; font-size: 0.9rem; margin-right: 8px; border: 1px solid var(--primary-color); box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.modal-body { padding: 10px 40px 50px 40px; position: relative; z-index: 2; }
#modal-desc { font-size: 1.15rem; color: #f0f0f0; margin-bottom: 30px; line-height: 1.8; text-shadow: 1px 1px 3px rgba(0,0,0,0.9); background: rgba(0, 0, 0, 0.4); padding: 15px; border-radius: 8px; backdrop-filter: blur(2px); }
.modal-actions { display: flex; gap: 15px; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 2.5rem; color: #fff; cursor: pointer; z-index: 10; text-shadow: 0 0 10px #000; transition: 0.3s; }
.close-btn:hover { color: var(--primary-color); transform: scale(1.1); }

/* =========================================
   8. CERTIFICATE LEVITATION
========================================= */
.mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.cert-levitate-card { text-align: center; padding-bottom: 40px; }
.levitate-container { position: relative; width: 100%; height: 280px; display: flex; justify-content: center; align-items: flex-end; margin-bottom: 20px; overflow: visible; }
.cert-base { display: none; }
.floating-cert { width: 80%; height: auto; max-height: 200px; object-fit: contain; border: 3px solid var(--primary-color); border-radius: 8px; box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); background-color: #000; position: relative; z-index: 3; animation: certFloat 4s ease-in-out infinite; }
.cert-shadow { position: absolute; bottom: 20px; width: 60%; height: 15px; background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.6) 0%, rgba(0,0,0,0) 70%); border-radius: 50%; filter: blur(8px); z-index: 2; animation: shadowScale 4s ease-in-out infinite; }
@keyframes certFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes shadowScale { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(0.6); opacity: 0.4; } }

.levitate-container.small-view { height: 200px; }
.levitate-container.small-view .floating-cert { max-height: 140px; width: auto; max-width: 80%; }
.levitate-container.small-view .cert-shadow { bottom: 10px; width: 50%; }

/* Modal Image */
.modal-image-container { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 90%; max-height: 90%; animation: zoomIn 0.3s ease; }
#cert-modal-img { max-width: 100%; max-height: 80vh; border: 2px solid var(--primary-color); box-shadow: 0 0 50px rgba(255, 215, 0, 0.2); border-radius: 8px; object-fit: contain; }
#cert-modal-title { color: var(--primary-color); margin-bottom: 20px; text-shadow: 0 0 10px rgba(0,0,0,0.8); background: rgba(0,0,0,0.6); padding: 5px 20px; border-radius: 50px; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- CONTACT & FOOTER --- */
.contact-wrapper { display: flex; justify-content: center; width: 100%; }
.contact-card { max-width: 600px; width: 100%; }
.contact-info { margin: 30px 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.info-item { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; color: #ccc; }
.info-item i { color: var(--primary-color); font-size: 1.5rem; }
footer { text-align: center; padding: 40px; font-size: 0.9rem; color: #555; background-color: #000; border-top: 1px solid rgba(255, 255, 255, 0.05); }

/* --- MOBILE --- */
@media screen and (max-width: 900px) {
    .projects-grid::before, .project-card::before, .project-card::after { display: none; }
    .project-card { width: 100%; max-width: 600px; margin: 0 auto; align-self: center !important; text-align: center; }
    .projects-grid { gap: 30px; }
    .cert-icon { text-align: center; }
    .cert-levitate-card { text-align: center; align-items: center; }
    .levitate-container { height: 250px; }
    .levitate-container.small-view { height: 220px; }
    .floating-cert { width: 85%; }
}
@media screen and (max-width: 768px) {
    .nav-links { position: absolute; right: 0px; height: 100vh; top: 0; background-color: #000; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 70%; transform: translateX(100%); transition: transform 0.5s ease-in; border-left: 1px solid var(--primary-color); z-index: 999; }
    .nav-links li { margin: 20px 0; }
    .burger { display: block; z-index: 1001; }
    .nav-active { transform: translateX(0%); }
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
}