/* ================================================
TABLE OF CONTENTS
================================================
1.  Root Variables & Global Styles
2.  Preloader & Opening Animation
3.  Navigation
4.  Hero Section
5.  General Section Styles
6.  About Section
7.  Live Developer Activity Feed Styles
8.  Skills Section (with Tooltips)
9.  Projects Section
10. Contact Section
11. Footer
12. Animations
13. Responsive Media Queries
================================================
*/

/* 1. Root Variables & Global Styles */
:root {
    --primary: #00f7ff;
    --secondary: #ff00e4;
    --accent: #00ff9d;
    --dark-bg: #0a0a15;
    --card-bg: rgba(20, 20, 35, 0.6);
    --text: #e0e0ff;
    --text-light: #ffffff;
    --text-dim: #a0a0c0;
    --font-main: 'Exo 2', sans-serif;
    --font-futuristic: 'Orbitron', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    /* The starry background has been removed. This gradient is now the main background. */
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* 2. Preloader & Opening Animation */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 3. Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 20, 0.8);
    border-bottom: 1px solid rgba(0, 247, 255, 0.1);
    transition: var(--transition-smooth);
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-futuristic);
    font-weight: 700;
    font-size: 26px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 12px;
    box-shadow: 0 0 15px var(--primary);
    animation: pulse 2s infinite;
}

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

.nav-link {
    color: var(--text);
    text-decoration: none;
    margin: 0 20px;
    font-weight: 600;
    font-size: 17px;
    position: relative;
    transition: var(--transition);
    padding: 8px 0;
}

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

.nav-link:hover {
    color: var(--primary);
}

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

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 5px;
    transition: var(--transition);
}

/* 4. Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 50px 50px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1;
    padding-right: 50px;
    opacity: 0;
    animation: fadeUp 1s forwards 0.5s;
}

.hero h1 {
    font-size: 5.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    font-family: var(--font-futuristic);
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 700px;
}

.hero-btns {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    border-radius: 35px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.btn i {
    margin-left: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: var(--dark-bg);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 247, 255, 0.4);
}

.btn-primary:hover i {
    transform: translateX(5px);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--dark-bg);
    box-shadow: 0 0 25px rgba(0, 247, 255, 0.4);
}

.btn-resume {
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    color: var(--dark-bg);
}

.btn-resume:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 0, 228, 0.4);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    opacity: 0;
    animation: fadeUp 1s forwards 0.7s;
}

.hexagon-container {
    position: relative;
    width: 400px;
    height: 450px;
}

.hexagon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(45deg, var(--primary), var(--accent));
    animation: rotate 20s linear infinite;
}

.hexagon-inner {
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    background: var(--dark-bg);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hexagon-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* 5. General Section Styles */
section {
    padding: 120px 50px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInSection 1s forwards;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 80px;
    text-align: center;
    font-family: var(--font-futuristic);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* 6. About Section */
.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
    font-size: 1.1rem; /* Slightly reduced for better readability */
    color: var(--text-dim);
}

.about-text p {
    margin-bottom: 25px;
    line-height: 1.8;
}

.tech-stack {
    margin-top: 40px;
}

.tech-stack h3, .qualifications h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--text-light);
}

.stack-icons {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stack-icons i {
    font-size: 3.5rem;
    color: var(--text-dim);
    transition: var(--transition);
    cursor: default;
}

.stack-icons i:hover {
    color: var(--primary);
    transform: translateY(-8px);
}

.qualifications {
    margin-top: 40px;
}

.qualifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Made min-width smaller */
    gap: 20px;
}

.qualification-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.qualification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 247, 255, 0.2);
    border-color: var(--primary);
}

.qualification-item h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.qualification-item p {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin: 0;
}

.about-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.holographic-card {
    width: 100%;
    max-width: 380px; /* Changed from fixed width to fluid */
    height: auto;
    background: rgba(25, 25, 45, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 247, 255, 0.2);
    transition: var(--transition);
}

.holographic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(0, 247, 255, 0.3);
}

.holographic-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.holographic-info {
    padding: 30px;
}

.holographic-info h4 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: var(--primary);
    font-family: var(--font-futuristic);
}

/* 7. Live Developer Activity Feed Styles */
.activity-feed {
    list-style: none;
    padding-left: 0;
    height: 150px; /* Fixed height for the container */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    font-size: 1rem;
}

.activity-item i {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
    width: 20px;
    text-align: center;
}

.activity-text .cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background-color: var(--accent);
    margin-left: 5px;
    animation: blink 1s infinite;
}

/* 8. Skills Section (with Tooltips) */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* More fluid grid */
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.skill-category {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 247, 255, 0.1);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 247, 255, 0.3);
}

.skill-category h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary);
    font-family: var(--font-futuristic);
    text-align: center;
}

.skill-grid {
    display: grid;
    gap: 20px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    position: relative; /* For tooltip positioning */
}

.skill-item:hover {
    background: rgba(0, 247, 255, 0.1);
    transform: translateX(5px);
}

/* Tooltip styles */
.skill-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: var(--dark-bg);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.skill-item:hover::after {
    opacity: 1;
    visibility: visible;
}

.skill-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.skill-icon i {
    font-size: 24px;
    color: var(--primary);
}

