@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary Colors */
    --color-bg-primary: #0F172A;
    --color-bg-secondary: #111827;
    --color-bg-tertiary: #1E293B;
    --color-bg-accent: #0b2235;

    /* Text Colors */
    --color-text-primary: #F8FAFC;
    --color-text-secondary: #CBD5E1;
    --color-text-tertiary: #94A3B8;

    /* Accent Colors */
    --color-accent-primary: #38BDF8;
    --color-accent-hover: #0EA5E9;
    --color-accent-bright: #0f3a42;
    --color-accent-teal: #00b8d4;

    /* Border & Outline Colors */
    --color-border: #334155;
    --color-border-light: #1E293B;

    /* UI Colors */
    --color-menu-toggle: #2563eb;
    --color-star: #60a5fa;

    /* Gradient Colors */
    --gradient-1: #0d61e8;
    --gradient-2: #1a4578;
    --gradient-3: #18abea;
    --gradient-4: #4996ef;

    /* Shadow Colors (with opacity) */
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 10px 25px rgba(37, 99, 235, 0.3);
    --shadow-dark: 0 5px 20px rgba(0, 0, 0, 0.3);
    --shadow-large: 0 20px 40px rgba(56, 189, 248, 0.25);
    --shadow-accent: 0 5px 15px rgba(0, 123, 255, 0.4);
    --shadow-dark-heavy: 0 8px 20px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-dark);
}

.navbar {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.logo span {
    color: var(--color-accent-primary);
}

.nav-link {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-link a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

.nav-link a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 3px;
    background: var(--color-accent-primary);
    transition: 0.4s;
}

.nav-link a:hover {
    color: var(--color-accent-primary);
}

.nav-link a:hover::after {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg-primary), var(--color-bg-secondary), var(--color-border-light));
}

.hero::before {
    content: "";
    position: absolute;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            var(--gradient-1),
            var(--gradient-2),
            var(--gradient-3),
            var(--gradient-4));
    opacity: 0.10;
    animation: gradientMove 15s ease infinite;
}

.hero-content {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    position: relative;
    animation: heroFade 1.2s ease forwards;
    z-index: 2;
}

.hero-text {
    flex: 1;
}

.hero-text h3 {
    font-size: 28px;
    color: var(--color-text-tertiary);
    margin-bottom: 10px;
    animation: slideLeft 1s ease;
}

.hero-text h1 {
    font-size: 72px;
    color: var(--color-text-primary);
    margin: 10px 0;
    animation: slideLeft 1.2s ease;

}

.hero-text h2 {
    font-size: 34px;
    color: var(--color-accent-primary);
    margin-bottom: 20px;
    animation: slideLeft 1.4s ease;

}

.hero-text p {
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 35px;
    font-size: 17px;
    animation: slideLeft 1.6s ease;
}

.buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 35px;
}

.btn,
.btn-outline {
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.4s;
}

.btn {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
}

.btn:hover {
    background: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.btn-outline {
    border: 2px solid var(--color-accent-primary);
    color: var(--color-accent-primary);
    background: transparent;
}

.btn:hover {

    background: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 0 25px var(--color-accent-primary);

}

.social {
    display: flex;
    gap: 18px;
}

.social a {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--color-bg-tertiary);
    color: var(--color-accent-primary);
    font-size: 20px;
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: 0.4s;
    box-shadow: var(--shadow-light);
}

.social a:hover {

    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    transform: translateY(-10px) rotate(360deg);
    box-shadow: 0 0 25px var(--color-accent-primary);

}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--color-accent-primary);
    transition: 0.4s;
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.star {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-star);
    border-radius: 50%;
    animation: float 8s linear infinite;
}

.star:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-duration: 7s;
}

.star:nth-child(2) {
    left: 80%;
    top: 15%;
    animation-duration: 10s;
}

.star:nth-child(3) {
    left: 60%;
    top: 75%;
    animation-duration: 8s;
}

.star:nth-child(4) {
    left: 25%;
    top: 80%;
    animation-duration: 9s;
}

.star:nth-child(5) {
    left: 90%;
    top: 55%;
    animation-duration: 11s;
}

.star:nth-child(6) {
    left: 45%;
    top: 35%;
    animation-duration: 7s;
}

