/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    z-index: 9999;
    background: linear-gradient(
        90deg,
        #2575fc,
        #7f53ac,
        #00d4ff
    );
    box-shadow: 0 0 15px rgba(127,83,172,.8);
}

.cursor-glow{
    position:fixed;
    width:450px;
    height:450px;
    border-radius:50%;
    background:
    radial-gradient(
        circle,
        rgba(127,83,172,.12),
        transparent 70%
    );

    pointer-events:none;
    transform:translate(-50%,-50%);
    z-index:-1;
}

nav ul li a.active{
    color:#7f53ac;
}

nav ul li a.active::after{
    width:100%;
}

#hero h1{
    letter-spacing:-2px;
}

#hero{
    text-align:center;
    align-items:center;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    background: url('https://www.transparenttextures.com/patterns/stardust.png'), #0a0a0a;
    background-repeat: repeat;
    background-size: auto;
    color: #e0e0e0;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Header / Nav */
header {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(12px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    animation: fadeIn 1.5s ease-in-out forwards;
    opacity: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: auto;
    padding: 0 40px;
}

nav .logo {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(to right, #7f53ac, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 0px 4px rgba(37,117,252,0.3);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: #e0e0e0;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: #2575fc;
    bottom: -4px;
    left: 0;
    transition: width 0.3s ease-in-out;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: #2575fc;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12%;
    /*background: url('https://source.unsplash.com/random/1600x900') center center / cover no-repeat;*/
    background: url('https://source.unsplash.com/1600x900/?galaxy') center center / cover no-repeat;
    position: relative;
    color: white;
}

#hero h1 {
    font-size: 4.2rem;
    font-weight: bold;
    background: linear-gradient(90deg, #2575fc, #7f53ac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(127,83,172,0.3);
    margin-bottom: 15px;
}

#hero p {
    font-size: 1.3rem;
    color: #c4c4c4;
    max-width: 900px;         /* Increase width */
    text-align: center;       /* Center align for symmetry */
    margin: 0 auto 40px auto; /* Auto-center horizontally */
    line-height: 1.7;         /* Add breathing space */
}

#hero p {
    text-align: center;
}

@media (max-width: 768px) {
    #hero p {
        text-align: left;
        padding: 0 10px;
    }
}

#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Darken image */
    z-index: 0;
}

#hero * {
    position: relative;
    z-index: 1;
}

@keyframes floatGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes fadeUp {
    0% {
      opacity: 0;
      transform: translateY(30px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
}

#hero h1 {
    animation: fadeUp 1.2s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

#hero p {
    animation: fadeUp 1.5s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

#hero .btn-small {
    animation: fadeUp 1.8s ease-out forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

@keyframes float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-5px);
    }
}

#hero .btn-small {
    animation: fadeUp 1.8s ease-out forwards, float 3s ease-in-out infinite;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: #2575fc;
    border-radius: 30px;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: scale(1.05);
    background: #1f5db5;
    box-shadow: 0px 0px 15px rgba(37, 117, 252, 0.5);
}

.btn-small {
    display: inline-block;         /* Don't stretch */
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 20px;
    background: #2575fc;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(37, 117, 252, 0.3);
    margin-top: 20px;
    text-align: center;
}

.btn-small:hover {
    background: #1f5db5;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 117, 252, 0.5);
}

#hero .btn-small {
    display: inline-block;
    margin: 0 auto;
}

/* Sections */
section {
    padding: 120px 8%;
    max-width: 1440px;
    margin: auto;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

section h2 {
    font-size: 2.7rem;
    margin-bottom: 30px;
    background: linear-gradient(to right, #7f53ac, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Skills */
/* =========================
   SKILLS (UPGRADED SECTION)
========================= */

.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.skill-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 18px;
    backdrop-filter: blur(12px);
    text-align: left;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* glow accent */
.skill-group::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(127, 83, 172, 0.15),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-group:hover::before {
    opacity: 1;
}

.skill-group:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: rgba(127, 83, 172, 0.5);
    box-shadow: 0 20px 40px rgba(127, 83, 172, 0.25);
}

/* Title */
.skill-group h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #ffffff;
    position: relative;
}

/* underline accent */
.skill-group h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #2575fc, #7f53ac);
    border-radius: 2px;
}

