:root{
    --text-color: #1a1c20;
    --link-color: #0084ff; 
    --background-color: #eeeff1;
}

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

html{
    scroll-behavior: smooth;
}

body{
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
}

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

/* Nav Bar */
nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    padding: 0 50px;
    height: 80px;
}

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

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

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

/* Section 1: Hero */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    margin: 50px 0;
    gap: 40px;
    margin-bottom: 10px;
}

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

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

.hero-section .text .links {
    margin-top: 25px;
}

.hero-section .text .links a {
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid var(--link-color);
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: 0.1s;
}

.hero-section .text .links a:hover {
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

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

.hero-section .headshot img {
    border-radius: 50%;
    width: 350px;
}

/* Section: Motivational Quote*/
.motivation-section {
    padding: 0 50px;
    margin-bottom: 25px;
}

.motivation-section h3 {
    text-align: center;
}

/* Section 2: Skills*/
.skills-section {
    padding: 0 50px;
    margin-bottom: 25px;
}

.skills-section h2 {
    text-align: center;
    font-size: 35px; 
}

.skills-section .text {
    text-align: center;
    margin-bottom: 20px;
}

.skills-section .cells {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.skills-section .cells .cell {
    display: flex;
    justify-self: center;
    align-items: center;
    gap:10px;

    width: 200px;
    padding: 10px 20px;
    margin: 10px;
    border: 1.5px solid #d3d3d3;
    border-radius: 5px;
    font-size: 18px;
}

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

/* Section 3: Projects */
.projects-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.projects-section h2 {
    text-align: center;
    font-size: 35px; 
}

.projects-section .text {
    text-align: center;
    margin-bottom: 20px;
}

.projects-section .cells {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.projects-section .cells .cell {
    display: flex;
    flex-direction: column;
    justify-self: center;
    align-items: center;
    gap: 10px;

    width: 100%;
    max-width: 800px;

    padding: 10px 20px;
    margin: 10px;
    border: 1.5px solid #d3d3d3;
    border-radius: 5px;
    font-size: 18px;
}

.projects-section .cells .cell:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
}

.projects-section .cells .cell h3 {
    text-align: center;
}


/* Section 4: Publications */
.publications-section {
    padding: 0 50px;
    margin-bottom: 100px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.publications-section h2 {
    text-align: center;
    font-size: 35px;
}


.publications-section .text {
    text-align: center;
    margin-bottom: 20px;
}

.publications-section .cells {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.publications-section .cells .cell {
    display: flex;
    flex-direction: column;
    justify-self: center;
    gap: 10px;

    width: 100%;
    max-width: 800px;
    padding: 10px 20px;
    margin: 10px;
    border: 1.5px solid #d3d3d3;
    border-radius: 5px;
    font-size: 18px;
}

.publications-section .cells .cell:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
}

.publications-section .cells .cell h3 {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0;
}

/*Section 5: Contact*/
.contact-section {
    padding: 0 50px;
    margin-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-section h2 {
    text-align: center;
    font-size: 35px;
}

.contact-section .text {
    text-align: center;
    margin-bottom: 30px;
    max-width: 600px;
}

/* Form Container */
.contact-container {
    width: 100%;
    max-width: 800px; /* Matches your publication section width */
    background: #fff;
    padding: 30px;
    border: 1.5px solid #d3d3d3;
    border-radius: 8px;
}

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

/* Layout for Name and Email on the same line */
.input-group {
    display: flex;
    gap: 15px;
}

/* Styling inputs and textarea */
.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: #0084ff; 
}

/* The Submit Button */
.submit-btn {
    padding: 12px 25px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    align-self: center; /* Centers button in the form */
    transition: background 0.3s;
}

.submit-btn:hover {
    background-color: #555;
}



/* Responsive adjustment for small screens */
@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
    }
}


@media (max-width: 930px){
    /* Section 1: Hero*/
    .hero-section .text .h2 {
        font-size: 35px;
    }
}

@media (max-width: 820px){
    /* Section 1: Hero*/
    .hero-section{
        flex-direction: column-reverse;}

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

@media (max-width: 670px){
    /* Nav Bar*/
    nav{
        padding: 0 20px;
    }

    nav .right a {
        font-size: 22px;
    }

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

    nav .right a span {
        display:none;
    }

    /* Section1: hero*/
    .hero-section {
        padding: 0 20px;
    }

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

    
    /* Section 2: Skills*/
    .skills-section {
        padding: 0 20px;
    }

    .skills-section .cells .cell span {
        font-size: 16px;
    }
    
    /* Section 3: Projects*/
    .projects-section {
        padding: 0 20px;
    }

    /*Section 4: Publications*/
    .publications-section {
        padding: 0 20px;
    }

    /*Section 5: Contact*/
    .contact-section {
        padding: 0 20px;
    }

}

/* Modal Background (dimmer) */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* Semi-transparent black */
    align-items: center;
    justify-content: center;
}


/* Modal Box */
.modal-content {
    position: relative;
    background: white;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    animation: popIn 0.2s ease-out;
}

.modal-content h3,
.modal-content h4 {
    margin-bottom: 10px;
    color: var(--text-color);
    text-align: center;
}

.modal-content p {
    margin-bottom: 20px;
    color: #666;
    text-align: justify;
}

/* Animation to make it "pop" */
@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Make publication cells clickable */
.projects-section .cells .cell {
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}

.projects-section .cells .cell:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
}


.publications-section .cells .cell {
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}

.publications-section .cells .cell:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
}

/* Close button inside modal */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 26px;
    text-decoration: none;
    color: #333;
}

