/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: #fff;
    --main-color: #00d2ff; /* Electric Blue */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
}

.logo span {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: .3s;
}

.navbar a:hover, .navbar a.active {
    color: var(--main-color);
}

/* =========================================
   3. COMMON SECTION STYLES
   ========================================= */
section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 5rem;
}

.heading span {
    color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    cursor: pointer;
}

.btn:hover {
    box-shadow: none;
    transform: scale(1.05);
}

/* =========================================
   4. HOME SECTION
   ========================================= */
.home {
    flex-direction: row;
    align-items: center;
    gap: 8rem;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3 span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content h1 span {
    color: var(--main-color);
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-icons a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.home-img img {
    width: 30vw;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 2.5rem var(--main-color);
    transition: .4s ease-in-out;
}

.home-img img:hover {
    box-shadow: 0 0 5rem var(--main-color), 0 0 10rem var(--main-color);
    transform: scale(1.02);
}

/* =========================================
   5. ABOUT SECTION
   ========================================= */
.about {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
    background: var(--second-bg-color);
}

.about-img img {
    width: 25vw;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 2.5rem var(--main-color);
}

.about-content h2 {
    text-align: left;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

/* =========================================
   6. SKILLS & PROJECTS (UNIFORM GRID)
   ========================================= */
#skills { background: var(--bg-color); }
#projects { background: var(--second-bg-color); }

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch; /* Forces equal height boxes */
    gap: 2.5rem;
}

.project-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--second-bg-color);
    transition: .5s ease;
}

#skills .project-box {
    background: var(--second-bg-color);
}

.project-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.project-box i {
    font-size: 7rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.project-box h3 {
    font-size: 2.6rem;
    margin: 1.5rem 0;
}

.project-box p {
    flex-grow: 1; /* Pushes the button to the bottom */
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

/* =========================================
   7. CONTACT SECTION (CENTERED & DIVIDED)
   ========================================= */
.contact {
    background: var(--bg-color);
    align-items: center; /* Crucial for centering children */
}

/* Part 1: Direct Contact Cards */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--second-bg-color);
    padding: 1.5rem 3rem;
    border-radius: 1.2rem;
    border: .2rem solid transparent;
    transition: .3s ease;
    min-width: 280px;
}

.info-item:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.info-item i {
    font-size: 3rem;
    color: var(--main-color);
}

.info-text span {
    font-size: 1.2rem;
    color: var(--main-color);
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-text p {
    font-size: 1.7rem;
    font-weight: 600;
}

/* Part 2: The "OR" Divider Line */
.contact-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 4rem 0;
    width: 100%;
    max-width: 70rem;
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--text-color);
    opacity: 0.2;
}

.contact-divider span {
    padding: 0 2rem;
    font-size: 1.3rem;
    letter-spacing: .2rem;
    opacity: 0.6;
    white-space: nowrap;
}

/* Part 3: Message Form */
.contact form {
    max-width: 70rem;
    width: 100%;
    text-align: center;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
    border: .2rem solid transparent;
    transition: .3s ease;
}

.contact form .input-box input {
    width: 49%;
}

.contact form .input-box input:focus,
.contact form textarea:focus {
    border-color: var(--main-color);
}

.contact form textarea {
    resize: none;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

/* =========================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================= */

@media (max-width: 1200px) {
    html { font-size: 55%; }
    .projects-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .header { padding: 2rem 3%; }
    section { padding: 10rem 3% 2rem; }
    .home { flex-direction: column-reverse; text-align: center; }
    .home-img img { width: 60vw; margin-top: 4rem; }
    .footer { padding: 2rem 3%; }
}

@media (max-width: 768px) {
    .about { flex-direction: column; text-align: center; }
    .about-img img { width: 70vw; margin-top: 4rem; }
    .about-content h2 { text-align: center; }
    
    .projects-container { grid-template-columns: 1fr; padding: 0 5%; }
    
    .contact-info { flex-direction: column; align-items: center; }
    .info-item { width: 100%; max-width: 45rem; }
    
    .contact form .input-box input { width: 100%; }
}