:root {
    --primary-color: #0095eb;
    --primary-dark: #0077be;
    --text-color: #333;
    --text-light: #666;
    --background-color: #ffffff;
    --background-alt: #f9f9f9;
    --card-background: #f8f9fa;
    --border-color: #e9ecef;
    --navbar-height: 70px;
}

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

body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    padding-top: var(--navbar-height);
    font-size: 18px;
}

/* Container styles */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-xs-12 { flex: 0 0 100%; max-width: 100%; padding: 0 15px; }
.col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; padding: 0 15px; }
.col-sm-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; padding: 0 15px; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 15px; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 15px; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }

/* Navigation styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: var(--navbar-height);
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
}

.icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    margin: 4px 0;
}

.navbar-collapse {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-item a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

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

/* Home section styles */
.home-section {
    padding: 4rem 0;
    min-height: auto;
}

/* Alternating section backgrounds */
.home-section:nth-child(odd) {
    background-color: var(--background-color);
}

.home-section:nth-child(even) {
    background-color: var(--background-alt);
}

.section-heading {
    margin-bottom: 3rem;
}

.section-heading h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

/* Profile styles */
#profile {
    text-align: center;
    padding: 2rem 1rem;
}

.portrait {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 4px solid var(--primary-color);
}

.portrait-title h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.portrait-title h3 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Social network icons */
.network-icon {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
}

.network-icon li {
    margin: 0 0.5rem;
}

.network-icon a {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.network-icon a:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Biography section */
#biography {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

#about .col-md-8 > p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

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

.ul-interests li {
    padding: 0.75rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.ul-interests li:before {
    content: "▸ ";
    color: var(--primary-color);
    margin-right: 0.5rem;
}

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

.ul-edu li {
    position: relative;
    padding: 1rem 0 1rem 3rem;
    border-bottom: 1px solid var(--border-color);
}

.ul-edu li:last-child {
    border-bottom: none;
}

.fa-li {
    position: absolute;
    left: 0;
    top: 1.2rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.description .course {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.description .institution {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Blog post styles */
.card-simple {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.card-simple:last-of-type {
    border-bottom: none;
}

.article-metadata {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.article-date {
    color: var(--text-light);
}

.middot-divider {
    padding: 0 0.5rem;
}

.middot-divider::after {
    content: "·";
}

.article-reading-time {
    color: var(--text-light);
}

.article-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-style {
    margin-bottom: 1rem;
}

.article-style p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 0;
}

.read-more {
    margin-top: 1rem;
}

/* Project styles */
.projects-container {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
}

.project-item {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.card-image {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-placeholder {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.card-text {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-text h4 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-text h4 a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.card-text h4 a:hover {
    color: var(--primary-color);
}

.card-description {
    flex-grow: 1;
}

.card-description p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Contact intro styles */
.contact-intro {
    margin-bottom: 2rem;
}

.contact-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 0;
}

/* Contact form styles */
.contact-form {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 149, 235, 0.2);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer styles */
.site-footer {
    background-color: var(--card-background);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.powered-by {
    text-align: center;
    color: var(--text-light);
    margin: 0;
}

.pull-right {
    float: right;
}

#back_to_top {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

#back_to_top:hover {
    color: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .col-xs-12,
    .col-sm-5,
    .col-sm-6,
    .col-sm-7,
    .col-md-4,
    .col-md-8,
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .navbar-collapse.show {
        display: flex !important;
        flex-direction: column;
    }

    .nav {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .home-section {
        padding: 2rem 0;
        min-height: auto;
    }

    .section-heading h1 {
        font-size: 2rem;
    }

    .portrait-title h2 {
        font-size: 1.5rem;
    }

    #profile {
        margin-bottom: 2rem;
    }

    .network-icon {
        flex-wrap: wrap;
    }

    .ul-edu li {
        padding-left: 2rem;
    }

    .fa-li {
        left: -0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .portrait {
        width: 150px;
        height: 150px;
    }

    .network-icon a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.2rem;
    }

    .card-text {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}
