/* Global Ayarlar ve Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #080808;
    --second-bg-color: #131313;
    --text-color: #ffffff;
    --main-color: #00ffcc;
}


html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
}

span {
    color: var(--main-color);
    transition: color 0.4s ease;
}

section {
    min-height: 100vh;
    padding: 10rem 12% 10rem;
}

/* Header Start */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 4rem 12% 4rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 400;
}

.logo span {
    text-shadow: 0 0 5px var(--main-color);
}

.nav-bar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 3rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-bar a.active,
.nav-bar a:hover {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 3rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    border: 1px solid rgba(0, 255, 204, 0.15);
    vertical-align: middle;
}

.lang-btn {
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    border-bottom: none !important;
}

.lang-btn.active {
    color: var(--main-color);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.4);
}

.lang-btn:hover {
    color: var(--main-color);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
    cursor: pointer;
}

/* Home Section */
.home {
    min-height: 100vh;
    padding: 8rem 9% 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
}

.home-content {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    justify-content: center;
    text-align: left;
    margin-top: 3rem;
    max-width: 600px;
}

.home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.home-content h3 {
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3.5rem;
}

.home-content p {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.7;
    max-width: 1000px;
}

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

.description p {
    margin-bottom: 2.4rem;
    width: 100%;
}

.text-animation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.text-animation p {
    font-size: clamp(1.8rem, 4.5vw, 3.4rem);
    font-weight: 600;
    min-width: 200px;
    white-space: nowrap;
    /* Metnin alt satıra geçip animasyonu bozmasını engeller */
}

.text-animation span {
    position: relative;
    display: inline-block;
}

.text-animation span::before {
    content: "";
    color: var(--main-color);
    animation: words 20s infinite;
    /* Toplam süre 20 saniye */
}

.text-animation span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    height: 100%;
    width: calc(100% + 8px);
    right: -8px;
    border-left: 3px solid var(--bg-color);
    /* typing animasyonu da words ile aynı olan 20s'ye ayarlandı */
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {


    0%,
    100% {
        border-left: 2px solid var(--main-color);
    }

    50% {
        border-left-color: transparent;
    }
}

/* Videodaki 5 kelimelik silinme/yazılma döngüsü */
@keyframes typing {

    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90%,
    95% {
        width: 0;
    }

    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85%,
    100% {
        width: calc(100% + 8px);
    }
}

@keyframes words {

    0%,
    20% {
        content: "Veri Bilimi & AI Meraklısı";
    }

    21%,
    40% {
        content: "Veri Dünyasını Keşfediyorum";
    }

    41%,
    60% {
        content: "Paylaşıyorum";
    }

    61%,
    80% {
        content: "Sürekli Öğreniyorum";
    }

    81%,
    100% {
        content: "Veri Bilimi & AI Meraklısı";
    }
}

body.lang-en .text-animation span::before {
    animation: words-en 20s infinite;
}

@keyframes words-en {
    0%,
    20% {
        content: "Data Science & AI Enthusiast";
    }

    21%,
    40% {
        content: "Exploring the Data World";
    }

    41%,
    60% {
        content: "Sharing My Journey";
    }

    61%,
    80% {
        content: "Always Learning";
    }

    81%,
    100% {
        content: "Data Science & AI Enthusiast";
    }
}

/* YAZI ANİMASYONU BİTİŞ */

.social-icons {
    margin-bottom: 2rem;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    font-size: 2.5rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 300ms ease-in-out;
}

.social-icons a:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 5px 15px rgba(0, 255, 204, 0.4);
    transform: scale(1.15) translateY(-3px);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-group a:nth-of-type(2) {
    background-color: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 4px 15px transparent;
}

.btn-group a:nth-of-type(2):hover {
    box-shadow: 0 6px 20px rgba(0, 255, 204, 0.3);
    background-color: var(--main-color);
    color: black;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    border: 2px solid transparent;
    color: black;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 0.1rem;
    transition: 300ms ease-in-out;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3);
}

.btn .btn-text {
    color: inherit;
}

.btn:hover {
    transform: scale(1.03) translateY(-2px);
    background: #00ffcc;
    color: var(--bg-color);
    box-shadow: 0 8px 25px rgba(0, 255, 204, 0.5);
}

/* Image Styles */
.home-img {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    isolation: isolate;
}

.hero-data-network {
    position: absolute;
    width: min(52rem, 122%);
    aspect-ratio: 1;
    pointer-events: none;
    z-index: -1;
    opacity: 0.92;
}

.hero-data-network canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.home-img img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1/1;
    box-shadow: 0 0 25px var(--main-color);
    border: 4px solid var(--main-color);
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    position: relative;
    z-index: 1;
    top: 3rem;
    cursor: pointer;
}

