:root {
    --main-color: #3E494E;
    --base-color-hover: darken(var(--main-color), 10%);
    --background-color: #fff;
    --background-alt-color: #f2f2f5;
    --border-color: #dcd9d9;
    --heading-color: #374054;
    --text-color: #74808a;
}

a:visited{
    text-decoration: none;
}

body {
    font-family: 'Lato', sans-serif;
    font-size: 16px
}

body.active {
    overflow: hidden;
    z-index: -1
}

.no-js #experience-timeline>div {
    background: var(--background-color);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color)
}

.no-js #experience-timeline>div h3 {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--heading-color);
    display: inline-block;
    margin: 0
}

.no-js #experience-timeline>div h4 {
    font-size: 1.2em;
    font-weight: 300;
    color: #7e8890;
    margin: 0 0 15px 0
}

.no-js #experience-timeline>div p {
    color: var(--text-color);
    font-size: 0.9em;
    margin: 0
}

.no-js #experience-timeline:before,
.no-js #experience-timeline:after {
    content: none
}

@keyframes dropHeader {
    0% {
        transform: translateY(-100%)
    }

    100% {
        transform: translateY(0)
    }
}

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    animation-name: dropHeader;
    animation-iteration-count: 1;
    animation-timing-function: ease;
    animation-duration: 0.75s
}

header ul {
    display: inline-block;
    background: var(--background-color);
    text-align: center;
    padding: 10px;
    margin: 0;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px
}

header li {
    display: inline-block
}

header a {
    display: block;
    color: var(--main-color);
    padding: 10px
}

header a:hover {
    color: #217dbb;
    text-decoration: none;
    background: #eee;
    border-radius: 3px
}

header a:focus {
    color: var(--main-color);
    text-decoration: none
}

header.active {
    display: block
}

header.sticky {
    position: fixed;
    z-index: 999
}

#menu.active {
    display: block
}

#mobile-menu-open {
    display: none;
    cursor: pointer;
    position: fixed;
    right: 15px;
    top: 10px;
    color: var(--main-color);
    font-size: 1.5em;
    z-index: 20;
    padding: 0 7px;
    border-radius: 3px;
    background: var(--background-color)
}

#mobile-menu-close {
    display: none;
    text-align: right;
    width: 100%;
    background: var(--background-color);
    font-size: 1.5em;
    padding-right: 15px;
    padding-top: 10px;
    cursor: pointer;
    color: var(--main-color)
}

#mobile-menu-close span {
    font-size: 0.5em;
    text-transform: uppercase
}

#mobile-menu-close i {
    vertical-align: middle
}

.copyright {
    padding-top: 10px
}

.copyright p {
    margin: 0;
    color: var(--text-color)
}

.top {
    text-align: center;
    margin-bottom: 0.5em;
}

.top span {
    cursor: pointer;
    display: block;
    margin: 15px auto 0 auto;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid #b9bfc4;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.top span:hover {
    border-color: var(--background-alt-color);
    background: var(--main-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(62, 73, 78, 0.3);
}

.top i {
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.top span:hover i {
    color: var(--background-color);
    transform: translateY(-3px);
}

.social {
    text-align: right;
    margin-top: 0.4em;
}

.social ul {
    margin: 5px 0 0 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.social li {
    display: inline-block;
    font-size: 1.25em;
    list-style: none
}

.social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    padding: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.social a i {
    font-size: 1.25em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
}

.social a:hover {
    color: var(--background-color);
    background: var(--main-color);
    border-radius: 50%;
    transform: translateY(-5px) scale(1.2);
    box-shadow: 0 12px 25px rgba(62, 73, 78, 0.4);
}

.social a:hover i {
    transform: scale(1.2);
}

.btn-rounded-white {
    display: inline-block;
    color: var(--background-color);
    padding: 15px 25px;
    border: 3px solid var(--background-color);
    border-radius: 4px;
    transition: .5s ease all
}

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

/* See All Projects button specific styling */
.see-all-projects-btn {
    font-size: 1.1em;
    background: var(--main-color);
    color: var(--background-color) !important;
    border-color: var(--main-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.see-all-projects-btn:hover {
    background: var(--background-color);
    color: var(--main-color) !important;
    border-color: var(--main-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)
}

.shadow-large {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.15)
}

.heading {
    position: relative;
    display: inline-block;
    font-size: 2em;
    font-weight: 300;
    margin: 0 0 30px 0
}

.heading:after {
    position: absolute;
    content: '';
    top: 100%;
    height: 1px;
    width: 85%;
    left: 0;
    right: 0;
    margin: 0 auto;
    background: var(--main-color)
}

.heading i {
    margin-right: 5px;
    font-size: 0.85em;
    margin-bottom: 5px;
    vertical-align: middle;
}

.background-alt {
    background: var(--background-alt-color)
}

#lead {
    position: relative;
    height: 100vh;
    min-height: 500px;
    max-height: 1080px;
    background: url(../images/lead-bg.jpg);
    background-size: cover;
    padding: 15px;
    overflow: hidden
}

#lead-content {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center
}

#lead-content h1,
#lead-content h2 {
    margin: 0
}

#lead-content h1 {
    color: var(--background-color);
    font-weight: 900;
    font-size: 5em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1em
}

