/* ===============================
   VARIABLES & GLOBAL RESET
================================ */
:root {
    --rainbow: linear-gradient(to right, #29aae1, #8ac76f, #fbed21, #f16b4e, #ea088b);
    --bg-black: #000;
    --card-bg: #1a1a1a;
    --text-white: #fff;
    --text-gray: #9e9e9e;
}

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

body {
    font-family: 'aktiv-grotesk', sans-serif;
    background: #000;
    color: white;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===============================
   NAVBAR
================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background: rgba(0, 0, 0, 0.9);
}

.gradient-border-bottom {
    border-bottom: 1px solid transparent; 
    border-image-source: var(--rainbow);
    border-image-slice: 1;
}

.logo {
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: white;
}

.nav-links a.active {
    background-image: var(--rainbow);
    color: black;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-white);
}

/* ===============================
   ANIMATED GLOW BACKGROUND
================================ */
.animated-bg {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(41,170,225,0.15), transparent 70%);
    filter: blur(90px);
    animation: floatGlow 12s ease-in-out infinite;
    z-index: -1;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes floatGlow {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-45%, -60%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ===============================
   HERO & RAINBOW TEXT
================================ */
.hero {
    text-align: center;
    padding: 120px 20px 90px;
    position: relative;
}

.hero-logo {
    max-width: 240px;
    margin-bottom: 25px;
}

.hero-title, .section-heading, .section-title {
    background: var(--rainbow);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Helps with background-clip rendering */
}

.hero-title { font-size: 3rem; }
.section-heading { font-size: 2.5rem; margin-bottom: 50px; text-align: center; display: block; }
.section-title { font-size: 2rem; margin-bottom: 20px; }

.hero-subtitle {
    max-width: 650px;
    margin: 15px auto 0;
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* ===============================
   SECTIONS & SPACING
================================ */
.section {
    padding: 90px 20px;
    max-width: 1200px;
    margin: auto;
}

/* ===============================
   FEATURED WORK & CONTENT CARDS
================================ */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.featured-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid #333;
    transition: 0.4s;
    color: white;
    text-align: center;
    text-decoration: none;
}

.featured-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.featured-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 90px rgba(0,0,0,0.8);
}

.content {
    background: rgba(26,26,26,0.6);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Safari support */
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.content:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* ===============================
   TESTIMONIAL SLIDER
================================ */
.testimonial-slider {
    overflow: hidden;
    margin: auto;
}

.testimonial-track {
    display: flex;
    gap: 30px;
    animation: scroll 25s linear infinite;
}

.testimonial-card {
    min-width: 320px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 18px;
    border: 1px solid #333;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===============================
   FOOTER & BACK TO TOP
================================ */
.site-footer {
    background: #000;
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid transparent;
    border-image-source: var(--rainbow);
    border-image-slice: 1;
}

.footer-container { display: grid; gap: 30px; }
.footer-links, .social-icons { display: flex; justify-content: center; gap: 15px; }
.footer-links a { color: var(--text-gray); text-decoration: none; }
.footer-links a:hover { color: var(--text-white); }

#backToTop {
    display: none; /* Keep this to hide it on page load */
    position: fixed;
    bottom: 30px;
    right: 30px; /* Changed to right for better thumb reach/standard UX */
    z-index: 2000;
    background: #1a1a1a;
    color: white;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#backToTop:hover {
    border-color: #29aae1;
    transform: scale(1.1);
}

/* ===============================
   FADE-IN ANIMATION
================================ */
.fade-in { opacity: 0; transform: translateY(40px); transition: all 1s ease; }
.fade-in.appear { opacity: 1; transform: translateY(0); }

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 992px) {
    .section { padding: 60px 15px; }
    .abt-container h1,
    .resume-title,
    .contact-title { font-size: 2rem; }
    .abt-container p,
    .contact-subtitle { font-size: 0.95rem; }
    .center-image { max-width: 350px; }
    .portfolio-grid { gap: 20px; }
    .resume-images img { max-width: 100%; }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        background: var(--bg-black);
        flex-direction: column;
        width: 200px;
        border-left: 1px solid #333;
        padding: 20px;
        display: none;
    }

    .nav-links.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .section { padding: 50px 10px; }
    .abt-container h1,
    .resume-title,
    .contact-title { font-size: 1.75rem; }
    .abt-container p,
    .contact-subtitle { font-size: 0.9rem; }
    .center-image { max-width: 300px; }
    .resume-images { flex-direction: column; gap: 15px; }
    .project-card img { height: 180px; }
    .forms { padding: 30px 15px; }
    #contactForm input,
    #contactForm textarea { padding: 12px; }
    #contactForm button { padding: 12px; }
}

@media (max-width: 480px) {
    .section { padding: 40px 10px; }
    .abt-container h1,
    .resume-title,
    .contact-title { font-size: 1.5rem; }
    .abt-container p,
    .contact-subtitle { font-size: 0.85rem; }
    .center-image { max-width: 90%; }
    .project-card img { height: 160px; }
    .btn-rainbow { padding: 10px 20px; font-size: 0.85rem; }
    .forms { padding: 20px 10px; }
    #backToTop { bottom: 20px; left: 20px; }
}