.home-img img:hover {

    box-shadow: 0 0 25px var(--main-color),
        0 0 50px var(--main-color),
        0 0 100px var(--main-color);
}

/* Timeline Sections (Education, Projects, News, Blog, Resume) */
.education,
.news,
.contact {
    background: var(--second-bg-color);
    padding: 100px 15px;
    transition: background-color 0.4s ease;
}

.projects,
.blog,
.resume {
    background: var(--bg-color);
    padding: 100px 15px;
    transition: background-color 0.4s ease;
}

.heading {
    text-align: center;
    font-size: 5rem;
    margin: 4rem 0;
}

.timeline-items {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.timeline-items::before {
    content: '';
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1px);
}

.timeline-item {
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 3rem);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 3rem);
}

.timeline-dot {
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color), 0 0 50px var(--main-color);
    position: absolute;
    left: calc(50% - 0.8rem);
    border-radius: 50%;
    top: 10px;
}

.timeline-date {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 6px 0 15px;
}

.timeline-content {
    background-color: var(--bg-color);
    border: 3px solid var(--main-color);
    padding: 30px 20px;
    border-radius: 4rem;
    box-shadow: 0 0 10px;
    transition: 0.3s ease;
    cursor: pointer;
}

.timeline-content:hover {
    box-shadow: 0 0 25px var(--main-color);
    transform: scale(1.05);
}

.timeline-content h3 {
    font-size: 20px;
    color: var(--text-color);
    margin: 0 0 10px;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 300;
    line-height: 22px;
}

/* --- Project Card Extras --- */
.project-card {
    background: var(--second-bg-color);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 2rem;
    padding: 3rem;
    transition: all 0.4s ease;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.15);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-header i {
    font-size: 3rem;
    color: var(--main-color);
}

.project-header h3 {
    font-size: 2.4rem;
    color: var(--text-color);
}

.project-btns {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.prj-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.8rem;
    background: transparent;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
}

.prj-btn:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--main-color);
    transform: scale(1.05);
}

.prj-btn i {
    font-size: 1.8rem;
}

/* --- Elegant Resume Cards --- */
.resume-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.resume-box {
    background: var(--second-bg-color);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 2rem;
    padding: 3rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resume-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.resume-box:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.15);
}

.resume-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.resume-top i {
    font-size: 3.5rem;
    color: var(--main-color);
    filter: drop-shadow(0 0 5px var(--main-color));
}

.resume-date {
    font-size: 1.4rem;
    color: var(--main-color);
    font-weight: 600;
    opacity: 0.8;
}

.resume-box h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    font-weight: 700;
}

.resume-box p {
    font-size: 1.5rem;
    color: #cccccc;
    line-height: 1.7;
    font-weight: 300;
}

@media (max-width: 991px) {
    .resume-container {
        grid-template-columns: 1fr;
    }
}

/* --- News Cards 2x2 Grid --- */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    padding: 2rem;
    min-height: 200px;
}

.news-box {
    background: var(--main-color);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 0 15px var(--main-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--bg-color);
    text-decoration: none;
    /* Link içindeki text için */
}

.news-box:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px var(--main-color);
}

.news-box .news-source {
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.news-box h3 {
    font-size: 2.2rem;
    color: var(--bg-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.news-box p {
    font-size: 1.5rem;
    color: var(--bg-color);
    line-height: 1.5;
    font-weight: 400;
}

.loading-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem;
    color: var(--main-color);
}

.loading-news i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.loading-news p {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .news-container {
        grid-template-columns: 1fr;
    }
}


::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-color);
    border-radius: 4rem;
}

::-webkit-scrollbar-track {
    background-color: var(--bg-color);
    width: 50px;
}

/* Contact Section */
.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    /* Gap between side-by-side elements */
}

.contact form .input-full {
    width: 100%;
}

.contact form .input-box input,
.contact form .input-full input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    background: transparent;
    /* Or var(--bg-color) based on preference */
    border-radius: 0.8rem;
    margin: 0.7rem 0;
    border: 1px solid var(--main-color);
    box-shadow: 0 0 10px transparent;
    transition: 0.3s ease;
}

.contact form .input-box input {
    width: calc(50% - 0.75rem);
    /* two columns */
}

.contact form textarea {
    resize: none;
}

.contact form .input-box input::placeholder,
.contact form .input-full input::placeholder,
.contact form textarea::placeholder {
    color: #e0e0e0;
}

.contact form .input-box input:focus,
.contact form .input-full input:focus,
.contact form textarea:focus {
    box-shadow: 0 0 15px var(--main-color);
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
    background-color: var(--main-color);
    color: black;
    font-weight: bold;
    border-radius: 4rem;
    /* Pill shape */
    border: none;
    padding: 1rem 2.8rem;
    font-size: 1.6rem;
    box-shadow: 0 0 15px var(--main-color);
}