#lead-content h2 {
    color: #a0cfee;
    font-weight: 500;
    font-size: 2.25em;
    margin-bottom: 15px
}

#lead-overlay {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--main-color);
    opacity: 0.75;
    z-index: 1
}

#lead-down {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
    bottom: 15px;
    color: var(--background-color)
}

#lead-down span {
    cursor: pointer;
    display: block;
    margin: 0 auto;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid #a0cfee;
    text-align: center
}

#lead-down i {
    animation: pulsate 2s ease;
    animation-iteration-count: infinite;
    padding-top: 6px
}

@keyframes pulsate {
    0% {
        transform: scale(1, 1)
    }

    50% {
        transform: scale(1.25, 1.25)
    }

    100% {
        transform: scale(1, 1)
    }
}

#about {
    padding: 75px 15px 30px 15px;
    border-bottom: 1px solid var(--border-color)
}

#about h2 {
    color: var(--heading-color)
}

#about p {
    color: var(--text-color);
    margin: 0
}

#experience {
    padding: 50px 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color)
}

#experience h2 {
    color: var(--heading-color)
}

#experience-timeline {
    margin: 30px auto 0 auto;
    position: relative;
    max-width: 1000px
}

#experience-timeline:before {
    position: absolute;
    content: '';
    top: 0;
    bottom: 0;
    left: 303px;
    right: auto;
    height: 100%;
    width: 3px;
    background: var(--main-color);
    z-index: 0
}

#experience-timeline:after {
    position: absolute;
    content: '';
    width: 3px;
    height: 40px;
    background: var(--main-color);
    background: linear-gradient(to bottom, var(--main-color), rgba(52, 152, 219, 0));
    top: 100%;
    left: 303px
}

.vtimeline-content {
    margin-left: 350px;
    background: var(--background-color);
    border: 1px solid #e6e6e6;
    padding: 15px;
    border-radius: 3px;
    text-align: left;
    position: relative;
}

.view-details-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--text-color);
    color: var(--background-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 10;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: var(--heading-color);
    color: var(--background-color);
    transform: scale(1.2);
    text-decoration: none;
}

.view-details-btn i {
    font-size: 14px;
}

/* Tooltip styles */
.view-details-btn::before {
    content: "View Details";
    position: absolute;
    top: 50%;
    right: 45px;
    transform: translateY(-50%);
    background: var(--heading-color);
    color: var(--background-color);
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
}

.view-details-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 37px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--heading-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
}

.view-details-btn:hover::before,
.view-details-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

.vtimeline-content h3 {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--heading-color);
    display: inline-block;
    margin: 0
}

.vtimeline-content h4 {
    font-size: 1.2em;
    font-weight: 300;
    color: #7e8890;
    margin: 0 0 15px 0
}

.vtimeline-content p {
    color: var(--text-color);
    font-size: 0.9em;
    margin: 0
}

.vtimeline-point {
    position: relative;
    display: block;
    margin-bottom: 30px
}

.vtimeline-icon {
    position: relative;
    color: var(--background-color);
    width: 50px;
    height: 50px;
    background: var(--main-color);
    border-radius: 50%;
    float: left;
    z-index: 99;
    margin-left: 280px
}

.vtimeline-icon i {
    display: block;
    font-size: 2em;
    margin-top: 10px
}

.vtimeline-date {
    width: 260px;
    text-align: right;
    position: absolute;
    left: 0;
    top: 10px;
    font-weight: 300;
    color: var(--heading-color)
}

#education {
    padding: 50px 15px 20px 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: center
}

#education h2 {
    color: var(--heading-color);
    margin-bottom: 50px
}

.education-block {
    max-width: 700px;
    margin: 0 auto 30px auto;
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: left
}