.about {
    padding: 100px 10%;
    background: var(--color-bg-secondary);
}

.about-container {
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 70px;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 380px;
    height: 450px;
    object-fit: cover;
    border-radius: 25px;
    border: 8px solid var(--color-accent-primary);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
    transition: 0.4s;
}

.about-image img:hover {
    transform: scale(1.03);
}

.about-content {
    flex: 1;
}

.about-content h4 {
    color: var(--color-accent-primary);
    font-size: 20px;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.about-content h2 {
    font-size: 45px;
    color: var(--color-text-primary);
    margin-bottom: 25px;
}

.about-content p {
    text-align: justify;
    font-size: 17px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.info-box {
    background: var(--color-bg-tertiary);
    padding: 25px;
    text-align: center;
    border-radius: 15px;
    transition: 0.4s;
    border: 1px solid var(--color-border);
}

.info-box:hover {
    background: var(--color-accent-primary);
    transform: translateY(-8px);
}

.info-box h3 {
    color: var(--color-accent-primary);
    font-size: 24px;
    margin-bottom: 8px;
    transition: 0.4s;
}

.info-box span {
    color: var(--color-text-secondary);
    font-size: 15px;
    transition: 0.4s;
}

.info-box:hover h3,
.info-box:hover span {
    color: var(--color-bg-primary);
}

.education {
    padding: 80px 10%;
    background: var(--color-bg-tertiary);
    scroll-margin-top: 90px;
}

.education .section-title {
    text-align: center;
    margin-bottom: 40px;
}

.education .section-title h4 {
    color: var(--color-accent-primary);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.education .section-title h2 {
    color: var(--color-text-primary);
    font-size: 36px;
    margin-bottom: 8px;
}

.education .section-title p {
    color: var(--color-text-secondary);
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 15px;
}

.education-container {
    max-width: 1200px;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.edu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px;
    border-radius: 15px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-light);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.edu-card::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    background: var(--color-accent-primary);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    transition: 0.5s ease;
}

.edu-card:hover::before {
    width: 500px;
    height: 500px;
}

.edu-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
    border-color: var(--color-accent-primary);
}

/* Left column (degree, subject, institute) */
.edu-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.edu-left h3 {
    font-size: 18px;
    color: var(--color-text-primary);
    margin: 0;
    font-weight: 700;
}

.edu-left .edu-sub {
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.edu-left .edu-institute {
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

/* Right column (year, grade) */
.edu-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 140px;
}

.edu-right .edu-year {
    color: var(--color-text-tertiary);
    font-weight: 600;
    font-size: 14px;
}

.edu-right .edu-grade {
    color: var(--color-accent-primary);
    font-weight: 700;
    font-size: 14px;
}

/* Compact variant for very short cards (optional utility) */
.edu-card.compact {
    padding: 14px;
}

/* Small decorative dot or icon (optional) */
.edu-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    margin-right: 10px;
    flex-shrink: 0;
}

/* Accessibility: focus state */
.edu-card:focus-within {
    outline: 3px solid rgba(56, 189, 248, 0.12);
    outline-offset: 2px;
}

.skills {
    padding: 100px 10%;
    background: var(--color-bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h4 {
    color: var(--color-accent-primary);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 45px;
    color: var(--color-text-primary);
    margin-bottom: 15px;
}

.section-title p {
    margin: auto;
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-size: 17px;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--color-bg-tertiary);
    padding: 35px 25px;
    text-align: center;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    transition: 0.4s;
    border: 1px solid var(--color-border);
}

.skill-card:hover {
    transform: translateY(-12px);
    background: var(--color-accent-primary);
}

.skill-card i {
    font-size: 60px;
    color: var(--color-accent-primary);
    margin-bottom: 20px;
    transition: 0.4s;
}

.skill-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
    transition: 0.4s;
}

.skill-card p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    transition: 0.4s;
}

.skill-card:hover i,
.skill-card:hover h3,
.skill-card:hover p {
    color: var(--color-bg-primary);
}

.projects {
    padding: 80px 10%;
    background: var(--color-bg-tertiary);
    text-align: center;
    scroll-margin: 15px;
}

.projects h2 {
    font-size: 40px;
    margin-bottom: 40px;
}

.section-title p {
    margin: -20px;
}