.contact form .btn:hover {
    box-shadow: 0 0 25px var(--main-color);
    /* Stronger glow on hover */
}

/* Footer Section */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 7rem 15px 5rem;
    background-color: var(--bg-color);
    /* Clicks into the dark background */
}

.footer .social {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    /* Even spacing horizontally */
}

.footer .social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: transparent;
    border-radius: 50%;
    font-size: 24px;
    /* Default sized */
    color: #e0e0e0;
    /* Light gray base color */
    transition: all 0.3s ease;
    /* Smooth transition */
}

.footer .social a:hover {
    color: var(--main-color);
    transform: scale(1.1);
    /* Adding glowing cyan drop-shadow effect for icon */
    filter: drop-shadow(0 0 10px var(--main-color)) drop-shadow(0 0 20px var(--main-color));
}

.footer .list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2.5rem;
}

.footer .list li a {
    color: var(--text-color);
    font-size: 1.8rem;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.5rem;
    transition: 0.3s ease;
}

.footer .list li a:hover {
    color: var(--main-color);
    border-bottom: 2px solid var(--main-color);
}

.footer .copyright {
    margin-top: 4rem;
    text-align: center;
    font-size: 1.4rem;
    color: #b0b0b0;
    /* Hafif soluk, dikkat dağıtmayan bir gri */
    font-weight: 300;
}

/* --- Blog Section --- */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding: 2rem 0;
}

.blog-card {
    background: var(--second-bg-color);
    border: 1px solid rgba(0, 255, 204, 0.15);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Subtle modern grid textured background */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 2px, transparent 2px, transparent 6px);
    pointer-events: none;
    z-index: -1;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--main-color);
    box-shadow: 0 15px 40px rgba(0, 255, 204, 0.15);
}

.blog-icon {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.4));
}

.blog-card h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.blog-card p {
    font-size: 1.5rem;
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 3rem;
    flex-grow: 1;
}

.blog-card .btn {
    margin-top: auto;
    width: 100%;
    text-align: center;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.project-card {
    background: var(--second-bg-color);
    border: 1px solid rgba(0, 255, 204, 0.15);
    border-radius: 2rem;
    padding: 3rem;
    width: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--main-color);
    box-shadow: 0 15px 40px rgba(0, 255, 204, 0.1);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.project-header i {
    font-size: 3.5rem;
    color: var(--main-color);
    filter: drop-shadow(0 0 5px rgba(0, 255, 204, 0.4));
    flex-shrink: 0;
}

.project-header h3 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.project-tag {
    background: rgba(0, 255, 204, 0.08);
    color: var(--main-color);
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(0, 255, 204, 0.15);
}

.project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content p {
    font-size: 1.5rem;
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: left;
    font-weight: 300;
}

.project-tech {
    margin-top: auto;
    font-size: 1.3rem;
    color: var(--main-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1rem;
    opacity: 0.9;
}

.project-tech i {
    font-size: 1.8rem;
}

.project-btns {
    display: flex;
    gap: 1.2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.prj-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.6rem;
    background: transparent;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    border-radius: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.prj-btn:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    transform: translateY(-2px);
}

.prj-btn i {
    font-size: 1.8rem;
}

/* --- Modern Glassmorphic Modal --- */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-container.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--second-bg-color);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 2.5rem;
    max-width: 750px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 4rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-container.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    font-size: 3.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: var(--main-color);
    transform: scale(1.1) rotate(90deg);
}

.modal-body h2 {
    font-size: 2.6rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 255, 204, 0.15);
    padding-bottom: 1.5rem;
    padding-right: 3rem;
}

.modal-body p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 2rem;
}

.modal-body h3 {
    font-size: 1.8rem;
    color: var(--main-color);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
}

.modal-body ul li {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #cccccc;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2.5rem;
}

.modal-body ul li::before {
    content: "⚡";
    position: absolute;
    left: 0;
    color: var(--main-color);
}

.modal-body .team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-body .team-member {
    background: rgba(0, 255, 204, 0.08);
    color: var(--main-color);
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 204, 0.15);
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 380px;
    width: calc(100% - 6rem);
}

.toast {
    background: rgba(19, 19, 19, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 1.5rem 2rem;
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               toastFadeOut 0.4s ease forwards 3.6s;
}

.toast.success {
    border-left: 4px solid var(--main-color);
}

.toast.success i {
    color: var(--main-color);
}

.toast.error {
    border-left: 4px solid #ff4a4a;
}

.toast.error i {
    color: #ff4a4a;
}

.toast i {
    font-size: 2.2rem;
}

.toast span {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-color);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

/* ==========================================================================
   CONSOLIDATED RESPONSIVE STYLES (MEDIA QUERIES)
   ========================================================================== */

/* --- 1200px Breakpoint (Laptops & Small Desktops) --- */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }

    section {
        padding: 8rem 8% 8rem;
    }

    .header {
        padding: 3rem 8%;
    }

    .home {
        gap: 8rem;
        padding: 10rem 8% 4rem;
    }
}

