/* === css/style.css === */

/* --- Global Styles & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-white: #FFFFFF;
    --light-grey-text: #EAEAEA; /* For slightly less prominent text */
    --black: #0a0a0a;
    --dark-grey: #1a1a1a;
    --mid-grey: #2c2c2c;
    --grey: #cccccc;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--black);
    color: var(--grey);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

main {
    margin-top: 75px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--primary-white);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 3em; }
h2 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
h3 { font-size: 1.4em; color: var(--primary-white); margin-bottom: 10px; }
h4 { font-size: 1.3em; color: var(--light-grey-text); margin-bottom: 0.5rem; font-weight: 600;}

p { margin-bottom: 1rem; }
a { color: var(--primary-white); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

label.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.text-center { text-align: center; }


/* --- Section Styling --- */
.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
#about { background-color: var(--dark-grey); }
#projects { background-color: var(--black); }
#faq { background-color: var(--dark-grey); }
#contact { background-color: var(--black); }

.section::before {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: scale(0.5);
    opacity: 0;
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    pointer-events: none;
    z-index: 0;
}
.section.is-visible::before { opacity: 1; transform: scale(1); }

h2::after {
    content: '';
    display: block;
    width: 70px; height: 4px;
    background: var(--primary-white);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scaleX(0);
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s;
    transform-origin: center;
}
.section.is-visible h2::after { transform: scaleX(1); }


/* --- Hero Section --- */
#hero {
    min-height: calc(100vh - 75px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px 0;
    background-color: var(--black);

    background-image:
            radial-gradient(ellipse at 10% 10%, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
            radial-gradient(ellipse at 90% 90%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);

    background-size: auto, auto;
    background-repeat: no-repeat, no-repeat;
    z-index: 0;
}

#hero::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.6) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 1100px;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding: 0 20px;
    width: 90%;
}

.hero-text {
    flex: 1 1 55%;
    text-align: left;
    animation: slideInLeft 1s ease-out 0.5s backwards;
}

.hero-text h1 {
    font-size: 3.8em;
    font-weight: 700;
    color: var(--primary-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 25px rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    line-height: 1.15;
}

.hero-text p {
    font-size: 1.3em;
    color: var(--grey);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.6;
}

.hero-image {
    flex: 1 1 45%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInScaleUp 1.2s ease-out 0.7s backwards;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    width: auto;
    border-radius: 10px;
    filter: drop-shadow(0 0 50px whitesmoke);
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: var(--primary-white);
    border: 2px solid var(--primary-white);
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, box-shadow 0.4s ease;
    z-index: 1;
}

.cta-button::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--primary-white);
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}

.cta-button:hover {
    color: var(--black);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}
.cta-button:hover::before { left: 0; }


/* --- About Section --- */
#about .about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

/* === Skills Circle Animation === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.about-skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.skills-circle-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.skills-list {
    position: absolute;
    width: 100%;
    height: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    animation: spin 35s linear infinite;
}

.skill-item {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mid-grey);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.skill-item i {
    color: var(--primary-white);
    animation: spin 35s linear infinite reverse;
}

/* === NEW: Size Variations for Skill Items === */
/* Size 1: Large */
.skill-item:nth-child(4n + 1) {
    width: 70px;
    height: 70px;
    margin: -35px; /* Half of 70px */
}
.skill-item:nth-child(4n + 1) i {
    font-size: 2.2em;
}

/* Size 2: Small */
.skill-item:nth-child(4n + 2) {
    width: 50px;
    height: 50px;
    margin: -25px; /* Half of 50px */
}
.skill-item:nth-child(4n + 2) i {
    font-size: 1.5em;
}

/* Size 3: Medium */
.skill-item:nth-child(4n + 3) {
    width: 60px;
    height: 60px;
    margin: -30px; /* Half of 60px */
}
.skill-item:nth-child(4n + 3) i {
    font-size: 1.8em;
}

/* Size 4: Medium-Small */
.skill-item:nth-child(4n + 4) {
    width: 55px;
    height: 55px;
    margin: -27.5px; /* Half of 55px */
}
.skill-item:nth-child(4n + 4) i {
    font-size: 1.6em;
}
/* === End Size Variations === */


.skills-center-orb {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--dark-grey) 0%, var(--black) 80%);
    border-radius: 50%;
    box-shadow:
            inset 0 0 15px rgba(255, 255, 255, 0.2),
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(0, 0, 0, 0.5);
    z-index: 5;
}