.skill-info {
    flex-grow: 1;
}

.skill-info h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-light);
}

.skill-level {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
}

.skill-percent {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-futuristic);
}


/* 9. Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Made min-width smaller */
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 247, 255, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 247, 255, 0.3);
}

.project-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-light);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.project-overlay p, .project-tech {
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.project-card:hover .project-overlay h3,
.project-card:hover .project-overlay p,
.project-card:hover .project-tech {
    transform: translateY(0);
}

.project-overlay p {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-tech span {
    font-size: 0.85rem;
    padding: 6px 15px;
    background: rgba(0, 247, 255, 0.15);
    color: var(--primary);
    border-radius: 20px;
}

.project-links {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.project-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.project-link i {
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary);
}

.project-link:hover i {
    transform: translateX(5px);
}

/* 10. Contact Section */
.contact-container {
    display: flex;
    gap: 50px;
    max-width: 1300px;
    margin: 0 auto;
}

.contact-form {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 247, 255, 0.1);
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    font-size: 1.1rem;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    resize: none;
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 1.1rem;
    color: var(--text-dim);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -20px;
    font-size: 0.9rem;
    color: var(--primary);
}

.underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: var(--transition);
}

.form-group input:focus ~ .underline,
.form-group textarea:focus ~ .underline {
    width: 100%;
}

.contact-form button {
    margin-top: 20px;
    border: none;
    cursor: pointer;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 247, 255, 0.1);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 247, 255, 0.3);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 24px;
    color: var(--dark-bg);
}

.info-content h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.info-content p {
    font-size: 1.1rem;
    color: var(--text-dim);
    word-break: break-all;
}

/* 11. Footer */
.footer {
    padding: 80px 50px 30px;
    background: rgba(5, 5, 15, 0.9);
    border-top: 1px solid rgba(0, 247, 255, 0.1);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.social-links {
    display: flex;
    gap: 25px;
}

.social-link {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    font-size: 1.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: var(--dark-bg);
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 247, 255, 0.4);
}

.footer-bottom {
    margin-top: 60px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-dim);
}

/* 12. Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { to { transform: translateY(0); opacity: 1; } }
@keyframes fadeInSection { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { background-color: var(--accent); } 50% { background-color: transparent; } }

/* 13. Responsive Media Queries */

/* For large laptops and desktops (up to 1200px) */
@media (max-width: 1200px) {
    .hero h1 { font-size: 4.5rem; }
    .section-title { font-size: 3rem; }
    .about-content { gap: 40px; }
}

/* For tablets and small laptops (up to 992px) */
@media (max-width: 992px) {
    section { padding: 100px 30px; }
    .hero { padding-top: 150px; text-align: center; }
    .hero-content { flex-direction: column; }
    .hero-text { padding-right: 0; margin-bottom: 60px; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; }

    .about-content { flex-direction: column; }
    .about-visual { margin-top: 40px; width: 100%; }

    .skills-container { grid-template-columns: 1fr; }
    
    .contact-container { flex-direction: column; gap: 40px; }
}

/* For mobile landscape and large phones (up to 768px) */
@media (max-width: 768px) {
    nav { padding: 20px 30px; }
    /* Mobile navigation menu logic */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        background: rgba(10, 10, 20, 0.98);
        backdrop-filter: blur(5px);
        clip-path: circle(0px at top right);
        transition: all 0.5s ease-out;
        pointer-events: none;
        padding: 20px 0;
    }
    .nav-links.active {
        clip-path: circle(150% at top right);
        pointer-events: all;
    }
    .nav-link { margin: 15px 0; }
    /* Hamburger icon animation */
    .burger { display: block; }
    .burger.active .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger.active .line2 { opacity: 0; }
    .burger.active .line3 { transform: rotate(45deg) translate(-5px, -6px); }

    /* Adjusting typography and spacing for tablets */
    .hero h1 { font-size: 3rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .section-title { font-size: 2.5rem; margin-bottom: 60px; }
    .about-text { font-size: 1rem; }
}

/* For mobile portrait (up to 576px) */
@media (max-width: 576px) {
    section { padding: 80px 20px; }
    
    .logo { font-size: 22px; }
    .logo-dot { width: 10px; height: 10px; margin-left: 8px;}

    .hero h1 { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-btns { flex-direction: column; gap: 15px; align-items: center; }
    .btn { width: 100%; max-width: 300px; padding: 12px 30px; }

    /* Making the hero image smaller on mobile */
    .hexagon-container { width: 280px; height: 320px; }
    
    /* Reducing card padding on mobile */
    .skill-category, .contact-form, .info-card { padding: 25px; }

    /* Adjusting font sizes inside cards for mobile */
    .skill-info h4, .qualification-item h4 { font-size: 1.1rem; }
    .project-overlay h3 { font-size: 1.3rem; }
    .project-overlay p { font-size: 0.9rem; }
    .holographic-info h4 { font-size: 1.4rem; }
    .activity-item { font-size: 0.9rem; }

    .footer-content { gap: 30px; }
    .footer-logo { font-size: 1.8rem; }
    .social-link { width: 50px; height: 50px; font-size: 1.3rem;}
}

