/* Exported styles from ecg-vision-app.html */
:root {
    --primary: #1a2238;
    --accent: #ff6a3d;
    --bg: #f5f6fa;
    --card-bg: #fff;
    --text: #222;
    --muted: #6c757d;
    --radius: 18px;
    --shadow: 0 8px 32px rgba(44, 62, 80, 0.12);
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Montserrat', 'Roboto', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

header {
    background: linear-gradient(90deg, var(--primary) 60%, var(--accent) 100%);
    color: #fff;
    padding: 2.5rem 0 1.5rem 0;
    text-align: center;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

header p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 400;
    color: #e0e0e0;
}

.project-container {
    max-width: 1100px;
    margin: 2.5rem auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: flex-start;
}

/* Center containers and add padding */
.container {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Masonry Gallery */
.masonry-gallery {
    column-count: 3;
    column-gap: 1.2rem;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    /* Center the gallery in its flex column */
    display: block;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.2rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s;
}

.masonry-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.13);
    display: block;
    transition: box-shadow 0.2s, transform 0.2s;
}

.masonry-item:hover {
    transform: scale(1.03) translateY(-2px);
    z-index: 2;
}

.masonry-caption {
    text-align: center;
    font-size: 0.98rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
    width: 100%;
    text-shadow: 0 1px 4px #fff, 0 1px 8px #eee;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 34, 56, 0.92);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.22);
}

.lightbox-caption {
    color: #fff;
    font-size: 1.1rem;
    margin-top: 1rem;
    text-align: center;
    text-shadow: 0 2px 8px #000;
}

.lightbox-close {
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 2.2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    text-shadow: 0 2px 8px #000;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    text-shadow: 0 2px 8px #000;
}

.lightbox-arrow.left {
    left: -50px;
}

.lightbox-arrow.right {
    right: -50px;
}

