/* Warm Earth Tones Theme - Cozy and inviting */
* {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: rgb(220, 200, 180);
    box-sizing: border-box;
}

p {
    margin: 8px;
}

.card {
    max-width: 960px;
    padding-right: 32px;
}

.subhead {
    font-weight: medium;
}

.hi {
    font-size: 32px;
    font-weight: 600;
    color: rgb(240, 220, 200);
}

.per, li, .collapsible-content .content-inner {
    font-family: "Lora", serif;
    font-size: 14px;
    color: rgb(200, 180, 160);
}

.per {
    padding-left: 2px;
    padding-top: 4px;
}

li {
    margin: 8px;
}

#portrait {
    margin: 8px;
    max-width: 100%;
    height: auto;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

body {
    background-color: #2a2418;
    color: rgb(0, 0, 0);
    margin: 0;
    padding: 0;
}

.table {
    background-color: transparent;
    margin: -36px auto 0;
    border-spacing: 16px;
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    max-width: 100%;
}

.td1, .td2 {
    background-color: #352d20;
    padding: 32px;
    min-width: 300px;
}

.td1 {
    width: 30%;
    flex: 0 0 auto;
}

.td2 {
    width: 70%;
    flex: 1 1 auto;
}

a:link, a:visited {
    font-family: "Lora", serif;
    text-decoration: none;
}

a:link, .email-obfuscated, .email-text {
    color: rgb(220, 180, 140);
}

a:visited {
    color: rgb(200, 160, 120);
}

a:hover, #email-link:hover {
    color: rgb(240, 200, 160);
    text-decoration: underline;
}

.wrap-collabsible {
    margin-bottom: 1.2rem 0;
}

input[type='checkbox'] {
    display: none;
}

.lbl-toggle {
    display: block;
    cursor: pointer;
    border-bottom: 2px solid rgb(180, 140, 100);
    border-radius: 7px;
    transition: all 0.25s ease-out;
}

.lbl-toggle::before {
    content: ' ';
    display: inline-block;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid currentColor;
    vertical-align: middle;
    margin-right: .7rem;
    transform: translateY(-2px);
    transition: transform .2s ease-out;
}

.toggle:checked + .lbl-toggle::before {
    transform: rotate(90deg) translateX(-3px);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease-in-out;
}

.toggle:checked + .lbl-toggle + .collapsible-content {
    max-height: 100vh;
}

.toggle:checked + .lbl-toggle {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.collapsible-content .content-inner {
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    padding: .5rem 1rem;
}

/* Tablet and smaller desktop */
@media only screen and (max-width: 1024px) {
    .table {
        flex-direction: column;
        padding: 10px;
    }
    
    .td1, .td2 {
        width: 100%;
        padding: 20px;
    }
    
    .card {
        padding-right: 0;
        max-width: 100%;
    }
    
    #portrait {
        max-width: 400px;
        margin: 0 auto;
        display: block;
    }
}

/* Mobile devices */
@media only screen and (max-width: 768px) {
    .table {
        margin-top: 0;
        padding: 5px;
        border-spacing: 8px;
    }
    
    .td1, .td2 {
        padding: 16px;
        width: 100%;
    }
    
    .card {
        padding-right: 0;
    }
    
    #portrait {
        max-width: 100%;
        max-height: 400px;
        margin: 8px auto;
    }
    
    .hi {
        font-size: 28px;
    }
    
    p {
        margin: 6px;
    }
    
    .per, li {
        font-size: 13px;
    }
    
    li {
        margin: 6px;
    }
    
    .theme-toggle {
        padding: 16px;
        font-size: 13px;
    }
}

/* Small mobile devices */
@media only screen and (max-width: 480px) {
    .table {
        margin-top: 0;
        padding: 5px;
        border-spacing: 4px;
    }
    
    .td1, .td2 {
        padding: 12px;
    }
    
    #portrait {
        max-width: 100%;
        max-height: 300px;
        margin: 4px auto;
    }
    
    .hi {
        font-size: 24px;
    }
    
    * {
        font-size: 13px;
    }
    
    .per, li {
        font-size: 12px;
    }
    
    li {
        margin: 4px;
    }
    
    .collapsible-content .content-inner {
        padding: 0.4rem 0.8rem;
        font-size: 12px;
    }
    
    .lbl-toggle {
        font-size: 13px;
    }
    
    img[src*="email"], img[src*="linkedin"], img[src*="mathoverflow"] {
        height: 18px !important;
    }
    
    .theme-toggle {
        padding: 12px;
        font-size: 12px;
    }
    
    .theme-toggle select {
        font-size: 12px;
        padding: 4px 8px;
    }
}

.theme-toggle {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-family: "Lora", serif;
    font-size: 14px;
}

.theme-toggle label {
    margin-right: 10px;
    color: rgb(200, 180, 160);
}

.theme-toggle select {
    font-family: "Lora", serif;
    font-size: 14px;
    padding: 6px 12px;
    background-color: #352d20;
    color: rgb(200, 180, 160);
    border: 1px solid rgb(180, 140, 100);
    border-radius: 4px;
    cursor: pointer;
}

.theme-toggle select:hover {
    border-color: rgb(220, 180, 140);
}

.theme-toggle select:focus {
    outline: none;
    border-color: rgb(220, 180, 140);
    box-shadow: 0 0 4px rgba(180, 140, 100, 0.4);
}