/* Text */
.skill-group p {
    font-size: 0.95rem;
    color: #cfcfcf;
    line-height: 1.5;
    margin-top: 12px;
}
/* Projects */
.projects-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 24px;
}

/* Card */
.project-card {
    position: relative;
    background: radial-gradient(circle at top left,
                rgba(179, 153, 255, 0.12),
                rgba(15, 15, 25, 0.95));
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 18px 18px 20px;
    text-align: left;
    color: #eaeaea;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, box-shadow 0.35s ease,
                border-color 0.35s ease, background 0.35s ease;
    cursor: pointer;
    overflow: hidden;
    opacity: 0;
    animation: cardFadeIn 0.6s ease forwards;
}

/* staggered fade-in */
.project-card:nth-child(2) { animation-delay: 0.08s; }
.project-card:nth-child(3) { animation-delay: 0.16s; }
.project-card:nth-child(4) { animation-delay: 0.24s; }
.project-card:nth-child(5) { animation-delay: 0.32s; }
.project-card:nth-child(6) { animation-delay: 0.40s; }
.project-card:nth-child(7) { animation-delay: 0.48s; }
.project-card:nth-child(8) { animation-delay: 0.56s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card{
    transform-style:
    preserve-3d;
}

/* Image */
.project-card img {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 14px;
    transition: transform 0.35s ease;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 11; /* keeps all cards visually consistent */
}

.project-card:hover img {
    transform: scale(1.04);
}

/* Title */
.project-card h3 {
    margin: 8px 0 4px;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}

.project-card h3 a {
    color: #cbb5ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.project-card h3 a:hover {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(206, 178, 255, 0.9);
}

/* Description */
.project-card p {
    margin-top: 4px;
    font-size: 0.95rem;
    line-height: 1.45rem;
    color: #d4d4d4;
    opacity: 0.9;
}

/* Certifications */
.certificates-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.certificate-tile {
    width: 240px;
    padding: 20px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.certificate-tile:hover {
    transform: scale(1.05);
}

.certificate-tile p {
    color: #ffffff;
    font-weight: 600;
}

/* IFRAME */
.iframe-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.iframe-box {
    text-align: center;
}

.iframe-box h3 {
    margin-bottom: 10px;
    color: #a68eff;
}

.iframe-desktop {
    width: 1000px;
    height: 600px;
    border: 2px solid #2575fc;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.3);
}

.iframe-mobile {
    width: 375px;
    height: 667px;
    border: 2px solid #2575fc;
    border-radius: 24px;
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.3);
}

@media (max-width: 768px) {
    .iframe-desktop, .iframe-mobile {
        width: 100%;
        height: auto;
    }
}

/* Contact */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 50px;
    max-width: 1440px;
    margin: auto;
    margin-top: 40px;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    color: #e0e0e0;
    font-size: 1rem;
}

.contact-info p {
    margin: 0;
    font-size: 1.1rem;
}

.contact-info i {
    color: #2575fc;
    margin-right: 10px;
}

.contact-info a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #2575fc;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form {
    flex: 1;
    background-color: #141414;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #0a0a0a;
    color: #e0e0e0;
}

.contact-form button {
    padding: 10px 20px;
    background-color: #2575fc;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #1f5db5;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    margin-top: 60px;
    color: #888;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    nav {
        padding: 0 20px;
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .contact-container {
        flex-direction: column;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }
}

/* Ultra-wide screen layout boost */
@media (min-width: 1500px) {
    section,
    .projects-container,
    .contact-container,
    nav {
        max-width: 1600px;
    }
}
