/* Exact Stanford Profile Theme Replication */
:root {
    --stanford-red: #8C1515;
    --stanford-dark-red: #820000;
    --gray-bg: #f3f4f5;
    --gray-border: #e1e3e4;
    --gray-text: #4d4f53;
    --dark-text: #2e2d29;
    --link-color: #00508c;
    --white: #ffffff;
}

body {
    font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--dark-text);
    background-color: #f1f0ea; /* Stanford beige background */
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
    color: var(--stanford-red);
}

ul.unstyled {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 970px;
    margin: 0 auto;
    padding: 0 15px;
}

.row-fluid {
    display: flex;
    flex-wrap: wrap;
}

.span12 {
    width: 100%;
}

.span8 {
    width: 66.6666%;
    padding-right: 40px;
    box-sizing: border-box;
}

.span4 {
    width: 33.3333%;
    box-sizing: border-box;
}

/* Header */
#header {
    background-color: var(--stanford-red);
    height: 60px;
    display: flex;
    align-items: center;
}

#header .container.navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.column-logo.brand {
    display: flex;
    align-items: center;
    color: var(--white);
}

.stanford-logo a {
    color: var(--white);
    font-family: "Source Serif Pro", Georgia, Times, serif;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    margin-right: 15px;
}

.site-name-1 {
    color: var(--white);
    font-size: 20px;
    font-weight: 300;
}

.site-name a {
    text-decoration: none;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 20px;
    padding: 6px 15px;
    width: 280px;
}

.header-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
    color: #333;
}

.header-search i {
    color: #666;
}

.header-links a {
    color: var(--white);
    margin-left: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.header-links a:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Masthead */
.banner.profile {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    padding: 50px 0;
    border-bottom: 1px solid var(--gray-border);
}

.masthead-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(120, 90, 40, 0.7), rgba(60, 40, 20, 0.85));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1;
}

.banner.profile .container {
    position: relative;
    z-index: 2;
}

.masthead-content-row {
    display: flex;
    align-items: flex-start;
}

.image-holder {
    width: 200px;
    margin-right: 40px;
    flex-shrink: 0;
}

.image-holder img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    object-fit: cover;
}

.nameAndTitle {
    flex-grow: 1;
    color: var(--white);
}

.name-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.nameAndTitle h1 {
    font-size: 42px;
    font-weight: 600;
    margin: 0;
    color: var(--white);
    letter-spacing: -0.5px;
}

.nameAndTitle h2 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.5;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nameAndTitle h3 {
    font-size: 15px;
    font-weight: 400;
    color: #e2e2e2;
    margin: 0;
}

/* Actions in Masthead */
.right-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.right-actions li {
    margin: 0;
}

.right-actions a {
    display: flex;
    align-items: center;
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.right-actions .icon-background {
    background-color: rgba(255,255,255,0.25);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    color: var(--white);
    transition: all 0.2s;
}

.right-actions a:hover .icon-background {
    background-color: rgba(255,255,255,0.4);
}

.right-actions a:hover {
    text-decoration: none;
}

/* Tabs Layout */
#tabbedLayoutContainer {
    max-width: 970px;
    margin: 40px auto 50px auto;
    background-color: var(--white);
    border: 1px solid #dcdcdc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    background-color: #edebe4; /* Beige background for the tab bar */
    border-bottom: 1px solid #dcdcdc;
}

.nav-tabs li {
    flex: 1;
    text-align: center;
    border-right: 1px solid #dcdcdc;
    margin: 0;
}

.nav-tabs li:last-child {
    border-right: none;
}

.nav-tabs li a {
    display: block;
    padding: 15px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    border: none;
    border-radius: 0;
    background-color: transparent;
    margin: 0;
}

.nav-tabs li a:hover {
    background-color: #e5e3db;
    text-decoration: none;
}

.nav-tabs li.active {
    background-color: var(--white);
    position: relative;
    top: 1px; /* Cover the bottom border */
}

.nav-tabs li.active a, .nav-tabs li.active a:hover, .nav-tabs li.active a:focus {
    color: var(--dark-text) !important;
    background-color: transparent !important;
    border: none !important;
    border-top: 3px solid var(--stanford-red) !important;
    padding-top: 12px; /* Compensate for the 3px top border */
}

.tab-content {
    background-color: var(--white); /* Ensure the entire content area is white */
    padding: 20px 40px 40px 40px;
    box-shadow: none;
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
    font-size: 16px;
    line-height: 1.6;
    color: #4d4d4f;
}

.content-section h3 {
    font-size: 28px;
    font-weight: 400;
    color: var(--stanford-red);
    margin: 0 0 25px 0;
    position: relative;
    padding-bottom: 12px;
}

.content-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 4px;
    background-color: var(--stanford-red);
}

.content-section hr {
    display: none;
}

.content-section p {
    margin-bottom: 25px;
}