.project-container {
    display: flex;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;

    max-height: 650px;
    overflow-y: auto;
    padding: 20px;

    border: 2px solid var(--color-accent-bright);
    border-radius: 15px;
    background: var(--color-bg-accent);
    scroll-snap-type: X mandatory;
}

.project-container::-webkit-scrollbar {
    height: 8px;
}

.project-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}

.project-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-teal);
}

.project-card {
    min-width: 330px;
    background: var(--color-bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: 0.3s;
    border: 1px solid var(--color-border);
    scroll-snap-align: center;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.project-card img {
    width: 100%;
    height: 200px;
    padding: 10px;
    border-radius: 30px;
    object-fit: cover;
    transition: all 0.4s linear;
}

.project-card h3 {
    margin: 20px 0 10px;
    color: #fff;
    font-size: 24px;
}

.project-card p {
    text-align: justify;
    padding: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.project-card a {
    display: inline-block;
    margin: 20px;
    padding: 10px 20px;
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    align-self: flex-start;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s;
}

.project-card a:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

.contact {
    padding: 100px 10%;
    background: var(--color-bg-secondary);
    scroll-margin-top: 90px;
}

.contact-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 50px;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    transition: .4s;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-large);
}

.contact-card i {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    font-size: 24px;
}

.contact-card h3 {
    color: var(--color-text-primary);
    margin-bottom: 5px;
    font-size: 20px;
}

.contact-card p {
    color: var(--color-text-secondary);
    font-size: 16px;
}

.contact-form {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 40px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    outline: none;
    font-size: 16px;
    transition: .3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--color-text-secondary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 12px rgba(56, 189, 248, .25);
}

.contact-form textarea {
    resize: none;
}

.contact-form button {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: .4s;
}

.contact-form button:hover {
    background: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-4px);
}

footer {
    width: 100%;
    color: var(--color-text-secondary);
    margin-top: 50px;
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-light);
}

.footer {
    max-width: 1200px;
    margin: auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer p {
    font-size: 16px;
    letter-spacing: 0.5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--color-bg-tertiary);
    color: var(--color-accent-primary);
    font-size: 20px;
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: 0.4s;
    box-shadow: var(--shadow-light);
}

.social-icons a:hover {
    background: var(--color-accent-primary);
    color: var(--color-bg-primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-accent);
}

@keyframes gradientMove {
    0% {
        transform: translateX(0) rotate(0deg);
    }

    100% {
        transform: translateX(-30%) rotate(360deg);
    }
}

@keyframes float {

    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform:
            translateY(-150px) scale(1.8);
        opacity: 0;
    }

}