/* --- 992px Breakpoint (Tablets & Medium Screens) --- */
@media (max-width: 992px) {
    section {
        padding: 6rem 5% 6rem;
    }

    .header {
        padding: 2rem 5%;
    }

    #menu-icon {
        display: block;
    }

    .nav-bar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 2rem 5%;
        background: rgba(8, 8, 8, 0.96);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(0, 255, 204, 0.15);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-bar.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-bar a {
        display: block;
        font-size: 1.8rem;
        margin: 0;
        padding: 1.2rem 2rem;
        width: 100%;
        text-align: center;
        border-bottom: none;
    }

    .nav-bar a:hover,
    .nav-bar a.active {
        border-bottom: none;
        background: rgba(0, 255, 204, 0.1);
        border-radius: 1rem;
    }

    .lang-switch {
        margin-left: 0;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        width: fit-content;
    }

    .home {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3.5rem;
        padding-top: 9rem;
    }

    .home-content {
        align-items: center;
        text-align: center;
        margin-top: 0;
        max-width: 100%;
    }

    .text-animation {
        justify-content: center;
    }

    .description {
        align-items: center;
    }

    .description p {
        text-align: center;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content p {
        margin: 0 auto 2rem;
        max-width: 600px;
    }

    .home-img img {
        width: 55%;
        max-width: 260px;
        top: 0;
    }

    .social-icons a {
        margin: 1.5rem 0.8rem;
    }

    .btn-group {
        justify-content: center;
    }

    .timeline-items::before {
        left: 8px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 4rem;
        padding-right: 0;
        text-align: left;
    }

    .timeline-dot {
        left: 0;
    }

    .resume-container {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .blog-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- 768px Breakpoint (Mobile Landscape & Small Tablets) --- */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 1rem 0;
    }

    .project-card {
        min-height: auto;
        padding: 2.5rem;
    }

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

    .blog-container {
        grid-template-columns: 1fr;
        padding: 1rem 0;
    }

    .blog-card {
        padding: 2.5rem;
    }

    .contact form {
        padding: 0 1rem;
    }

    .contact form .input-box {
        flex-direction: column;
        gap: 0;
    }

    .contact form .input-box input {
        width: 100%;
    }

    .modal-content {
        padding: 3rem 2rem;
        border-radius: 1.5rem;
        max-height: 90vh;
    }

    .modal-body h2 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .close-modal {
        top: 1.5rem;
        right: 1.5rem;
        font-size: 3rem;
    }
}

/* --- 576px Breakpoint (Phones Portrait) --- */
@media (max-width: 576px) {
    html {
        font-size: 50%;
    }

    section {
        padding: 5rem 4% 5rem;
    }

    .header {
        padding: 1.5rem 4%;
    }

    .home {
        padding-top: 8rem;
        gap: 2.5rem;
    }

    .home-content h1 {
        font-size: 3.6rem;
    }

    .home-img img {
        width: 65%;
        max-width: 200px;
    }

    .description p {
        margin-bottom: 1.2rem;
    }

    .social-icons a {
        margin: 1rem 0.6rem;
    }

    .contact form .input-box input,
    .contact form .input-full input,
    .contact form textarea {
        padding: 1.2rem;
        font-size: 1.6rem;
    }

    #toast-container {
        bottom: 2rem;
        right: 2rem;
        width: calc(100% - 4rem);
    }
}

/* --- Visitor Path --- */
.visitor-path {
    width: 100%;
    min-height: 0;
    margin: 1.2rem 0 2rem;
    padding: 1.7rem;
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 1.6rem;
    background: rgba(19, 19, 19, 0.7);
}

