/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
    --text-color: #1a1c20;
    --link-color: #4a76ee;
    --background-color: #eeeff1;
    --card-background: #ffffff;
    --border-color: #d3d3d3;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   GLOBAL STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    max-width: 1400px;
    margin: 0 auto;
}

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

/* ==========================================
   NAVIGATION BAR - FIXED POSITION
   ========================================== */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 80px;
    background-color: var(--card-background);
    box-shadow: var(--shadow-light);
}

nav .left a {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;
    transition: color 0.3s;
}

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

nav .right a {
    color: var(--text-color);
    margin: 0 10px;
    transition: all 0.3s;
}

nav .right a:hover {
    color: var(--link-color);
    transform: translateY(-2px);
}

nav .right a:last-child {
    color: var(--card-background);
    background-color: var(--text-color);
    padding: 8px 16px;
    border-radius: 5px;
}

nav .right a:last-child:hover {
    background-color: var(--link-color);
    color: var(--card-background);
}

nav .right a span {
    margin-left: 5px;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 50px;
    margin-bottom: 40px;
    gap: 60px;
    background: linear-gradient(135deg, #ffffff 0%, var(--background-color) 100%);
}

.hero-section .text {
    flex: 5;
}

.hero-section .text h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-section .text p {
    font-size: 17px;
    line-height: 1.7;
    color: #4a4a4a;
    margin-bottom: 30px;
}

.hero-section .text .links {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-section .text .links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--link-color);
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.hero-section .text .links a:hover {
    background-color: var(--link-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hero-section .headshot {
    flex: 2;
    display: flex;
    justify-content: right;
}

.hero-section .headshot img {
    width: 350px;
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s;
}

.hero-section .headshot img:hover {
    transform: scale(1.05);
}

/* ==========================================
   SECTION HEADERS - CONSISTENT STYLING
   ========================================== */
section {
    padding: 60px 50px;
    margin-bottom: 20px;
}

section h2 {
    text-align: center;
    font-size: 38px;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--link-color);
    border-radius: 2px;
}

/* ==========================================
   EDUCATION SECTION
   ========================================== */
.education-section {
    background-color: var(--card-background);
}

.education-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 40px;
    justify-content: center;
}

.education-card {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
    max-width: 500px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--link-color);
    transition: all 0.3s;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.edu-logo-wrapper {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-light);
}

.edu-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.edu-content {
    flex-grow: 1;
    width: 100%;
}

.edu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 15px;
    gap: 8px;
}

.edu-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--text-color);
    font-weight: 600;
}

.date {
    font-size: 14px;
    color: #666;
    background-color: #e8f0ff;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.major {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 17px;
    text-align: center;
    color: var(--link-color);
}

.edu-details p {
    margin: 8px 0;
    line-height: 1.7;
    font-size: 15px;
    text-align: center;
    color: #4a4a4a;
}

.edu-details p strong {
    color: var(--text-color);
}

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

.projects-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 35px;
    transition: all 0.3s;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--link-color);
}

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

.project-img {
    flex: 1;
    min-width: 280px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 20px;
}

.project-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-content {
    flex: 1.5;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.code-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 8px 16px;
    border: 2px solid var(--link-color);
    border-radius: 20px;
    color: var(--link-color);
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    align-self: flex-start;
    margin-bottom: 20px;
}

.code-btn:hover {
    background-color: var(--link-color);
    color: #fff;
    transform: translateX(5px);
}

.project-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.project-content li {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 10px;
    color: #4a4a4a;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.skill-tags span {
    font-size: 13px;
    background-color: #e8f0ff;
    color: var(--link-color);
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 500;
    transition: all 0.2s;
}

.skill-tags span:hover {
    background-color: var(--link-color);
    color: white;
    transform: translateY(-2px);
}

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills-section {
    background-color: var(--card-background);
}

.skills-section .text {
    text-align: center;
    margin-bottom: 40px;
    font-size: 17px;
    color: #4a4a4a;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.skills-section .cells {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
    gap: 15px;
}

.skills-section .cells .cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 180px;
    padding: 15px 20px;
    background-color: var(--background-color);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s;
    box-shadow: var(--shadow-light);
}

.skills-section .cells .cell:hover {
    border-color: var(--link-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    background-color: white;
}

.skills-section .cells .cell img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 2px;
}

.skills-section .cells .cell span {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

/* Image box for consistent sizing */
.img-box {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-section {
    background-color: var(--background-color);
    margin-bottom: 0;
}

.contact-section .group {
    display: flex;
    justify-content: center;
}

.contact-section .group form {
    flex: 1;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.contact-section .group form label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.contact-section .group form input,
.contact-section .group form textarea {
    font-family: 'Poppins', sans-serif;
    border: 2px solid var(--border-color);
    background-color: var(--background-color);
    padding: 12px;
    margin-bottom: 20px;
    outline: none;
    resize: none;
    border-radius: 8px;
    transition: border-color 0.3s;
    font-size: 15px;
}

.contact-section .group form input:focus,
.contact-section .group form textarea:focus {
    border-color: var(--link-color);
}

.contact-section .group form button {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #fff;
    background-color: var(--link-color);
    border: none;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.contact-section .group form button:hover {
    background-color: #3a66de;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    padding: 30px 0;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-center {
    text-align: center;
    color: #666;
}

/* ==========================================
   RESPONSIVE DESIGN - TABLET
   ========================================== */
@media (max-width: 1024px) {
    .education-container {
        flex-direction: column;
        max-width: 600px;
    }

    .education-card {
        max-width: 100%;
    }
}

@media (max-width: 850px) {
    .hero-section {
        padding: 60px 30px;
    }

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

    section {
        padding: 50px 30px;
    }

    .project-card {
        flex-direction: column;
    }

    .project-img {
        width: 100%;
        min-width: auto;
        padding: 15px;
    }

    .project-img img {
        max-height: 300px;
        object-fit: contain;
    }
}

/* ==========================================
   RESPONSIVE DESIGN - MOBILE
   ========================================== */
@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    section {
        padding: 40px 20px;
    }

    section h2 {
        font-size: 32px;
    }

    .education-card {
        padding: 25px;
        gap: 15px;
    }

    .edu-logo-wrapper {
        width: 80px;
        height: 80px;
    }

    .edu-header h3 {
        font-size: 20px;
    }

    .skills-section .cells .cell {
        width: 160px;
    }

    .contact-section .group form {
        padding: 30px 25px;
    }
}

@media (max-width: 740px) {
    .hero-section {
        flex-direction: column-reverse;
        padding: 50px 20px;
    }

    .hero-section .headshot img {
        width: 280px;
    }
}

@media (max-width: 600px) {
    nav .right a {
        font-size: 20px;
        margin: 0 5px;
    }

    nav .right a:last-child {
        color: var(--text-color);
        background-color: transparent;
        padding: 0;
    }

    nav .right a span {
        display: none;
    }

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

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

    section h2 {
        font-size: 28px;
    }

    .skills-section .cells .cell {
        width: 140px;
        padding: 12px 15px;
    }

    .skills-section .cells .cell span {
        font-size: 14px;
    }
}