@keyframes heroFade {

    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

@keyframes slideLeft {

    from {
        opacity: 0;
        transform: translateX(-80px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }

}

.menu-toggle {
    position: relative;
    display: none;
    font-size: 28px;
    color: var(--color-menu-toggle);
    cursor: pointer;
}

/* ===== RESPONSIVE DESIGN ===== */

@media screen and (min-width: 320px) and (max-width: 374px) {

    .navbar {
        width: 95%;
        height: 70px;
    }

    .logo {
        font-size: 24px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: block;
        position: relative;
        cursor: pointer;
    }

    .nav-link {
        display: none;
        font-size: 28px;
        position: absolute;
        top: 45px;
        right: -5px;
        width: 160px;
        background: var(--color-bg-tertiary);
        border: 1px solid var(--color-border);
        padding: 25px;
        gap: 100px;
        border-radius: 8px;
        box-shadow: var(--shadow-dark-heavy);
        z-index: 1;
    }

    .nav-links:hover .nav-link {
        display: block;
        position: absolute;
    }

    .nav-link a {
        color: var(--color-text-primary);
    }

    .hero-content {
        margin-top: 100px;
    }

    .hero-content,
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-text h2 {
        font-size: 24px;
    }

    .hero-text h3 {
        font-size: 20px;
    }

    .hero-text p {
        font-size: 15px;
    }

    .buttons {
        flex-direction: column;
    }

    .hero-image img,
    .about-image img {
        width: 220px;
        height: 220px;
    }

    .about-content h2,
    .section-title h2,
    .projects h2 {
        font-size: 30px;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .education {
        padding: 60px 6%;
    }

    .education .section-title h2 {
        font-size: 26px;
    }

    .education-container {
        gap: 12px;
    }

    .edu-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
        gap: 10px;
    }

    .edu-right {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        margin-top: 6px;
    }

    .edu-right .edu-year,
    .edu-right .edu-grade {
        font-size: 13px;
    }

    .skills-container,
    .project-container {
        grid-template-columns: 1fr;
    }

    .project-card {
        width: 100%;
    }

    .contact {
        padding: 70px 5%;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-info {
        gap: 20px;
    }

    .contact-form {
        padding: 20px;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .contact-form button {
        width: 100%;
    }
}

@media screen and (min-width: 375px) and (max-width: 424px) {

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: block;
        position: relative;
        cursor: pointer;
    }

    .nav-link {
        display: none;
        font-size: 28px;
        position: absolute;
        top: 45px;
        right: -15px;
        width: 160px;
        background: var(--color-bg-tertiary);
        border: 1px solid var(--color-border);
        padding: 25px;
        gap: 100px;
        border-radius: 8px;
        box-shadow: var(--shadow-dark-heavy);
        z-index: 1;
    }

    .nav-links:hover .nav-link {
        display: block;
        position: absolute;
    }

    .nav-link a {
        color: var(--color-text-primary);
    }

    .hero-content {
        margin-top: 100px;
    }

    .hero-content,
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-image img,
    .about-image img {
        width: 250px;
        height: 250px;
    }

    .buttons {
        flex-direction: column;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .education {
        padding: 64px 6%;
    }

    .education .section-title h2 {
        font-size: 28px;
    }

    .edu-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .edu-right {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .project-card {
        width: 100%;
    }

    .contact {
        padding: 80px 6%;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .contact-info {
        gap: 20px;
    }

    .contact-form {
        padding: 25px;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .contact-form button {
        width: 100%;
    }
}

@media screen and (min-width: 425px) and (max-width: 767px) {

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: block;
        position: relative;
        cursor: pointer;
    }

    .nav-link {
        display: none;
        font-size: 28px;
        position: absolute;
        top: 45px;
        right: -18px;
        width: 160px;
        background: var(--color-bg-tertiary);
        border: 1px solid var(--color-border);
        padding: 25px;
        gap: 100px;
        border-radius: 8px;
        box-shadow: var(--shadow-dark-heavy);
        z-index: 1;
    }

    .nav-links:hover .nav-link {
        display: block;
        position: absolute;
    }

    .nav-link a {
        color: var(--color-text-primary);
    }

    .hero-content {
        margin-top: 100px;
    }

    .hero-content,
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-image img,
    .about-image img {
        width: 280px;
        height: 280px;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .education {
        padding: 72px 8%;
    }

    .education .section-title h2 {
        font-size: 30px;
    }

    .education-container {
        gap: 16px;
    }

    .edu-card {
        flex-direction: row;
        align-items: center;
        padding: 18px;
    }

    .edu-right {
        align-items: flex-end;
        text-align: right;
        min-width: 120px;
    }

    .project-card {
        width: 100%;
    }

    .contact {
        padding: 80px 7%;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        gap: 20px;
    }

    .contact-form {
        padding: 30px;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .contact-form button {
        width: 100%;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .hero-content {
        margin-top: 100px;
    }

    .hero-content,
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-image img,
    .about-image img {
        width: 320px;
        height: 320px;
    }

    .about-info {
        grid-template-columns: repeat(3, 1fr);
    }

    .education {
        padding: 80px 8%;
    }

    .education .section-title h2 {
        font-size: 34px;
    }

    /* two-column layout for education cards on wider tablets */
    .education-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .edu-card {
        padding: 20px;
    }

    .edu-right {
        min-width: 140px;
    }

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

    .project-container {
        justify-content: center;
    }

    .contact {
        padding: 90px 8%;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-info {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .contact-form {
        padding: 35px;
    }

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

@media screen and (min-width: 1024px) and (max-width: 1439px) {

    .hero-content,
    .about-container {
        gap: 40px;
    }

    .education {
        padding: 88px 10%;
    }

    .education .section-title h2 {
        font-size: 36px;
    }

    .education-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .edu-card {
        padding: 22px;
    }

    .contact-container {
        grid-template-columns: 1fr 1.3fr;
        gap: 40px;
    }

    .contact-form {
        padding: 35px;
    }
}