.visitor-path-question {
    color: var(--text-color);
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.visitor-path-hint {
    margin: 0.5rem 0 1.2rem !important;
    color: #c9c9c9;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.visitor-path-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.visitor-path-options button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 255, 204, 0.35);
    border-radius: 99rem;
    color: var(--text-color);
    background: transparent;
    cursor: pointer;
    font: 500 1.25rem 'Poppins', sans-serif;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.visitor-path-options button:hover,
.visitor-path-options button.is-selected {
    color: var(--bg-color);
    background: var(--main-color);
    transform: translateY(-2px);
}

.visitor-path-options i {
    font-size: 1.6rem;
}

.visitor-path-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 1.4rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(0, 255, 204, 0.18);
}

.visitor-path-result p {
    color: #d8d8d8;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.visitor-path-cta {
    flex: 0 0 auto;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    color: var(--bg-color);
    background: var(--main-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.portfolio-tour-launch {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.3rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 255, 204, 0.45);
    border-radius: 0.8rem;
    color: var(--main-color);
    background: transparent;
    cursor: pointer;
    font: 600 1.25rem 'Poppins', sans-serif;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portfolio-tour-launch:hover {
    color: var(--bg-color);
    background: var(--main-color);
    transform: translateY(-2px);
}

.portfolio-tour-launch i {
    font-size: 1.7rem;
}

.portfolio-tour-card {
    max-width: 70rem;
    margin: 1.8rem auto 3rem;
    padding: 2rem;
    border: 1px solid rgba(0, 255, 204, 0.42);
    border-left: 0.5rem solid var(--main-color);
    border-radius: 1.2rem;
    background: var(--second-bg-color);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
}

.portfolio-tour-card .tour-count {
    margin-bottom: 0.4rem;
    color: var(--main-color);
    font-size: 1.25rem;
    font-weight: 700;
}

.portfolio-tour-card h3 {
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-size: 2.1rem;
}

.portfolio-tour-card > p:not(.tour-count) {
    margin-bottom: 1.5rem;
    color: #cfcfcf;
    font-size: 1.4rem;
    line-height: 1.65;
}

.tour-next {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    border-radius: 0.8rem;
    color: var(--bg-color);
    background: var(--main-color);
    cursor: pointer;
    font: 700 1.25rem 'Poppins', sans-serif;
}

.tour-next i {
    font-size: 1.7rem;
}

section.is-tour-stop .heading {
    text-shadow: 0 0 2.2rem rgba(0, 255, 204, 0.62);
}

section.role-highlight .heading {
    text-shadow: 0 0 1.8rem rgba(0, 255, 204, 0.45);
}

section.role-highlight {
    scroll-margin-top: 8rem;
}

/* --- Accessibility --- */
.accessibility-widget {
    position: fixed;
    right: 3rem;
    bottom: 3rem;
    z-index: 60;
}

.accessibility-toggle {
    width: 4.8rem;
    height: 4.8rem;
    display: grid;
    place-items: center;
    margin-left: auto;
    border: 1px solid rgba(0, 255, 204, 0.55);
    border-radius: 50%;
    color: var(--bg-color);
    background: var(--main-color);
    box-shadow: 0 0.8rem 2rem rgba(0, 255, 204, 0.25);
    cursor: pointer;
}

.accessibility-toggle i {
    font-size: 2.5rem;
}

.accessibility-panel {
    width: 25rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 204, 0.38);
    border-radius: 1.4rem;
    color: var(--text-color);
    background: rgba(19, 19, 19, 0.96);
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(1.2rem);
    -webkit-backdrop-filter: blur(1.2rem);
}

.accessibility-panel > p {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.accessibility-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.25rem;
}

.accessibility-option span {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
}

.accessibility-option i {
    color: var(--main-color);
    font-size: 1.7rem;
}

.accessibility-option input {
    width: 3.4rem;
    height: 1.9rem;
    accent-color: var(--main-color);
    cursor: pointer;
}

.visitor-path-options button:focus-visible,
.visitor-path-cta:focus-visible,
.accessibility-toggle:focus-visible,
.accessibility-option input:focus-visible {
    outline: 3px solid var(--main-color);
    outline-offset: 3px;
}

body.light-theme {
    --bg-color: #f8fbfa;
    --second-bg-color: #ffffff;
    --text-color: #102b28;
    --main-color: #007f6b;
}

body.light-theme .home {
    background:
        radial-gradient(circle at 78% 45%, rgba(0, 127, 107, 0.10), transparent 24%),
        linear-gradient(135deg, #fbfdfc 0%, #f2f8f6 100%);
}

body.light-theme .header {
    background: rgba(244, 248, 247, 0.86);
    border-bottom: 1px solid rgba(0, 143, 120, 0.16);
}

body.light-theme .text-animation span::after {
    width: 0;
    right: -0.5rem;
    background: transparent;
    border-left-color: var(--main-color);
    animation: cursor 0.75s infinite;
}

body.light-theme .home-img img {
    background: #edf7f4;
    box-shadow: 0 0 2.5rem rgba(0, 127, 107, 0.28);
}

body.light-theme .home-content h1,
body.light-theme .home-content h3,
body.light-theme .heading,
body.light-theme .nav-bar a,
body.light-theme .logo {
    color: #102b28;
}

body.light-theme .description p,
body.light-theme .home-content p {
    color: #294946;
}

body.light-theme .visitor-path,
body.light-theme .portfolio-tour-card {
    border-color: rgba(0, 127, 107, 0.24);
    box-shadow: 0 1.2rem 3rem rgba(21, 52, 50, 0.08);
}

body.light-theme .visitor-path,
body.light-theme .portfolio-quest,
body.light-theme .accessibility-panel,
body.light-theme .toast {
    background: rgba(255, 255, 255, 0.94);
}

body.light-theme .visitor-path-hint,
body.light-theme .visitor-path-result p,
body.light-theme .project-card p,
body.light-theme .blog-card p,
body.light-theme .resume-box p {
    color: #294946;
    font-weight: 500;
}

body.light-theme .footer .copyright {
    color: #183a36;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

body.light-theme .footer .social a,
body.light-theme .footer .list li a {
    color: #183a36;
    font-weight: 600;
}

body.light-theme .quest-panel > p:first-child,
body.light-theme .quest-list li {
    color: #294946;
    font-weight: 500;
}

body.light-theme .quest-list i {
    color: #42615d;
}

body.light-theme .modal-content {
    border-color: rgba(0, 127, 107, 0.30);
    box-shadow: 0 2rem 5rem rgba(16, 43, 40, 0.22);
}

body.light-theme .modal-body p,
body.light-theme .modal-body ul li {
    color: #1e3e3a;
    font-weight: 500;
}

body.light-theme .modal-body h2,
body.light-theme .modal-body h3 {
    color: #006f5e;
}

body.light-theme .portfolio-tour-card > p:not(.tour-count) {
    color: #294946;
    font-weight: 500;
}

body.light-theme .contact form .input-box input::placeholder,
body.light-theme .contact form .input-full input::placeholder,
body.light-theme .contact form textarea::placeholder {
    color: #5d7674;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
}

body.reduce-motion .hero-data-network {
    opacity: 0.72;
}

@media (max-width: 768px) {
    .hero-data-network {
        width: min(40rem, 130%);
        opacity: 0.72;
    }
}

@media (max-width: 576px) {
    .visitor-path-result {
        align-items: flex-start;
        flex-direction: column;
    }

    .accessibility-widget {
        right: 2rem;
        bottom: 2rem;
    }

    .accessibility-panel {
        width: min(25rem, calc(100vw - 4rem));
    }
}

@media (min-width: 993px) {
    .home {
        gap: clamp(7rem, 9vw, 15rem);
    }

    .home-img {
        align-self: center;
        transform: translateY(-4rem);
    }

    .home-img img {
        top: 0;
    }
}

/* --- 375px Breakpoint (Extra Small Phones) --- */
@media (max-width: 375px) {
    .home-content h1 {
        font-size: 3.5rem;
    }

    .home-img img {
        width: 80%;
    }

    .timeline-content {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }
}

/* --- Portfolio Quest --- */
.portfolio-quest {
    position: fixed;
    left: 3rem;
    bottom: 3rem;
    width: min(34rem, calc(100vw - 6rem));
    z-index: 50;
    color: var(--text-color);
    background: rgba(19, 19, 19, 0.92);
    border: 1px solid rgba(0, 255, 204, 0.45);
    border-radius: 1.6rem;
    box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.35), 0 0 2rem rgba(0, 255, 204, 0.08);
    backdrop-filter: blur(1.2rem);
    -webkit-backdrop-filter: blur(1.2rem);
    overflow: hidden;
}

.quest-toggle {
    width: 100%;
    padding: 1.35rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    color: var(--text-color);
    background: transparent;
    font: inherit;
}

.quest-title,
.quest-score {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.35rem;
    font-weight: 600;
}

.quest-title i,
.quest-score strong,
.quest-score > i {
    color: var(--main-color);
}

.quest-title i {
    font-size: 1.9rem;
}

.quest-score > i {
    font-size: 1.8rem;
    transition: transform 0.25s ease;
}

.quest-panel {
    padding: 0 1.5rem 1.5rem;
    max-height: 26rem;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
}

.quest-panel > p:first-child {
    margin-bottom: 1rem;
    color: #cfcfcf;
    font-size: 1.25rem;
    line-height: 1.5;
}

.quest-progress {
    height: 0.7rem;
    margin-bottom: 1.2rem;
    overflow: hidden;
    border-radius: 99rem;
    background: rgba(255, 255, 255, 0.12);
}

.quest-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00c99e, var(--main-color));
    box-shadow: 0 0 1rem var(--main-color);
    transition: width 0.35s ease;
}

.quest-list {
    display: grid;
    gap: 0.9rem;
    list-style: none;
}

.quest-list li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #d6d6d6;
    font-size: 1.3rem;
    transition: color 0.2s ease;
}