@media (max-width: 900px) {
    .masonry-gallery {
        column-count: 2;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    .main-nav li {
        flex: 1 1 100%;
        min-width: 120px;
        max-width: 100%;
        margin-bottom: 0.2rem;
    }

    .main-nav .btn.btn-primary {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        text-align: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 1rem;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        background: var(--white, #fff);
        box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0;
        z-index: 110;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.3s cubic-bezier(.4, 0, .2, 1), opacity 0.2s;
        display: block;
    }

    .main-nav.open {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
        padding: 1.2rem 1.5rem 1.2rem 1.5rem;
        box-shadow: 0 4px 24px rgba(44, 62, 80, 0.18);
    }

    .about-card {
        flex-direction: column;
        align-items: center;
        padding: 1.2rem 0.7rem 1.2rem 0.7rem;
        gap: 1.2rem;
    }

    .about-img-col {
        justify-content: center;
        align-items: center;
    }

    .about-content-col {
        align-items: center;
        text-align: center;
    }

    .about-row {
        flex-direction: column !important;
        gap: 1.5rem;
        text-align: left;
        align-items: stretch;
    }



    .about-img-row {
        width: 100%;
        height: 250px;
        border-radius: 1rem;
        display: block;
        margin-left: 0;
        margin-right: 0;
        /* Remove auto margin, use flex container for alignment */
    }



    .about-content-row {
        align-items: flex-start;
        text-align: left;
    }


}

@media (max-width: 600px) {
    .masonry-gallery {
        column-count: 1;
    }

    .lightbox-content img {
        max-width: 98vw;
        max-height: 60vh;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.2rem;
        align-items: stretch;
    }

    .main-nav li {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-bottom: 0.1rem;
    }

    .main-nav .btn.btn-primary {
        width: 100%;
        min-width: 0;
        font-size: 0.98rem;
        padding: 0.7rem 0.5rem;
    }

    .contact-flex {
        flex-direction: column;
        gap: 1.2rem;
        align-items: stretch;
        width: 100%;
        margin-top: 1.2rem;
        padding: 0;
    }

    .contact-info-card,
    .contact-form-card {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding: 1rem 0.5rem 1rem 0.5rem;
        box-sizing: border-box;
        border-radius: 1rem;
    }

    .contact-form {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }

    .contact-form input,
    .contact-form textarea {
        max-width: 100%;
        width: 100%;
        padding: 1rem 0.8rem;
        font-size: 1rem;
        box-sizing: border-box;
    }

    /* Hide the hello section image on mobile */
    .hello-section .about-img-row {
        display: none !important;
    }

    .hero-section .profile-img {
        width: 250px;
        height: 250px;
        min-width: 200px;
        min-height: 200px;
        max-width: 90vw;
        max-height: 90vw;
        display: block;
        margin-left: auto;
        margin-right: auto;
        border: 4px solid var(--accent);
    }

    .section {
        margin-bottom: 2.2rem !important;
        border-radius: 1.1rem;
        box-shadow: 0 2px 12px #ececec;
        background: #fff;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
    }

    .container {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }
}

/* Center the gallery column in the flex row */
.gallery-area {
    flex: 1 1 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(90deg, var(--primary) 60%, var(--accent) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1.08rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.10);
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 100%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    z-index: 0;
}

.btn:active:after {
    width: 200%;
    height: 200%;
}

.btn-github {
    background: linear-gradient(90deg, var(--accent) 60%, #ffb88c 100%);
    color: #fff;
}

.btn:hover,
.btn:focus {
    background: linear-gradient(90deg, #222 60%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.18);
    transform: translateY(-2px) scale(1.04);
}

.btn-github:hover,
.btn-github:focus {
    background: linear-gradient(90deg, #d2693c 60%, #ffb88c 100%);
    color: #fff;
}

.project-details {
    flex: 2 1 400px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    margin-bottom: 0.5rem;
    transition: box-shadow 0.18s, transform 0.12s;
    border: 1px solid #f0f1f6;
    position: relative;
}

.project-card:hover {
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.16);
    transform: translateY(-2px) scale(1.01);
}

.project-card h2 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.project-card ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0 0 0;
}

.project-card li {
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.project-card .tech-stack {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 1rem 0.5rem 0.5rem 0.5rem;
    background: #f7f8fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.06);
    justify-content: flex-start;
}

.project-card .tech-item {
    background: var(--accent);
    color: #fff;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(239, 131, 84, 0.08);
}

@media (max-width: 700px) {
    .project-card {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
    }
}

p,
.project-details p,
.project-details li,
.masonry-caption,
.lightbox-caption,
footer {
    font-family: 'Inter', 'Montserrat', 'Roboto', Arial, sans-serif;
}

.thesis-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    margin-bottom: 0.5rem;
    transition: box-shadow 0.18s, transform 0.12s;
    border: 1px solid #f0f1f6;
    position: relative;
}

.thesis-icon-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.thesis-icon-title svg {
    margin-right: 0.7rem;
}

@media (max-width: 700px) {
    .thesis-card {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
    }
}

/* === Additions for new index.html structure === */

.site-header {
    background: var(--white, #fff);
    box-shadow: 0 2px 12px #e0e0e0;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary, #1a2238);
    letter-spacing: 1px;
}

.main-nav ul {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text, #222);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.main-nav a:hover,
.main-nav .btn-primary {
    background: var(--accent, #ff6a3d);
    color: #fff !important;
}

.hero-section {
    background: var(--white, #fff);
    padding: 3rem 0 2.5rem 0;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.07);
}

.hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.hero-info {
    flex: 1 1 350px;
    min-width: 300px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary, #1a2238);
}

.hero-title span {
    color: var(--accent, #ff6a3d);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--muted, #6c757d);
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text, #222);
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-btns .btn {
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.hero-image {
    flex: 0 0 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 20%;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10);
    border: 4px solid var(--accent);
    transition: transform 0.25s cubic-bezier(.4, 0, .2, 1), border-width 0.18s, border-color 0.18s;
}

.profile-img:hover {
    transform: scale(1.10);
    border-width: 1px;
    box-shadow: 0 12px 40px rgba(44, 62, 80, 0.22);
}

.section {
    margin: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary, #1a2238);
}

.section-desc {
    color: var(--muted, #6c757d);
    margin-bottom: 2rem;
}

/* About Section */
.about-section {
    background: var(--white, #fff);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    padding: 2.5rem 0 2rem 0;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    align-items: stretch;
    width: 100%;
}

.about-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background: var(--card-bg, #fff);
    border-radius: 1.2rem;
    box-shadow: 0 2px 12px #e0e0e0;
    width: 100%;
    max-width: 820px;
    min-width: 320px;
    padding: 1.5rem 2.2rem 1.5rem 2.2rem;
    gap: 2.2rem;
    margin: 0 auto;
}

.about-img-col {
    flex: 0 0 110px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.about-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 2px 8px #e0e0e0;
}

.about-content-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    gap: 0.5rem;
}

.about-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent, #ff6a3d);
}

.about-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2.5rem;
    margin-bottom: 3rem;
    flex-direction: row;
    text-align: left;
}


.about-img-row {
    width: 320px;
    height: 320px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.08);
    margin-bottom: 0.7rem;
}

.about-content-row {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: justify;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.about-content-row .about-heading {
    width: 100%;
    text-align: left;
    margin-left: 0;
}

@media (max-width: 900px) {
    .about-img-row {
        width: 90vw !important;
        height: 90vw !important;
        max-width: 380px !important;
        max-height: 380px !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .about-content-row {
        max-width: 98vw;
        padding: 0 0.2rem;
    }
}

@media (max-width: 600px) {
    .about-img-row {
        width: 98vw !important;
        height: 98vw !important;
        max-width: 340px !important;
        max-height: 340px !important;
        border-radius: 1rem !important;
    }

    .about-content-row {
        max-width: 98vw;
        padding: 0 0.1rem;
    }
}

/* Portfolio Section */
.portfolio-section {
    background: var(--white, #fff);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    padding: 2.5rem 0 2rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.portfolio-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    background: var(--card-bg, #f8f9fa);
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.07), 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
    transition: transform 0.18s cubic-bezier(.4, 0, .2, 1), box-shadow 0.18s cubic-bezier(.4, 0, .2, 1);
    cursor: pointer;
    border: 1.5px solid #e3e6ea;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.13), 0 3px 8px 0 rgba(0, 0, 0, 0.07);
    border-color: #b3c6e0;
}

.portfolio-title {
    font-family: 'Poppins', 'Barlow', Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a2330;
    text-align: center;
    letter-spacing: 0.01em;
    padding: 0 1rem;
    width: 100%;
    z-index: 1;
}

.portfolio-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--accent, #ff6a3d);
    font-weight: 600;
    font-size: 0.98rem;
}

/* Skills Section */
.skills-section {
    background: var(--white, #fff);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    padding: 2.5rem 0 2rem 0;
}

.skills-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: stretch;
    align-items: stretch;
}

.skill-item {
    flex: 1 1 45%;
    min-width: 180px;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skill-name {
    font-weight: 600;
    color: var(--primary, #1a2238);
    margin-bottom: 0.5rem;
}

.skill-bar {
    background: #f0f1f6;
    border-radius: 8px;
    height: 10px;
    margin: 0.5rem 0;
    width: 100%;
    overflow: hidden;
}

.skill-bar-fill {
    background: var(--accent, #ff6a3d);
    height: 100%;
    border-radius: 8px;
    transition: width 0.6s;
}

.skill-percent {
    font-size: 0.95rem;
    color: var(--muted, #6c757d);
}

/* Contact Section */
.contact-section {
    background: var(--white, #fff);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    padding: 2.5rem 0 2rem 0;
}

.contact-flex {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 3.5rem;
    justify-content: center;
    align-items: stretch;
    margin-top: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info-card,
.contact-form-card {
    background: var(--card-bg, #fff);
    border-radius: var(--radius, 18px);
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.07), 0 1.5px 4px 0 rgba(0, 0, 0, 0.03);
    padding: 2.5rem 3.5rem 2.5rem 3.5rem;
    min-width: 420px;
    flex: 1 1 520px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    justify-content: center;
    text-align: left;
}

.contact-info-card {
    align-items: center;
    justify-content: center;
}

.contact-form-card {
    align-items: center;
    justify-content: center;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
}

.contact-list li {
    margin-bottom: 0;
    font-size: 1.12rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: flex-start;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary);
    min-width: 1.8em;
}

.contact-label {
    font-weight: 600;
    color: var(--primary);
    min-width: 80px;
    display: inline-block;
}

.contact-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    text-align: left;
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    max-width: 400px;
    padding: 1.2rem 1.5rem;
    border: 1.5px solid #e3e6ea;
    border-radius: 1.1rem;
    font-size: 1.12rem;
    background: #f8f9fa;
    color: var(--text);
    transition: border-color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1.5px 6px 0 rgba(0, 0, 0, 0.03);
    margin-bottom: 0;
    text-align: left;
}

.contact-form textarea {
    min-height: 130px;
    resize: vertical;
}

@media (max-width: 1200px) {
    .contact-flex {
        flex-direction: column;
        gap: 2rem;
        max-width: 100%;
    }

    .contact-info-card,
    .contact-form-card {
        max-width: 100%;
        min-width: 0;
        padding: 1.5rem 1rem 1.2rem 1rem;
    }

    .contact-form {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .contact-flex {
        flex-direction: column;
        gap: 1.2rem;
        align-items: stretch;
        width: 100%;
        margin-top: 1.2rem;
        padding: 0;
    }

    .contact-info-card,
    .contact-form-card {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding: 1rem 0.5rem 1rem 0.5rem;
        box-sizing: border-box;
        border-radius: 1rem;
    }

    .contact-form {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }

    .contact-form input,
    .contact-form textarea {
        max-width: 100%;
        width: 100%;
        padding: 1rem 0.8rem;
        font-size: 1rem;
        box-sizing: border-box;
    }
}

/* Blog Section */
.blog-section {
    background: var(--white, #fff);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    padding: 2.5rem 0 2rem 0;
}

.blog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
}

.blog-card {
    background: var(--card-bg, #fff);
    border-radius: 1.2rem;
    box-shadow: 0 2px 12px #e0e0e0;
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 1rem 1.5rem 1rem;
    text-align: center;
}

.blog-img {
    width: 100%;
    max-width: 220px;
    height: 120px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px #e0e0e0;
}

.blog-content {
    flex: 1;
}

.blog-tag {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent, #ff6a3d);
}

.blog-location {
    font-size: 0.95rem;
    color: var(--muted, #6c757d);
}

/* Footer */
.site-footer {
    background: var(--white, #fff);
    color: var(--muted, #6c757d);
    padding: 1.2rem 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 2rem;
}

.footer-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: var(--muted, #6c757d);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
    line-height: 1;
    padding: 0;
    margin: 0 0.5rem;
    vertical-align: middle;
}

.footer-links a:hover {
    color: var(--accent, #ff6a3d);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(0, 0, 0, 0.25);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    margin: auto;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    max-width: 480px;
    width: 90vw;
    box-shadow: 0 4px 32px rgba(44, 62, 80, 0.18);
    position: relative;
}

.close-modal,
.close-modal-privacy {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
}

/* Portfolio card background images with correct relative paths from CSS file */
.portfolio-card--poqob-chat {
    background-image: url('../images/poqob-chat.jpeg');
}

.portfolio-card--ecg-vision-app {
    background-image: url('../images/ecg-vision-app.jpeg');
}

.portfolio-card--ocr {
    background-image: url('../images/ocr.jpeg');
}

.portfolio-card--encryption {
    background-image: url('../images/encryption.jpeg');
}

.portfolio-card--art-exhibition {
    background-image: url('../images/art-exhibition.jpeg');
}

.portfolio-card--std-esp-env {
    background-image: url('../images/std-esp-env.jpeg');
}

/* Responsive Design */
@media (max-width: 900px) {

    .header-flex,
    .footer-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .about-cards,
    .skills-list,
    .blog-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .hero-flex {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-flex {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .profile-img {
        width: 200px;
        height: 200px;
        min-width: 140px;
        min-height: 140px;
        max-width: 90vw;
        max-height: 90vw;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .about-img,
    .blog-img {
        width: 60px;
        height: 60px;
    }

    .about-card,
    .blog-card,
    .skill-item {
        min-width: 120px;
        max-width: 100%;
        padding: 0.7rem 0.5rem 1rem 0.5rem;
    }

    .portfolio-card {
        height: 110px;
        font-size: 1rem;
        border-radius: 0.8rem;
    }

    .portfolio-title {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .section {
        margin-bottom: 2.2rem !important;
        border-radius: 1.1rem;
        box-shadow: 0 2px 12px #ececec;
        background: #fff;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
    }

    .container {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }
}

.about-cards.no-card {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: flex-start;
    width: 100%;
    background: none;
    box-shadow: none;
    padding: 0;
}

/* About card paragraphs always left-aligned */
.about-card p {
    text-align: left !important;
}

.about-content-col,
.about-card {
    text-align: left !important;
    align-items: flex-start !important;
}

@media (max-width: 900px) {

    .about-content-col,
    .about-card {
        text-align: left !important;
        align-items: flex-start !important;
    }
}

@media (max-width: 600px) {

    .about-content-col,
    .about-card {
        text-align: left !important;
        align-items: flex-start !important;
    }
}

/* Hamburger Nav Toggle and Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 120;
    margin-left: auto;
}

.nav-toggle-bar {
    width: 28px;
    height: 3px;
    background: var(--primary, #1a2238);
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        background: var(--white, #fff);
        box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0;
        z-index: 110;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.3s cubic-bezier(.4, 0, .2, 1), opacity 0.2s;
        display: block;
    }

    .main-nav.open {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
        padding: 1.2rem 1.5rem 1.2rem 1.5rem;
        box-shadow: 0 4px 24px rgba(44, 62, 80, 0.18);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
        align-items: flex-start;
        margin: 0;
        padding: 0;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav .btn.btn-primary {
        width: 100%;
    }

    body.nav-open {
        overflow: hidden;
    }
}

/* --- NAVBAR BUTTONS CENTERING FIX --- */
.main-nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
}

@media (max-width: 900px) {
    .main-nav {
        padding-top: 1.2rem !important;
        padding-bottom: 1.2rem !important;
    }

    .main-nav ul {
        padding-top: 1.2rem !important;
        padding-bottom: 1.2rem !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

@media (max-width: 600px) {
    .main-nav ul {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

/* --- END NAVBAR BUTTONS CENTERING FIX --- */

/* EXPERIENCE SECTION TASARIMI */
.experience-section {
    padding-top: 48px;
    padding-bottom: 48px;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.04);
    padding: 1.5rem 2rem;
    transition: box-shadow 0.2s;
}

.experience-item:hover {
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.10);
}

.experience-logo-col {
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.experience-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.04);
}

.experience-content-col {
    flex: 1 1 0%;
}

.experience-role {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.2em 0;
}

.experience-company {
    font-weight: 500;
    color: var(--accent, #ff9800);
    margin-right: 1em;
}

.experience-date {
    color: #888;
    font-size: 0.98em;
}

.experience-desc {
    margin-top: 0.5em;
    color: #333;
    text-align: left;
}

@media (max-width: 700px) {
    .experience-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2rem 1rem;
        gap: 1rem;
    }

    .experience-logo-col {
        margin-bottom: 0.5rem;
    }

    .experience-logo {
        width: 48px;
        height: 48px;
    }
}