/* ===========================
   VARIABLES & RESET
   =========================== */
:root {
    --primary-color: #5BC0BE;
    --secondary-color: #3A506B;
    --background-color: #1C2833;
    --text-color: #EAECEE;
    --accent-hover: #84DCC6;
    --transition-speed: 0.3s;
    --aspect-video: 16 / 9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-hover);
}

/* ===========================
   SECTIONS
   =========================== */
.projects-section .container > h3 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2em;
    color: var(--primary-color);
    position: relative;
}

.projects-section .container > h3::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}


/* ===========================
   HEADER & NAVIGATION
   =========================== */
header {
    background: var(--secondary-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.2em;
    color: var(--text-color);
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

.logo-link:hover h1 {
    color: var(--accent-hover);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    font-weight: bold;
}

.cta-link {
    background: var(--primary-color);
    padding: 8px 15px;
    border-radius: 5px;
    color: var(--background-color);
    transition: background var(--transition-speed);
}

.cta-link:hover {
    background: #4a9e9c;
}

/* ===========================
   LANGUAGE TOGGLE
   =========================== */
#language-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85em;
    transition: background var(--transition-speed), color var(--transition-speed);
    margin-left: auto;
}

#language-toggle:hover {
    background: var(--primary-color);
    color: var(--background-color);
}


/* ===========================
   HERO SECTION
   =========================== */
.hero {
    padding: 80px 0 60px;
}

.hero .container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1;
    width: 100%;
}

