:root {
    --white: #f0f0f0;
    --red: #dc5a56;
    --blue: #335267e8;
    --gray: #292b2c;
    --cyan: #00ffff;
    --dark-bg: #0f2027;
}

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    background: var(--gray);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: bold;
    text-align: center;
}

a {
    color: var(--white);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- NAVIGATION ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.4), inset 0 0 5px rgba(0, 200, 255, 0.2);
    backdrop-filter: blur(16px);
    z-index: 999;
    padding: 1rem 2rem;
    margin-top: 1rem;
    animation: glow-flicker 3s infinite ease-in-out;
}

@keyframes glow-flicker {
    0%, 100% { box-shadow: 0 0 12px rgba(0,200,255,0.4), inset 0 0 5px rgba(0,200,255,0.2); }
    50% { box-shadow: 0 0 20px rgba(0,255,255,0.7), inset 0 0 8px rgba(0,255,255,0.4); }
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
}

.logo {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--cyan);
    font-family: 'Raleway', sans-serif;
    text-shadow: 0 0 5px var(--cyan);
}

/* Hamburger */
.nav-toggle { display: none; }

.nav-toggle-label {
    display: none;
    flex-direction: column;
    cursor: pointer;
    height: 30px;
    justify-content: space-between;
    margin-top: 3rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--cyan);
    height: 3px;
    width: 25px;
    border-radius: 2px;
    transition: 0.3s ease;
    position: relative;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after { top: 8px; }

.nav-toggle:checked + .nav-toggle-label span { background: transparent; }
.nav-toggle:checked + .nav-toggle-label span::before { transform: rotate(45deg); top: 0; }
.nav-toggle:checked + .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }

/* Nav list */
.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-list li a {
    position: relative;
    color: var(--cyan);
    font-size: 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    padding: 1rem 1.2rem;
    transition: color 0.3s;
}

.nav-list li a::before {
    content: "";
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--cyan);
    transition: width 0.3s;
}

.nav-list li a:hover::before { width: 100%; }
.nav-list li a:hover { color: #ffffff; }

/* ---------- WELCOME SECTION ---------- */
.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0 2rem;
    background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
    text-align: center;
}

.headshot {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 3px solid var(--cyan);
    margin: 2rem auto 0 auto;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0,255,255,0.3);
}

.welcome-content h1 {
    font-size: 6rem;
    margin-bottom: 2rem;
}

.name-highlight {
    color: var(--red);
}

.typewriter-loop {
    font-size: 2.6rem;
    font-weight: 300;
    font-style: italic;
    color: #00c6ff;

    /* Prevent the welcome content from jumping */
    height: 4.2rem;
    min-width: 32rem;

    /* Keep the cursor stable */
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto 2.5rem;
    white-space: nowrap;
    overflow: hidden;

    position: relative;
}

.btn-welcome {
    padding: 1.4rem 3rem;
    font-size: 2rem;
    background: var(--blue);
    border-radius: 4px;
    color: var(--white);
    text-decoration: none;
    transition: background 0.3s;
}
.btn-welcome:hover { background: var(--red); }

/* ---------- PROJECTS SECTION ---------- */
.projects-section {
    padding: 10rem 2rem;
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    text-align: center;
    min-height: 100vh;
}

.projects-section-header {
    font-size: 4.5rem;
    margin-bottom: 6rem;
    border-bottom: 3px solid #00c6ff;
    display: inline-block;
    padding-bottom: 1rem;
    animation: header-glow 2s ease-in-out infinite alternate;
}

@keyframes header-glow {
    from { text-shadow: 0 0 10px #00c6ff, 0 0 20px #00c6ff; }
    to { text-shadow: 0 0 25px #00c6ff, 0 0 50px #00c6ff; }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto 6rem;
}

.project-tile {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,255,0.2);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 10px rgba(0,255,255,0.15);
    display: flex;
    flex-direction: column;
}

.project-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(0,255,255,0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0,255,255,0.1);
    object-fit: cover;
}

