:root {
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-color: #0984e3;
    --border-color: #dfe6e9;
    --transition-speed: 0.3s;
}
[data-theme="dark"] {
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b2bec3;
    --accent-color: #74b9ff;
    --border-color: #2d3436;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-left: 350px;
    transition: background-color var(--transition-speed);
}
.theme-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px 18px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.theme-btn:hover { transform: scale(1.05); }
nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 350px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 50px;
    z-index: 100;
}
#nav-menu { list-style: none; width: 100%; }
#nav-menu li { margin: 25px 0; }
#nav-menu li a {
    text-decoration:underline;
    color: var(--text-primary);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    transition: color var(--transition-speed);
}
#nav-menu li a:hover { color: var(--accent-color); }
main {
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

h1 { font-size: 2.5rem; letter-spacing: -1px; margin-bottom: 10px; }
h2 { color: var(--accent-color); margin-bottom: 15px; font-weight: 700; }
p { line-height: 1.6; color: var(--text-secondary); font-size: 1.1rem; }
.timeline {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
}
.timeline::after {
    content: ''; position: absolute; width: 4px;
    background-color: var(--border-color);
    top: 0; bottom: 0; left: 50%; margin-left: -2px;
}
.timeline::before {
    content: ''; position: absolute; top: -14px; left: 50%;
    transform: translateX(-50%);
    border: 12px solid transparent; border-bottom: 15px solid var(--accent-color);
    z-index: 2;
}
.container {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.container::after {
    content: ''; position: absolute; width: 20px; height: 20px;
    right: -10px; background-color: var(--bg-card);
    border: 4px solid var(--accent-color); top: 15px; border-radius: 50%; z-index: 1;
}
.left { left: 0; text-align: right; }
.right { left: 50%; }
.right::after { left: -10px; }
.timeline .content {
    padding: 20px;
    background-color: var(--bg-card);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--border-color);
}
.contact-card {
    margin-top: 20px;
    margin-bottom: 40px;
    padding: 40px 60px;
    background-color: var(--bg-card);
    max-width: 850px;
    width: 100%;
    border-radius: 24px;
    border: 2px solid var(--border-color);
    box-shadow: 20px 20px 0px var(--border-color);
    animation: fadeIn 0.8s ease-out;
}
.contact-card h2 { font-size: 3rem; text-align: center; margin-top: 0; margin-bottom: 30px; }
.input-group { margin-bottom: 20px; }
.input-group input, .input-group textarea {
    width: 100%; padding: 18px; font-size: 1.1rem;
    border: 2px solid var(--border-color); border-radius: 14px;
    background-color: var(--bg-main); color: var(--text-primary);
    font-family: inherit; outline: none; transition: all 0.3s ease; resize: vertical;
}
.input-group input:focus, .input-group textarea:focus {
    border-color: var(--accent-color); background-color: var(--bg-card);
    box-shadow: 0 0 15px rgba(9, 132, 227, 0.2); transform: translateY(-2px);
}
.btn-submit {
    width: 100%; padding: 18px; margin-top: 10px;
    background-color: var(--accent-color); color: white;
    border: none; border-radius: 14px; font-size: 1.2rem; font-weight: 700;
    text-transform: uppercase; cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.3);
}
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(9, 132, 227, 0.4); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 15px; width: 100%; z-index: 10;
}
.footer-icons { display: flex; flex-direction: row; gap: 20px; align-items: center; }
.footer-icons a { display: block; transition: transform 0.2s ease; }
.footer-icons a:hover { transform: translateY(-3px); }
.footer-icons img {
    width: 30px; height: 30px; object-fit: contain;
    filter: grayscale(100%); opacity: 0.7; transition: all 0.3s;
}
.footer-icons a:hover img { filter: grayscale(0%); opacity: 1; }
@media (max-width: 1024px) {
    body { padding-left: 0; }
    nav {
        position: relative;
        width: 100%; height: auto;
        padding: 30px 20px;
        border-right: none; border-bottom: 1px solid var(--border-color);
        justify-content: center;
    }
    #nav-menu { text-align: center; }
    #nav-menu li a { font-size: 2rem; }
    main { padding: 40px 20px; }
    .contact-card { padding: 30px 20px; margin: 20px auto; }
}
@media screen and (max-width: 600px) {
    .timeline::after { left: 31px; }
    .timeline::before { left: 31px; }
    .container { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
    .container::after { left: 21px; }
    .right { left: 0%; }
}
.carousel-container {
    position: relative;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}
.carousel-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: 30px;
    box-shadow: 15px 15px 0px var(--border-color);
    border: 3px solid var(--border-color);
}
.carousel-track {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: transform 0.4s ease-in-out;
}
.carousel-slide {
    min-width: 100%;
}
.project-card {
    background-color: var(--bg-card);
    padding: 60px 80px;
    min-height: 500px;  
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.card-header h3 {
    text-decoration: underline;
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 800;
}
.card-header .tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 30px;
}
.project-card p {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
.card-footer span {
    font-weight: 800;
    color: var(--border-color);
    font-size: 3rem;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 30px 0;
    gap: 20px;
}
.carousel-indicator {
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.3s;
}
.carousel-indicator.current-slide {
    background: var(--accent-color);
    transform: scale(1.3);
}
@media (max-width: 1200px) {
    .carousel-container { width: 85%; max-width: 100%; }
    .prev-btn { left: -30px; z-index: 20; width: 50px; height: 50px; font-size: 1.5rem; }
    .next-btn { right: -30px; z-index: 20; width: 50px; height: 50px; font-size: 1.5rem; }
    .project-card { padding: 40px 20px; min-height: auto; }
    .card-header h3 { font-size: 2rem; }
    .project-card p { font-size: 1.1rem; }
}
@media (max-width: 600px) {
    .carousel-container { width: 90%; }
    .prev-btn, .next-btn {
        top: 105%;
        transform: none;
        background: var(--bg-main);
    }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}
.project-detail-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 60px;
}
.project-title-section {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    height: auto;
    min-height: auto;
    overflow: visible;
    flex-shrink: 0;
}
.project-title-section h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    color: var(--text-primary);
    margin-bottom: 0;
    font-weight: 800;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}
.project-title-section .tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 8px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    max-width: 90%;
}
@media (max-width: 600px) {
    .project-title-section {
        margin-bottom: 40px;
        padding-bottom: 10px;
    }
    .project-title-section h1 {
        font-size: 2.2rem;
    }
    .project-title-section .tag {
        font-size: 0.9rem;
        padding: 8px 16px;
        white-space: normal;
        text-align: center;
        height: auto;
    }
    .gallery-window {
        height: 300px;
        box-shadow: 8px 8px 0px var(--border-color);
    }
    .gallery-track img {
        height: 260px;
    }
    .project-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.gallery-window {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 25px;
    border: 4px solid var(--border-color);
    box-shadow: 15px 15px 0px var(--border-color);
    margin-bottom: 60px;
    background: var(--bg-card);
    height: 540px;
    display: flex;
    align-items: center;
}
.gallery-track {
    display: flex;
    width: max-content;
    gap: 30px;
    padding: 0 30px;
    animation: scrollGallery 60s linear infinite;
}
.gallery-track img {
    height: 500px;
    width: auto;  
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    border: 2px solid var(--border-color);
}
.gallery-track img:hover {
    transform: scale(1.02);
}
@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.project-info-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}
.info-block {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.05);
}
.info-block h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
    color: var(--text-primary);
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-card);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 25px;
    border: 2px solid var(--border-color);
    border-radius: 50px; 
    margin-bottom: 20px; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.back-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateX(-5px); 
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