.education-block h3 {
    font-weight: 500;
    float: left;
    margin: 0;
    color: var(--heading-color)
}

.education-block span {
    color: var(--text-color);
    float: right
}

.education-block h4 {
    color: var(--text-color);
    clear: both;
    font-weight: 500;
    margin: 0 0 15px 0
}

.education-block p,
.education-block ul {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9em
}

.education-block ul {
    padding: 0 0 0 15px
}

.btn-rounded-black {
    display: inline-block;
    color: var(--background-color);
    padding: 15px 25px;
    border: 3px solid var(--background-color);
    border-radius: 4px;
    transition: .5s ease all;
    background: var(--main-color);
    text-decoration: none;
}

.btn-rounded-black:hover {
    color: var(--main-color);
    background: var(--background-color);
    text-decoration: none;
    border: 3px solid var(--main-color);
}

.btn-rounded-black-inverted {
    display: inline-block;
    color: var(--main-color);
    padding: 15px 25px;
    border: 3px solid var(--main-color);
    border-radius: 4px;
    background: var(--background-color);
    transition: .5s ease all;
    text-decoration: none;
    margin: 5px
}

.btn-rounded-black-inverted:hover {
    color: var(--background-color);
    background: var(--main-color);
    border: 3px solid var(--main-color);
    text-decoration: none;
}

.btn-rounded-black i,
.btn-rounded-black-inverted i {
    margin-right: 0.35em;
}

#projects {
    padding: 50px 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: center
}

#projects h2 {
    color: var(--heading-color);
    margin-bottom: 50px
}

#projects .container .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Override Bootstrap's clearfix pseudo-elements that cause empty first row */
#projects .container .row:before,
#projects .container .row:after {
    content: none !important;
    display: none !important;
}

/* Responsive grid for different screen sizes */
@media only screen and (min-width: 768px) {
    #projects .container .row {
        grid-template-columns: 1fr 1fr;
    }
}

@media only screen and (min-width: 1200px) {
    #projects .container .row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.project {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--background-color);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Horizontal layout for single column (mobile) */
@media only screen and (max-width: 767px) {
    .project {
        position: relative;
        max-width: 900px;
        margin: 0 auto 8px auto;
        overflow: hidden;
        background: var(--background-color);
        border-radius: 4px;
        min-height: 200px;
        display: block;
        /* Override flex layout */
        height: auto;
        min-height: 240px;
        padding: 10px;
    }

    #projects .container .row {
        gap: 10px;
    }

    .project-image {
        float: left !important;
        margin-left: 0 !important;
        width: auto !important;
        height: 240px !important;
        padding-bottom: 0 !important;
        padding: 0 !important;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    .project-image img {
        position: static !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        max-width: 180px !important;
        max-height: 220px !important;
        display: block !important;
        object-fit: contain !important;
    }

    .project-info {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 180px;
        padding: 10px;
        width: auto;
        display: block;
    }

    .project-info h3 {
        font-size: 1.5em;
        font-weight: 300;
        color: var(--heading-color);
        margin: 0 0 15px 0;
    }

    .project-info p {
        color: var(--text-color);
        margin: 0 0 15px 0;
        padding: 7px;
        font-size: 0.9em;
        text-align: left;
    }
}

/* For very narrow screens, switch to vertical layout */
@media only screen and (max-width: 550px) {
    .project {
        min-height: auto;
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .project-image {
        float: none !important;
        margin: 0 auto 15px auto !important;
        text-align: center;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 50% !important;
    }

    .project-image img {
        max-width: 200px !important;
        margin: 0 auto;
        display: block !important;
    }

    .project-info {
        position: static !important;
        transform: none !important;
        margin-left: 0 !important;
        padding: 0;
        width: 100%;
        text-align: center;
    }
}

.project-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    /* This creates a square aspect ratio */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed from cover to contain to maintain aspect ratio */
    object-position: center;
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-info h3 {
    font-size: 1.3em;
    font-weight: 300;
    color: var(--heading-color);
    margin: 0 0 10px 0
}

.project-info p {
    color: var(--text-color);
    margin: 0 0 15px 0;
    font-size: 0.9em;
    text-align: left;
    line-height: 1.4;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.no-image .project-info {
    position: relative;
    margin: 0;
    padding: 30px 15px;
    transform: none
}

.project-info a {
    display: inline-block;
    color: var(--text-color);
    min-width: 80px;
    flex: 1;
    height: 2.5em;
    padding: 0;
    border: 2px solid var(--text-color);
    border-radius: 3px;
    transition: .35s ease all;
    font-size: 1em;
    text-align: center;
    line-height: 2.1em;
    vertical-align: middle;
    text-decoration: none;
}

.project-info i {
    padding-left: 0.3em;
    font-size: 1.2em;
}

.project-info a:hover {
    color: var(--background-color);
    background: var(--main-color);
    border: 2px solid var(--main-color);
    text-decoration: none
}

#more-projects {
    display: none
}

#skills {
    padding: 50px 15px;
    text-align: center
}

#skills h2 {
    color: var(--heading-color);
    margin-bottom: 50px
}