.hero h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.bio {
    font-size: 1em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-image {
    flex-shrink: 0;
}

.hero-image img {
    width: 280px;
    height: 280px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-links a {
    margin-right: 20px;
    font-weight: bold;
    font-size: 1.1em;
}

/* ===========================
   PROJECTS SECTION
   =========================== */
.projects-section {
    background: var(--background-color);
    padding: 20px 0;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.project-row {
    display: flex;
    align-items: center;
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.7);
    border: 2px solid var(--primary-color);
}

.project-media, 
.project-description {
    flex: 1;
    padding: 30px;
}

.project-media img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.project-images {
    position: relative;
    width: 100%;
    height: 400px;
    align-self: start;
}

.project-images img {
    position: absolute;
    width: 60%;
    height: auto;
    border-radius: 5px;
}

.project-images .image-1 {
    top: 0;
    left: 0;
    z-index: 2;
}

.project-images .image-2 {
    bottom: 0;
    right: 0;
    z-index: 1;
}

.project-image-single {
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.project-image-single img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-video {
    aspect-ratio: var(--aspect-video);
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.project-video iframe {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

@media (max-width: 1400px) {
    .project-images {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        height: auto;
    }

    .project-images img {
        position: static;
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
    }

    .project-image-single {
        grid-column: 1 / -1;
    }
}

.project-description h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6em;
}

.summary-text {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.tech-stack {
    font-size: 0.95em;
    color: #BDC3C7;
    margin: 15px 0 20px;
}

.btn-small {
    display: inline-block;
    background: var(--primary-color);
    color: var(--background-color);
    padding: 10px 18px;
    margin-right: 10px;
    border-radius: 5px;
    font-weight: bold;
    transition: background var(--transition-speed);
}

.btn-small:hover {
    background: #4a9e9c;
}

.competition-row {
    flex-direction: row-reverse;
}


/* ===========================
   ASSOCIATIONS SECTION
   =========================== */
.associations-section {
    background: var(--secondary-color);
    padding: 80px 0;
}

.associations-section .container > h3 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2em;
    color: var(--primary-color);
    position: relative;
}

.associations-section .container > h3::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

/* ===========================
   LAYOUT CONTAINERS
   =========================== */
.associations-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* LEFT SIDE LAYOUT */
.left-side {
    display: grid;
    grid-template-rows: auto auto;
    gap: 20px;
}

/* RIGHT SIDE LAYOUT */
.right-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

/* ===========================
   GROUPED CONTAINERS
   =========================== */
.associations-group {
    background: var(--background-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.right-bottom-group {
    grid-column: 1 / -1;
    background: var(--background-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    row-gap: 25px;
}

/* ===========================
   GROUP TITLES
   =========================== */
.group-title {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 25px;
    text-align: center;
}

.right-bottom-group .group-title {
    grid-column: 1 / -1;
}

/* ===========================
   CARD GRID PATTERNS
   =========================== */
.associations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.left-bottom-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.right-cards-container > .association-card {
    grid-column: auto;
}

.right-cards-container > .association-card:nth-child(1),
.right-cards-container > .association-card:nth-child(2) {
    grid-row: 1;
}

.right-cards-container > .right-bottom-group {
    grid-row: 2;
    grid-column: 1 / -1;
}

.association-card {
    background: var(--background-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.association-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border: 2px solid var(--primary-color);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.card-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3em;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header h5 {
    margin-bottom: 0;
}

.card-date {
    font-size: 0.85em;
    color: #7F8C8D;
    font-weight: 500;
}

.card-skills {
    list-style: none;
    padding: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(91, 192, 190, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-skills li {
    background: rgba(91, 192, 190, 0.15);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.card-content p {
    font-size: 0.9em;
    color: #BDC3C7;
    line-height: 1.6;
    flex-grow: 1;
}


/* ===========================
   PROJECT PAGE STYLES
   =========================== */
.project-overview {
    padding: 80px 0;
    background: var(--background-color);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

.overview-text h1 {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.overview-text h2 {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.overview-text p {
    font-size: 1em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-color);
}

.overview-image img {
    width:100%;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

.project-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.project-details {
    background: var(--background-color);
}

.project-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    margin-bottom: 40px;
}

.detail-section {
    padding: 10px 0;
    border-bottom: 1px solid var(--secondary-color);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.detail-section p {
    font-size: 0.95em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #BDC3C7;
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    padding: 8px 0;
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    padding-left: 20px;
}

.tech-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.tech-list-subtext {
    font-size: 0.85em;
    color: #95A5A6;
    padding-left: 20px;
    margin: 4px 0 12px 0;
    font-weight: 400;
    line-height: 1.5;
}

.project-footer {
    padding: 60px 0;
    background: var(--background-color);
    text-align: center;
}

.conclusion-section {
    padding: 60px 0;
    background: var(--background-color);
    border-top: 3px solid var(--primary-color);
    margin-top: 60px;
}

.conclusion-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.conclusion-content {
    display: flex;
    flex-direction: column;
}

.conclusion-content h2 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.conclusion-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.conclusion-content p {
    font-size: 0.95em;
    line-height: 1.8;
    color: #BDC3C7;
    max-width: 800px;
}

.conclusion-video {
    aspect-ratio: var(--aspect-video);
    width: 100%;
    max-width: 900px;
}

.conclusion-video iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.conclusion-link {
    margin-top: 30px;
    text-align: center;
}

.conclusion-link p {
    font-size: 0.95em;
    color: #BDC3C7;
}

.conclusion-link a {
    color: var(--primary-color);
    font-weight: 500;
    transition: color var(--transition-speed);
}

.conclusion-link a:hover {
    color: var(--accent-hover);
}

@media (max-width: 992px) {
    .conclusion-section .container {
        gap: 30px;
        padding: 0 20px;
    }
}

.footer-content h2 {
    font-size: 2em;
    color: var(--text-color);
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: var(--background-color);
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.btn-primary:hover {
    background: #4a9e9c;
    transform: translateY(-3px);
}


/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        order: 1;
        max-width: 100%;
    }
    
    .hero-image {
        order: 0;
        margin-bottom: 30px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .hero h2 {
        font-size: 3em;
    }

    .project-row, 
    .competition-row {
        flex-direction: column;
    }
    
    .project-media, 
    .project-description {
        width: 100%;
        padding: 20px;
    }

    .project-media img {
        max-height: 300px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .associations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .associations-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .right-cards-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .right-cards-container > .association-card:nth-child(1),
    .right-cards-container > .association-card:nth-child(2) {
        grid-row: auto;
    }

    .right-bottom-group {
        grid-column: 1;
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 15px;
        font-size: 0.9em;
    }

    .card-content {
        min-height: auto;
        padding: 20px;
    }

    .hero h2 {
        font-size: 2.5em;
    }
}