.quest-list i {
    color: #8a8a8a;
    font-size: 1.8rem;
}

.quest-list .is-complete,
.quest-list .is-complete i {
    color: var(--main-color);
}

.quest-complete {
    display: none;
    margin-top: 1.2rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(0, 255, 204, 0.22);
    color: var(--main-color);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.45;
}

.quest-complete.is-visible {
    display: block;
}

.portfolio-quest.is-collapsed .quest-panel {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.portfolio-quest.is-collapsed .quest-score > i {
    transform: rotate(-90deg);
}

@media (max-width: 576px) {
    .portfolio-quest {
        left: 2rem;
        bottom: 2rem;
        width: min(32rem, calc(100vw - 4rem));
    }
}

/* Keep the portfolio quest in the page flow so it never covers page content. */
.portfolio-quest {
    position: fixed;
    left: 2.4rem;
    bottom: 2.4rem;
    width: min(34rem, calc(100vw - 4.8rem));
    max-width: 34rem;
    margin: 0;
    z-index: 80;
}

.portfolio-quest.is-collapsed {
    width: 5.4rem;
    border-radius: 50%;
}

.portfolio-quest.is-collapsed .quest-toggle {
    width: 5.4rem;
    height: 5.4rem;
    justify-content: center;
    padding: 0;
}

.portfolio-quest.is-collapsed .quest-label,
.portfolio-quest.is-collapsed .quest-score {
    display: none;
}

.portfolio-quest.is-collapsed .quest-title i {
    font-size: 2.4rem;
}

@media (min-width: 993px) {
    .home-content {
        padding: 1rem 0 3rem;
        max-width: 64rem;
    }
}

@media (max-width: 576px) {
    .portfolio-quest {
        left: 1.6rem;
        bottom: 1.6rem;
        width: min(34rem, calc(100vw - 3.2rem));
    }
}

/* --- Three.js Portfolio Effects --- */
.home {
    position: relative;
    overflow: hidden;
}

.home-content,
.home-img {
    z-index: 1;
}

.ambient-data-network {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.3;
    pointer-events: none;
}

.ambient-data-network canvas,
.project-flow canvas,
.contact-network-sphere canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.project-card {
    position: relative;
    isolation: isolate;
}

.project-flow {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    opacity: 0.3;
    pointer-events: none;
}

.project-card .project-content,
.project-card .project-btns {
    position: relative;
    z-index: 1;
}

.footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.contact-network-sphere {
    position: absolute;
    width: min(38rem, 48vw);
    aspect-ratio: 1;
    right: clamp(-10rem, -4vw, -3rem);
    top: 50%;
    z-index: -1;
    opacity: 0.38;
    pointer-events: none;
    transform: translateY(-50%);
}

.footer .social,
.footer .list,
.footer .copyright {
    position: relative;
    z-index: 1;
}

body.reduce-motion .ambient-data-network,
body.reduce-motion .project-flow,
body.reduce-motion .contact-network-sphere {
    opacity: 0.2;
}

@media (max-width: 768px) {
    .ambient-data-network {
        opacity: 0.18;
    }

    .project-flow,
    .contact-network-sphere {
        display: none;
    }
}

/* --- Interactive 3D Skills and Journey --- */
.skill-universe,
.journey-tunnel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(34rem, 1.1fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 10rem);
    min-height: 72rem;
    overflow: hidden;
}