#skills ul {
    display: block;
    margin: 0 auto;
    padding: 0;
    max-width: 1000px
}

#skills li {
    display: inline-block;
    margin: 7px;
    padding: 5px 10px;
    color: var(--heading-color);
    background: #e4e4ea;
    list-style: none;
    cursor: default;
    font-size: 1.2em
}

#skills i {
    margin-right: 5px;
    color: var(--text-color);
}

.skills-table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    border: 2px solid var(--border-color);
}

.skills-table th {
    background-color: var(--background-alt-color);
    color: var(--heading-color);
    font-weight: 600;
    text-align: left;
    padding: 20px 15px;
    border: 1px solid var(--border-color);
    vertical-align: middle;
    width: 280px;
    font-size: 1.1em;
}

.skills-table td {
    padding: 20px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
    line-height: 1.6;
}

.skill-item {
    display: inline-block;
    background-color: var(--background-alt-color);
    color: var(--main-color);
    padding: 8px 15px;
    margin: 4px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.skill-item:not(.no-ex) {
    border-color: var(--main-color);
    border-width: 1px;
}

.skill-item:hover {
    background-color: var(--main-color);
    color: var(--background-color);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.skill-item i {
    margin-right: 6px;
    color: inherit;
}

.skill-item.no-ex {
    cursor: default;
    opacity: 1;
    color: var(--text-color);
}

.skill-item.no-ex:hover {
    background-color: var(--background-alt-color);
    color: var(--text-color);
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.optional-section {
    padding: 50px 15px;
    text-align: center;
    border-top: 2px solid var(--border-color)
}

.optional-section h2 {
    color: var(--heading-color)
}

.optional-section-block {
    max-width: 700px;
    margin: 0 auto 20px auto;
    padding: 15px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    text-align: left
}

.optional-section-block h3 {
    font-weight: 500;
    margin: 0 0 15px 0;
    color: var(--heading-color)
}

.optional-section-block h4 {
    color: var(--text-color);
    clear: both;
    font-weight: 500;
    margin: 0 0 15px 0
}

.optional-section-block p,
.optional-section-block ul {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 0.9em
}

.optional-section-block ul {
    padding: 0 0 0 15px
}

footer {
    text-align: center;
    background: var(--main-color);
    color: var(--background-color);
    padding: 1em 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

footer div.row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

footer div.row * {
    color: var(--background-color);
    text-decoration: none;
}

footer div.row a {
    transition: all 0.3s ease;
    display: inline-block;
    padding: 5px;
    border-radius: 3px;
}

footer div.row a:hover {
    color: #a0cfee;
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

#hide-more-projects {
    border-color: var(--main-color);
    color: var(--heading-color);
    margin: 2em auto;
    margin-top: -1em;
    display: block;
}


h3 a,
h4 a {
    text-decoration: none;
    color: inherit;
}

h3 a:hover,
h4 a:hover {
    text-decoration: underline;
    color: var(--heading-color);
}

p.final-grade {
    font-weight: 400;
    font-size: 1.1em;
}

/* Compact Language Display */
.languages-title-row {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.languages-title {
    margin-top: 24px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.languages-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 24px;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-item .flag-icon {
    font-size: 1.5em;
}

.lang-details {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lang-details strong {
    color: var(--heading-color);
    font-size: 1.05em;
}

.lang-level {
    background-color: var(--text-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lang-level.native {
    background-color: var(--main-color);
}

.lang-level.proficient {
    background-color: var(--text-color);
}

.lang-note {
    font-size: 0.85em;
    color: var(--text-color);
}

.language-divider {
    color: var(--border-color);
    font-size: 1.2em;
    font-weight: bold;
    margin-left: 1em;
    margin-right: 1em;
}

/* Match Bootstrap's lg breakpoint - when there's enough space for comfortable side-by-side layout */
@media only screen and (min-width: 992px) {
    .languages-compact {
        justify-content: flex-start;
        margin-top: 2.5em;
    }
}

/* Responsive for compact layout */
@media only screen and (max-width: 900px) {
    .languages-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .languages-compact {
        margin-top: 15px;
    }
}

@media only screen and (max-width: 600px) {
    .languages-compact {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .language-divider {
        display: none;
    }
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
    .languages-grid {
        flex-direction: column;
        gap: 15px;
    }

    .language-card {
        min-width: unset;
    }
}

/* Legacy language list styles - kept for compatibility but can be removed */
ul.language-list li {
    display: inline-block;
    margin-right: 30px;
}

ul.language-list li span {
    font-size: 1.2em;
    vertical-align: middle;
}

ul.language-list li span.flag-icon {
    font-size: 2em;
    vertical-align: middle;
}

ul.language-list li span.badge {
    margin-left: 8px;
    font-weight: bold;
}

ul.language-list li span.lang-badge {
    background-color: var(--main-color);
    color: white;
    padding: 0.2em 0.5em;
    border-radius: 3px;
}

ul.language-list li span.lang-name {
    font-weight: bold;
    margin-left: 8px;
}

ul.language-list li span.lang-note {
    font-size: 0.95em;
    color: #555;
    margin-left: 4px;
}

@media only screen and (max-width: 750px) {

    #experience-timeline:before,
    #experience-timeline:after {
        left: 23px
    }


    #skills i,
    #skills span {
        display: none;
    }

    .vtimeline-date {
        width: auto;
        text-align: left;
        position: relative;
        margin-bottom: 15px;
        display: block;
        margin-left: 70px
    }

    .vtimeline-icon {
        margin-left: 0
    }

    .vtimeline-content {
        margin-left: 70px
    }
}


@media only screen and (min-width: 992px) {
    #lead-down span {
        width: 60px;
        height: 60px;
        border: 4px solid #a0cfee;
    }

    #lead-down i {
        padding-top: 12px;
        font-size: 1.8em;
    }

    @keyframes pulsate {
        0% {
            transform: scale(1, 1)
        }

        50% {
            transform: scale(1.4, 1.4)
        }

        100% {
            transform: scale(1, 1)
        }
    }
}

@media only screen and (max-width: 992px) {
    #lead {
        height: auto;
        min-height: auto;
        max-height: auto;
        padding: 100px 15px
    }

    #lead-content {
        position: relative;
        transform: none;
        left: auto;
        top: auto
    }

    #lead-content h1 {
        font-size: 3em
    }

    #lead-content h2 {
        font-size: 1.75em
    }

    #about {
        text-align: center
    }

    #about p {
        text-align: left
    }
}