.project-info {
    padding: 1.6rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-title {
    font-size: 2rem;
    color: var(--cyan);
    font-weight: 600;
}

.project-desc {
    font-size: 1.5rem;
    color: #ccc;
    line-height: 1.4;
}

.project-tech {
    font-size: 1.3rem;
    color: #aaa;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

.badge-live {
    background: #dc5a56;
    color: #fff;
    font-size: 1.2rem;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    width: fit-content;
    margin-top: 0.5rem;
}

.btn-show-all {
    font-size: 2rem;
    background: transparent;
    border: 2px solid var(--cyan);
    color: var(--cyan);
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-show-all:hover {
    background: var(--cyan);
    color: #0f2027;
    box-shadow: 0 0 20px var(--cyan);
}

.btn-show-all i {
    margin-left: 10px;
    transition: transform 0.3s;
}
.btn-show-all:hover i { transform: translateX(5px); }

/* ---------- SKILLS ---------- */
.skills-section {
    padding: 8rem 2rem;
    background: linear-gradient(to right, #141e30, #243b55);
    text-align: center;
    min-height: 100vh;
}

.skills-section h2 {
    font-size: 4.5rem;
    margin: 7rem auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: auto;
}

.skill-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,255,0.15);
    border-radius: 10px;
    padding: 2rem 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(6px);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.skill-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 18px rgba(0,255,255,0.3);
}

.skill-item i {
    font-size: 4.5rem;
}

.skill-item p {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--cyan);
}

/* ---------- ABOUT ---------- */
.about-section {
    padding: 8rem 2rem;
    background: linear-gradient(to left, #0f2027, #203a43, #2c5364);
    text-align: center;
    min-height: 100vh;
}

.about-content {
    max-width: 800px;
    margin: auto;
    padding: 3rem;
    border: 1px solid rgba(0,255,255,0.2);
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,255,255,0.1);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.about-section.reveal .about-content {
    margin-top: 5rem;
    opacity: 1;
    transform: translateY(0);
}

.about-content h2 {
    margin-top: 10rem;
    font-size: 4.5rem;
    margin-bottom: 2rem;
}

.about-content p {
    text-align: left;
    color: #ccc;
    font-size: 1.7rem;
    line-height: 1.8;
}

.about-content strong {
    color: var(--cyan);
}

/* ---------- CONTACT ---------- */
.contact-section {
    padding: 8rem 2rem;
    background: linear-gradient(to left, #3e3f7e, #091135, #192d52);
    text-align: center;
    min-height: 75vh;
}

.contact-header h2 {
    font-size: 4rem;
    color: var(--red);
}

.contact-header p {
    margin-top: 1rem;
    font-size: 2rem;
    font-weight: 300;
    color: #ccc;
}

.contact-grid {
    margin-top: 4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.contact-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,255,0.1);
    border-radius: 10px;
    padding: 2rem 3rem;
    min-width: 250px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0,255,255,0.3);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--white);
}

.contact-link i {
    font-size: 3.5rem;
}

/* Style the custom Gmail icon */
.gmail-icon {
    display: flex;
    align-items: center;
}

.gmail-icon img {
    width: 3.5rem;        /* matches devicon size */
    height: 3.5rem;
    object-fit: contain;  /* keeps aspect ratio */
    /* filter: brightness(0) invert(1); optional: makes it white if your icon is dark */
}

.contact-link p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.contact-link span {
    font-size: 1.6rem;
    color: var(--cyan);
}

/* ---------- FOOTER ---------- */
footer {
    background: #111;
    padding: 2rem;
    text-align: center;
    font-size: 1.5rem;
}

/* ---------- RESPONSIVE (MOBILE FIRST FIXES) ---------- */
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .nav {
        width: 100%;
        left: 0;
        transform: none;
        /* border-radius: 0 0 14px 14px; */
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        animation: none;
        margin-top: 0;
        padding: 1rem;
        z-index: 998;
    }

    .nav-container {
        justify-content: flex-end;       /* logo stays left if visible, but we'll hide it */
    }

    .nav-toggle-label {
        display: flex;
    }

    .logo {
        display: none;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        border-radius: 0 0 12px 12px;
        margin-top: 1rem;
        padding: 1rem 0;
    }

    .nav-toggle:checked ~ .nav-list {
        display: flex;
        background: rgba(0, 0, 0, 0.9);
        margin-top: 0;
        padding-top: 0;
    }

    .nav-toggle-label {
        display: flex;
        position: fixed;
        top: 2.5rem;
        right: 2rem;
        z-index: 1000;
        margin-top: 0;
    }

    .nav-list li {
        text-align: center;
        padding: 1rem 0;
    }

    .welcome-content h1 {
        font-size: 3.8rem;
    }

    .typewriter-loop {
        font-size: 2rem;
        white-space: normal;
        width: 100%;
        animation: none;
        border-right: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-item img {
        width: 80%;
        height: 80%;
    }

    .contact-grid {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-info {
        padding: 1rem;
    }

    .project-title {
        font-size: 1.8rem;
    }
}