/* --- Projects Section (Glassmorphism) --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(44, 44, 44, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.project-badge {
    position: absolute;
    top: 10px;
    left: -1px;
    background: linear-gradient(-45deg, #EAEAEA, #FFFFFF);
    color: var(--black);
    padding: 4px 15px;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    z-index: 10;
    white-space: nowrap;
    letter-spacing: 0.5px;
    border-radius: 0 0 5px 0;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.project-image {
    height: 200px;
    overflow: hidden;
    background-color: var(--dark-grey);
    position: relative;
    z-index: 1;
}

.project-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out, filter 0.4s ease;
}

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

.project-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.project-content p {
    font-size: 0.95em;
    flex-grow: 1;
    margin-bottom: 15px;
    color: var(--grey);
}

.project-tech-stack {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    min-height: 25px;
}

.project-tech-stack i {
    font-size: 1.7em;
    color: var(--grey);
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.project-tech-stack i:hover {
    color: var(--primary-white);
    transform: translateY(-2px) scale(1.1);
}

.project-links {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.project-links a {
    color: var(--light-grey-text);
    font-size: 0.9em; font-weight: 600;
    padding: 6px 12px;
    border: 1px solid var(--light-grey-text);
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.project-links a i { font-size: 1em; }

.project-links a:hover {
    background-color: var(--primary-white);
    color: var(--black);
    border-color: var(--primary-white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}


/* --- FAQ Section --- */
.faq-item {
    background: var(--mid-grey);
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 3px solid transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
}

.faq-item:hover { border-left-color: rgba(255, 255, 255, 0.7); }

.faq-item.open {
    border-left-color: var(--primary-white);
    background-color: rgba(26, 26, 26, 0.7);
}

.faq-question {
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-white);
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
}

.faq-question::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9em;
    color: var(--primary-white);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.faq-item.open .faq-question::after { transform: rotate(90deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding: 0 25px;
    color: var(--grey);
}

.faq-answer p {
    padding-top: 15px;
    padding-bottom: 20px;
    margin-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
}

.faq-item.open .faq-answer {
    max-height: 400px;
}


/* --- Contact Form (Glassmorphism) --- */
#contact-form {
    max-width: 650px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 35px 45px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.form-group input, .form-group textarea {
    width: 100%; padding: 15px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px; color: var(--primary-white);
    font-family: inherit; font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-white);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.submit-button {
    padding: 15px 35px;
    background: var(--primary-white);
    color: var(--black);
    border: none; border-radius: 5px; cursor: pointer;
    font-size: 1.1em; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    width: 100%;
}

.submit-button:hover {
    background-color: var(--light-grey-text);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.02);
}
.submit-button:active { transform: translateY(-1px) scale(1); }


/* --- Scroll Animation --- */
.animate-on-scroll, .animate-left, .animate-right, .stagger-item {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: ease-out;
    transition-delay: var(--stagger-delay, 0s);
    will-change: opacity, transform;
}
.animate-on-scroll { transform: translateY(50px); }
.animate-left { transform: translateX(-60px); }
.animate-right { transform: translateX(60px); }

.is-visible {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) !important;
}


/* --- Keyframes --- */
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInScaleUp { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }


/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .container { max-width: 960px; padding: 0 25px; }
    .hero-content { gap: 30px; width: 95%; }
    .hero-text h1 { font-size: 3.2em; }
    .hero-text p { font-size: 1.2em; }
    .hero-image img { max-height: 45vh; }
    #about .about-content { grid-template-columns: 1fr; text-align: center; }
    .skills-list { justify-content: center; }
}

@media (max-width: 768px) {
    main { margin-top: 65px; }
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; margin-bottom: 30px; }
    .section { padding: 60px 0; }
    #hero { padding: 60px 0; min-height: 80vh; }
    .hero-content { flex-direction: column; text-align: center; width: 90%; gap: 30px; padding: 0 10px; }
    .hero-text { order: 2; flex-basis: auto; text-align: center; max-width: 100%; animation: fadeInUp 1s ease-out 0.5s backwards; }
    .hero-image { order: 1; flex-basis: auto; width: 50%; max-width: 250px; margin: 0 auto; animation: fadeInScaleUp 1.2s ease-out 0.3s backwards; }
    .hero-image img { max-height: 30vh; width: 100%; }
    .hero-text h1 { font-size: 2.8em; }
    .hero-text p { font-size: 1.1em; max-width: 100%; margin-bottom: 1.5rem; }
    .cta-button { padding: 10px 25px; font-size: 1em; }
    .project-links { justify-content: center; }
    #contact-form { padding: 30px 25px; }
    .faq-question { font-size: 1em; padding: 15px 20px; }
    .faq-answer { padding: 0 20px; }

    #about .about-content { grid-template-columns: 1fr; }
    .about-skills { min-height: auto; padding-bottom: 30px;}
    .skills-circle-container { width: 280px; height: 280px; } /* Smaller circle on mobile */
}

@media (max-width: 576px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h2::after { width: 50px; }
    .container { padding: 0 15px; }
    .hero-text h1 { font-size: 2.4em; line-height: 1.2; }
    .hero-text p { font-size: 1em; }
    .hero-image { width: 60%; max-width: 200px; }
    .project-grid { grid-template-columns: 1fr; gap: 25px; }
    .submit-button { font-size: 1em; padding: 14px 25px; }
    #contact-form { padding: 25px 20px; }
    .faq-answer p { padding-top: 15px; padding-bottom: 15px; }
}