@media only screen and (max-width: 768px) {
    header {
        position: fixed;
        display: none;
        z-index: 999;
        animation: none;
        bottom: 0;
        height: 100%
    }

    #mobile-menu-open,
    #mobile-menu-close {
        display: block
    }

    #menu {
        height: 100%;
        overflow-y: auto;
        box-shadow: none;
        border-radius: 0;
        width: 100%
    }

    #menu li {
        display: block;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border-color)
    }

    #menu li:last-child {
        border-bottom: none
    }

    #menu li a {
        padding: 20px 15px;
        font-size: 1.1em
    }

    #lead-content h1 {
        font-size: 2em
    }

    #lead-content h2 {
        font-size: 1.3em
    }

    #lead-content a {
        padding: 10px 20px
    }

    #lead-down {
        display: none
    }

    .education-block h3,
    .education-block span {
        float: none
    }

    .project-image {
        padding-bottom: 100%;
        /* Maintain square aspect ratio on mobile too */
    }

    .project-info {
        padding: 20px 15px;
    }

    .project-info h3 {
        font-size: 1.2em;
    }

    .project-info p {
        font-size: 0.85em;
    }

    .project-info a {
        font-size: 0.9em;
        min-width: 70px;
    }

    .social {
        text-align: center
    }

    footer div.row {
        flex-direction: column;
        gap: 2px;
    }

    .copyright {
        padding-top: 0;
    }
}

@media only screen and (max-width: 480px) {
    #lead-content h1 {
        font-size: 1.5em
    }

    #lead-content h2 {
        font-size: 1em
    }

    #lead-content a {
        font-size: 0.9em;
        padding: 5px 10px
    }

    footer div.row {
        flex-direction: column;
        gap: 2px;
    }

    .copyright {
        padding-top: 0;
        order: 3;
    }

    .top {
        order: 2;
    }

    .social {
        order: 1;
    }
}