.skill-universe {
    background: radial-gradient(circle at 75% 50%, rgba(0, 255, 204, 0.07), transparent 33%), var(--second-bg-color);
}

.journey-tunnel {
    grid-template-columns: minmax(34rem, 1.1fr) minmax(0, 0.9fr);
    background: radial-gradient(circle at 28% 50%, rgba(0, 255, 204, 0.05), transparent 34%), var(--bg-color);
}

.skill-universe-copy,
.journey-tunnel-copy {
    position: relative;
    z-index: 1;
}

.section-kicker {
    margin-bottom: 1.2rem;
    color: var(--main-color);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.skill-universe-copy > p:not(.section-kicker),
.journey-tunnel-copy > p:not(.section-kicker) {
    max-width: 52rem;
    color: #b9c8c5;
    font-size: 1.6rem;
    line-height: 1.75;
}

.skill-universe-canvas,
.journey-tunnel-canvas {
    width: 100%;
    min-height: 46rem;
    aspect-ratio: 1.1;
    pointer-events: auto;
}

.journey-tunnel-canvas {
    grid-column: 1;
    grid-row: 1;
}

.journey-tunnel-copy {
    grid-column: 2;
    grid-row: 1;
}

.skill-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
}

.skill-selector button {
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 99rem;
    background: rgba(0, 255, 204, 0.05);
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 600;
    padding: 0.85rem 1.45rem;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-selector button:hover,
.skill-selector button.is-active {
    transform: translateY(-2px);
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1.8rem rgba(0, 255, 204, 0.35);
}

.journey-steps {
    display: grid;
    gap: 1.4rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
}

.journey-steps li {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    align-items: center;
    gap: 1.2rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 1.3rem;
    background: rgba(19, 19, 19, 0.5);
}

.journey-steps strong {
    color: var(--main-color);
    font-size: 1.6rem;
}

.journey-steps span {
    color: #d3e2df;
    font-size: 1.45rem;
    line-height: 1.45;
}

.project-card.skill-project-highlight {
    border: 2px solid var(--main-color);
    background: linear-gradient(145deg, rgba(0, 255, 204, 0.16), var(--second-bg-color) 48%);
    box-shadow: 0 0 1.2rem rgba(0, 255, 204, 0.65), 0 0 4.2rem rgba(0, 255, 204, 0.2);
    transform: translateY(-0.8rem) scale(1.015);
}

.project-card.skill-project-highlight::after {
    content: attr(data-skill-match);
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    z-index: 3;
    border: 1px solid rgba(0, 255, 204, 0.7);
    border-radius: 99rem;
    background: #062f29;
    box-shadow: 0 0 1.6rem rgba(0, 255, 204, 0.42);
    color: var(--main-color);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.9rem;
}

body.has-skill-selection .project-card:not(.skill-project-highlight) {
    filter: saturate(0.45) brightness(0.7);
    opacity: 0.52;
    transform: scale(0.985);
}

body.light-theme .skill-universe {
    background: radial-gradient(circle at 75% 50%, rgba(0, 127, 107, 0.12), transparent 33%), #f2f8f6;
}

body.light-theme .journey-tunnel {
    background: radial-gradient(circle at 28% 50%, rgba(126, 58, 237, 0.1), transparent 34%), #f8fbfa;
}

body.light-theme .skill-universe-copy > p:not(.section-kicker),
body.light-theme .journey-tunnel-copy > p:not(.section-kicker),
body.light-theme .journey-steps span {
    color: #294946;
}

body.light-theme .journey-steps li {
    background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 992px) {
    .skill-universe,
    .journey-tunnel {
        grid-template-columns: 1fr;
        gap: 1rem;
        min-height: auto;
    }

    .skill-universe-copy,
    .journey-tunnel-copy,
    .journey-tunnel-canvas {
        grid-column: auto;
        grid-row: auto;
    }

    .skill-universe-canvas,
    .journey-tunnel-canvas {
        order: 2;
        min-height: 36rem;
        max-width: 58rem;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .skill-universe-canvas,
    .journey-tunnel-canvas {
        min-height: 29rem;
    }

    .journey-steps li {
        grid-template-columns: 5.5rem 1fr;
        padding: 1.2rem;
    }
}

/* --- Subtle WebGL transitions and hero depth --- */
#scroll-webgl-transition {
    position: fixed;
    inset: 0;
    z-index: 20;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    mix-blend-mode: screen;
}

.home-content,
.home-img,
.ambient-data-network {
    will-change: transform;
}

.home-content {
    transform: translate3d(var(--parallax-content-x, 0px), var(--parallax-content-y, 0px), 0);
}

.home-img {
    transform: translate3d(var(--parallax-image-x, 0px), var(--parallax-image-y, 0px), 0);
}

.ambient-data-network {
    transform: translate3d(var(--parallax-ambient-x, 0px), var(--parallax-ambient-y, 0px), 0) scale(1.03);
}

@media (min-width: 993px) {
    .home-img {
        transform: translate3d(var(--parallax-image-x, 0px), calc(-4rem + var(--parallax-image-y, 0px)), 0);
    }
}

body.reduce-motion #scroll-webgl-transition {
    display: none;
}

body.reduce-motion .home-content,
body.reduce-motion .home-img,
body.reduce-motion .ambient-data-network {
    will-change: auto;
}

/* --- Tasarım iyileştirmeleri --- */
section.education,
section.blog,
section.projects {
    min-height: auto;
}

.projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1000px;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

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

.blog-card .btn {
    background: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: none;
}

.blog-card .btn:hover {
    background: var(--main-color);
    color: var(--bg-color);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2.5rem 0 3rem;
}

.btn.btn-outline {
    background: transparent;
    color: var(--main-color);
    border-color: var(--main-color);
    box-shadow: none;
}

.btn.btn-outline:hover {
    background: var(--main-color);
    color: var(--bg-color);
}

@media (max-width: 992px) {
    .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .home-img img {
        width: 18rem;
        height: 18rem;
    }
}

/* Canlı demo butonu */
.prj-btn.prj-btn-live {
    background: var(--main-color);
    color: var(--bg-color);
}

.prj-btn.prj-btn-live:hover {
    background: transparent;
    color: var(--main-color);
}

.prj-live-note {
    margin-top: 1.2rem;
    font-size: 1.2rem;
    color: #9aa5a3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
