/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    /* Colors - Dark Theme with Gold Accents */
    --bg-color: #0b0f19;
    --bg-secondary: #111827;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-color-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --accent: #E2B636;
    /* Gold/Neon Yellow */
    --accent-glow: rgba(226, 182, 54, 0.5);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --transition: all 0.3s ease;
    --glass-blur: blur(12px);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* offset for fixed navbar */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   UTILITIES & TYPOGRAPHY
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
}

.accent {
    color: var(--accent);
}

.accent-text {
    background: linear-gradient(90deg, #E2B636, #F9D423);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

section {
    padding: 6rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-color);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-secondary:hover {
    background: rgba(226, 182, 54, 0.1);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar.scrolled {
    height: 70px;
    background: rgba(11, 15, 25, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--accent);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    box-shadow: 0 0 5px var(--accent-glow);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a.active {
    color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   IMPROVED HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
    /* For the animated grid */
}

/* Animated Grid Background */
.hero-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 15s linear infinite;
    z-index: 0;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px);
    }
}

.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-content {
    flex: 1;
}

.greeting {
    color: var(--accent);
    font-size: 1.2rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

/* Typewriter & Gradient Text for Name */
.name {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typewriter {
    /* Applied to a span or div if single line via Javascript, or pseudo via CSS */
    display: inline-block;
    border-right: 4px solid var(--accent);
}

.title {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.bio {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* Image styling with float and organic shape */
.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    max-width: 450px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.image-bg-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: var(--accent);
    filter: blur(120px);
    opacity: 0.3;
    z-index: 0;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-image {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    /* Modern soft shape */
    position: relative;
    z-index: 1;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(226, 182, 54, 0.3);
    background-color: var(--bg-secondary);
    transition: all 0.5s ease;
}

.hero-image:hover {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    box-shadow: 0 0 60px rgba(226, 182, 54, 0.6);
    border-color: var(--accent);
}

/* Image Fallback Background */
.image-fallback {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--accent));
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-fallback::after {
    content: "AA";
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--bg-color);
    font-weight: bold;
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.7;
    transition: var(--transition);
}

.scroll-down:hover {
    opacity: 1;
    color: var(--accent);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
    margin-bottom: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-5px);
    animation: scroll-wheel 2s ease-in-out infinite;
}

.scroll-down:hover .mouse {
    border-color: var(--accent);
}

.scroll-down:hover .wheel {
    background: var(--accent);
}

@keyframes scroll-wheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

.arrow-down {
    font-size: 1rem;
    color: var(--text-muted);
    animation: arrow-bounce 2s ease-in-out infinite;
}

.scroll-down:hover .arrow-down {
    color: var(--accent);
}

@keyframes arrow-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about {
    background-color: var(--bg-secondary);
}

.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-text {
    flex: 3;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--text-main);
}

.about-stats {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-box {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-box:hover {
    border-color: var(--accent);
    transform: translateX(-5px);
}

.stat-box i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* =========================================
   SKILLS SECTION
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition);
}

.skill-card:hover {
    background: var(--surface-color-hover);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.skill-card i {
    font-size: 3.5rem;
}

.skill-card span {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* =========================================
   PROJECTS SECTION
   ========================================= */
.projects {
    background-color: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-stack span {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background: rgba(226, 182, 54, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-family: var(--font-heading);
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-container {
    display: flex;
    gap: 4rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item i {
    width: 40px;
    height: 40px;
    background: rgba(226, 182, 54, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.contact-form-wrapper {
    flex: 1.2;
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(226, 182, 54, 0.1);
}

textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--bg-color);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--surface-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--bg-color);
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {

    .hero-container,
    .about-content,
    .contact-container {
        flex-direction: column;
        gap: 3rem;
    }

    /* On mobile, text on top, image below is usually better */
    .hero-container {
        flex-direction: column-reverse;
        /* Reverses order so text is top, image is bottom on mobile */
    }

    .hero-content {
        text-align: center;
    }

    .hero-btns,
    .social-icons {
        justify-content: center;
    }

    .bio {
        margin: 0 auto 2.5rem;
    }

    .hero-image-wrapper {
        margin-bottom: 1rem;
    }

    .about-stats {
        width: 100%;
        flex-direction: row;
    }

    .stat-box {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .name {
        font-size: 3.5rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .about-stats {
        flex-direction: column;
    }

    .contact-container {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2.8rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .hero-image-wrapper {
        max-width: 250px;
    }
}