/* Lists */
.section-listing {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-list-item {
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.section-list-item:last-child {
    border-bottom: none;
}

.description {
    color: #767676; /* Lighter gray for secondary text */
}

.description strong {
    color: #4d4d4f; /* Darker gray for titles */
    font-weight: normal; /* Match Stanford's non-bold, dark titles */
}

.description.bulleted {
    padding-left: 1em;
}

.description.bulleted::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #d1d1d1;
    margin-right: 12px;
    margin-left: -1em;
    vertical-align: middle;
    margin-top: -2px;
}

/* .section-list-item padding-left was causing misalignment for non-bulleted items */

.bulleted-sublist {
    list-style-type: none;
    margin-top: 5px;
    margin-left: 0;
    padding-left: 20px;
    color: #767676; /* Lighter gray for secondary bullet text */
}

.bulleted-sublist li {
    margin-bottom: 5px;
    position: relative;
}

.bulleted-sublist li::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 8px; /* vertically center with text */
    width: 6px;
    height: 6px;
    background-color: #d1d1d1;
}

/* Sidebar */
.side-bar {
    background-color: var(--white);
}

.side-bar .content-section h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--stanford-red);
    margin-bottom: 10px;
}

.contact-info .name {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-info .email {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    word-break: break-all;
    color: #005587; /* Stanford blue */
    font-size: 15px;
}

.contact-info .email i {
    font-size: 18px;
    color: #005587;
    margin-right: 12px !important;
}

.phone, .address {
    color: #4d4d4f;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.phone i, .address i {
    font-size: 18px;
    color: #4d4d4f;
    margin-right: 12px !important;
}

.links .external-link {
    margin-bottom: 10px;
}

.links .external-link a {
    display: flex;
    align-items: center;
}

.links .external-link a::before {
    content: "\f0c1"; /* FontAwesome link icon */
    font-family: "FontAwesome";
    color: var(--white);
    background-color: #e8a810; /* Stanford Gold icon bg */
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: 12px;
}

.links .external-link a.cv::before {
    content: "\f019"; /* FontAwesome download icon */
}

.mobile-tab-toggle {
    display: none;
    padding: 15px 20px;
    background-color: #f2f2f0;
    color: #8c734b;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
}

/* Responsive */
@media (max-width: 767px) {
    .masthead-content-row {
        display: grid;
        grid-template-columns: 140px 1fr;
        grid-template-areas: 
            "img h1"
            "img h2"
            "img h3"
            "img h4"
            "actions actions";
        column-gap: 15px;
        text-align: left;
    }
    
    .image-holder {
        grid-area: img;
        width: 140px;
        margin: 0;
    }

    .image-holder img {
        width: 140px;
        height: 140px;
    }
    
    .nameAndTitle, .name-actions-row {
        display: contents;
    }
    
    .name-actions-row h1 {
        grid-area: h1;
        margin-top: 0;
        font-size: 20px !important;
    }
    
    .nameAndTitle h2 {
        grid-area: h2;
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }
    
    .nameAndTitle h3 {
        grid-area: h3;
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }
    
    .nameAndTitle h4 {
        grid-area: h4;
        font-size: 11px !important;
    }

    .right-actions {
        grid-area: actions;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        margin-top: 35px;
        margin-bottom: 20px !important;
        gap: 15px;
    }
    
    .span8, .span4 {
        width: 100%;
        padding-right: 0;
        float: none;
        display: block;
    }
    
    .row-fluid {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-tab-toggle {
        display: flex;
    }
    
    #tabbedLayoutContainer {
        margin-top: 0;
    }

    .nav-tabs {
        flex-direction: column;
        display: none;
    }
    
    .nav-tabs.open {
        display: flex;
    }
    
    .nav-tabs li {
        text-align: left;
    }

    .nav-tabs li a {
        border-radius: 0;
        border-bottom: 1px solid var(--gray-border);
    }

    #header {
        height: auto;
        padding: 10px 0;
    }

    #header .container.navbar {
        flex-direction: row;
        gap: 15px;
        flex-wrap: nowrap;
    }

    .header-search {
        width: auto;
        flex-grow: 1;
        max-width: none;
        box-sizing: border-box;
    }

    .stanford-logo a {
        font-size: 18px;
        margin-right: 8px;
    }

    .site-name-1 {
        font-size: 15px;
    }

    body {
        font-size: 13px;
    }

    .nameAndTitle h1 {
        font-size: 24px;
    }

    .tab-content {
        padding: 20px 15px;
    }

    .content-section {
        margin-bottom: 25px;
    }

    .content-section h3 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .content-section p {
        font-size: 15px;
        margin-bottom: 15px;
        line-height: 1.5;
    }
}
/* Modern Resume Items styling */
.item-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    display: inline;
}

.item-title::after {
    content: "\A";
    white-space: pre;
}

.item-subtitle {
    font-size: 0.95em;
    color: #666;
    display: inline;
}

.item-subtitle::after {
    content: " | ";
    color: #ccc;
    margin: 0 4px;
}

.item-date {
    font-size: 0.9em;
    color: #999;
    display: inline-block;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .item-title {
        font-size: 1.0em;
    }
    .item-subtitle {
        font-size: 0.85em;
        display: block;
    }
    .item-subtitle::after {
        display: none;
    }
    .item-date {
        font-size: 0.8em;
        display: block;
        margin-top: 2px;
    }
}
