/* Base styles (Mobile First) */
:root {
    --container-padding: 20px;
    --border-radius: 24px;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent: #f59e0b;
    --accent-secondary: #d97706;
    --accent-hover: #fbbf24;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --button-bg: #d97706;
    --button-hover: #f59e0b;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-hover: rgba(30, 41, 59, 0.9);
    --icon-size: 1.5rem;
    --icon-color: var(--accent);
    --gradient-start: #f59e0b;
    --gradient-end: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #111827 100%);
    color: var(--text-primary);
    line-height: 1.6;
    padding: var(--container-padding);
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: var(--container-padding);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.bento-item {
    grid-column: 1 / -1;
    grid-row: auto;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Scrollbar styles for the grid */
.bento-grid::-webkit-scrollbar {    
    width: 6px;
}

.bento-grid::-webkit-scrollbar-track {
    background: transparent;
}

.bento-grid::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* Profile Section */
.profile {
    grid-column: 1 / 6;
    grid-row: 1 / 2;
    background: linear-gradient(135deg, 
        rgba(109, 40, 217, 0.1) 0%, 
        rgba(76, 29, 149, 0.1) 50%,
        rgba(147, 51, 234, 0.1) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile h1 {
    margin-bottom: 0.5rem;
}

.profile .title {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.profile-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
}

.profile-image-container {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 180px;
    height: 240px;
    border-radius: 10px;

    object-fit: cover;
    transition: var(--transition);
}

.profile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    max-width: 500px;
}

/* Conteneur pour le contenu expansible */
.expandable-content {
    display: block;
}

.profile-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: justify;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat();
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.info-item i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.profile-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    align-self: flex-start;
}

.profile-toggle:hover {
    color: var(--accent-hover);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* Media Queries for Profile Section */
@media (max-width: 1080px) {
    .profile-content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .profile-content {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    
    .profile-toggle {
        display: flex;
        align-self: center;
    }
    
    .expandable-content {
        display: none;
        width: 100%;
        text-align: left;
    }
    
    .expandable-content.expanded {
        display: block;
        animation: fadeIn 0.3s ease-out forwards;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1080px) {
    .personal-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile Devices */
@media (max-width: 768px) {
    :root {
        --container-padding: 10px;
        --border-radius: 16px;
    }
    
    .bento-grid {
        gap: 1rem;
    }
    
    .bento-item {
        padding: 1.5rem;
    }
    
    .profile-img {
        width: 150px;
        height: 200px;
    }
    
    .profile-description {
        font-size: 0.95rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .title {
        font-size: 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .profile-img {
        width: 120px;
        height: 160px;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Cross-browser compatibility fixes */
.bento-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    -o-transition: var(--transition);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    line-height: 1.2;
}

/* Ensure animations work across browsers */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
        -webkit-transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        -webkit-transform: translateY(0);
    }
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-10px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

/* Safari and Firefox compatibility */
@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) {
    .bento-item {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

@supports not ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
    .bento-item {
        background: rgba(19, 21, 26, 0.8);
    }
}

/* Ensure flexbox works on older browsers */
.profile-content,
.social-links,
.profile-toggle,
.info-item,
.hobby-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.profile-toggle {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

/* Hobbies Section */
.hobbies {
    grid-column: 6 / 9;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.hobby-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hobby-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
}

.hobby-item i {
    font-size: 2rem;
    color: var(--accent);
}

/* CV Download Section */
.cv-download {
    grid-column: 1 / 9;
    grid-row: 2 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--button-bg);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin-top: 1.5rem;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: var(--button-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.2);
}

.download-btn i {
    font-size: 1.4rem;
}

/* Skills Section */
.skills {
    grid-column: 9 / 13;
    grid-row: 1 / 3;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.8rem;
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.05) 0%,
        rgba(217, 119, 6, 0.02) 100%);
    opacity: 0;
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.skill-category h3 i {
    font-size: 1.4rem;
    opacity: 0.9;
    width: 50px;
    text-align: center;
}

.skill-category ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.7rem;
    justify-items: center;
}

.skill-category li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.07);
    box-shadow: 0 2px 8px 0 rgba(30,41,59,0.07);
    border: none;
    font-size: 1rem;
    color: var(--text-secondary);
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    transition: var(--transition);
}

.skill-category li i {
    font-size: 1.15rem;
    color: var(--accent);
    width: 22px;
    text-align: center;
}

.skill-category li:hover {
    background: rgba(245, 158, 11, 0.13);
    color: var(--text-primary);
    box-shadow: 0 4px 16px 0 rgba(245, 158, 11, 0.10);
}

/* Skill level indicators */
.skill-level {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-left: auto;
    position: relative;
    overflow: hidden;
}

.skill-level::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: var(--transition);
}

/* Experience Section */
.experience {
    grid-column: 1 / 7;
    grid-row: 3 / 5;
}

/* Education Section */
.education {
    grid-column: 7 / 13;
    grid-row: 3 / 5;
}

/* Languages Section */
.languages {
    grid-column: 1 / 4;
    grid-row: 5 / 6;
}

/* Projects Section */
.projects {
    grid-column: 4 / 13;
    grid-row: 5 / 6;
}

/* Small Mobile (320px - 374px) */
@media (min-width: 320px) {
    .profile {
        grid-column: 1;
        grid-row: auto;
    }
    
    .projects {
        grid-column: 1;
        grid-row: auto;
        margin-top: 1rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-img {
        width: 120px;
        height: 160px;
    }
    
    .profile-content {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Landscape (375px - 767px) */
@media (min-width: 375px) and (max-width: 767px) and (orientation: landscape) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .profile {
        grid-column: 1 / 3;
    }
    
    .projects {
        grid-column: 1 / 3;
        margin-top: 1.2rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .hobbies,
    .cv-download,
    .main-skills-block,
    .hard-skills-block,
    .soft-skills-block,
    .experience,
    .education,
    .languages {
        grid-column: span 1;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (min-width: 768px) {
    :root {
        --container-padding: 15px;
        --border-radius: 20px;
    }
    
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }

    .profile {
        grid-column: 1 / 7;
        grid-row: auto;
    }
    
    .projects {
        grid-column: 1 / 7;
        grid-row: auto;
        margin-top: 1.5rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .hobbies {
        grid-column: 1 / 4;
        grid-row: auto;
    }
    
    .cv-download {
        grid-column: 4 / 7;
        grid-row: auto;
    }
    
    .main-skills-block,
    .hard-skills-block,
    .soft-skills-block,
    .experience,
    .education,
    .languages {
        grid-column: 1 / 7;
        grid-row: auto;
    }
    
    .profile-content-wrapper {
        flex-direction: row;
        text-align: left;
    }
    
    .profile-img {
        width: 150px;
        height: 200px;
    }
}

/* Tablet Landscape (1024px - 1279px) */
@media (min-width: 1024px) {
    :root {
        --container-padding: 20px;
        --border-radius: 24px;
    }
    
    .bento-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1.8rem;
    }

    .profile {
        grid-column: 1 / 6;
        grid-row: 1 / 3;
    }
    
    .projects {
        grid-column: 1 / 9;
        grid-row: 3 / 4;
        margin-top: 1.8rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .hobbies {
        grid-column: 6 / 9;
        grid-row: 1 / 2;
    }
    
    .cv-download {
        grid-column: 6 / 9;
        grid-row: 2 / 3;
    }
    
    .main-skills-block {
        grid-column: 1 / 5;
        grid-row: 4 / 5;
    }
    
    .hard-skills-block {
        grid-column: 5 / 9;
        grid-row: 4 / 5;
    }
    
    .soft-skills-block {
        grid-column: 1 / 9;
        grid-row: 5 / 6;
    }
    
    .experience {
        grid-column: 1 / 6;
        grid-row: 6 / 7;
    }
    
    .education {
        grid-column: 6 / 9;
        grid-row: 6 / 7;
    }
    
    .languages {
        grid-column: 1 / 4;
        grid-row: 7 / 8;
    }
    
    .profile-img {
        width: 180px;
        height: 240px;
    }
}

/* Desktop (1280px - 1599px) */
@media (min-width: 1280px) {
    .bento-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }

    .profile {
        grid-column: 1 / 8;
        grid-row: 1 / 3;
    }
    
    .projects {
        grid-column: 1 / 13;
        grid-row: 3 / 4;
        margin-top: 2rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .hobbies {
        grid-column: 8 / 13;
        grid-row: 1 / 2;
    }
    
    .cv-download {
        grid-column: 8 / 13;
        grid-row: 2 / 3;
    }
    
    .main-skills-block {
        grid-column: 1 / 5;
        grid-row: 4 / 5;
    }
    
    .hard-skills-block {
        grid-column: 5 / 9;
        grid-row: 4 / 5;
    }
    
    .soft-skills-block {
        grid-column: 9 / 13;
        grid-row: 4 / 5;
    }
    
    .experience {
        grid-column: 1 / 9;
        grid-row: 5 / 6;
    }
    
    .education {
        grid-column: 9 / 13;
        grid-row: 5 / 6;
    }
    
    .languages {
        grid-column: 1 / 5;
        grid-row: 6 / 7;
    }
}

/* Large Desktop (1600px and up) */
@media (min-width: 1600px) {
    .bento-grid {
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .project-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Print styles */
@media print {
    .bento-grid {
        display: block;
    }
    
    .bento-item {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bento-item {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Bento Item Styles */
.bento-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    -webkit-transition: var(--transition);
    -moz-transition: var(--transition);
    -o-transition: var(--transition);
}

.bento-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Timeline Items */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.experience-item,
.education-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 3px solid var(--accent);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.8rem;
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.1) 0%,
        rgba(217, 119, 6, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.project-card:hover::before {
    opacity: 1;
}

.project-content {
    position: relative;
    z-index: 1;
}

.project-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.project-content h3 i {
    color: var(--accent);
    font-size: 1.2rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    transition: var(--transition);
}

.project-card:hover .tech-tag {
    background: rgba(245, 158, 11, 0.1);
}

.project-links {
    position: absolute;
    top: 1.8rem;
    right: 1.8rem;
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Social Links */
.social-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-hover);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bento-item {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Amélioration de la section langues */
.languages ul {
    display: grid;
    gap: 1rem;
}

.languages li {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.8rem;
}

/* Responsive Design */

/* Base styles (Mobile First - Covers screens up to 767px) */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: var(--container-padding);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.bento-item {
    grid-column: 1 / -1;
    grid-row: auto;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile Landscape (Optimized for width, but still on 1 or 2 columns) */
@media (min-width: 480px) and (max-width: 767px) and (orientation: landscape) {
     .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.2rem;
    }
    .profile, .projects {
        grid-column: span 2;
    }
}

/* Tablet Portrait and Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
        padding: 15px;
    }

    .profile {
        grid-column: 1 / 7;
        grid-row: auto;
    }
    .hobbies {
        grid-column: 1 / 4;
        grid-row: auto;
    }
    .cv-download {
        grid-column: 4 / 7;
        grid-row: auto;
    }
    .projects {
        grid-column: 1 / 7;
        grid-row: auto;
        margin-top: 1.5rem;
    }
    .main-skills-block,
    .hard-skills-block,
    .soft-skills-block,
    .experience,
    .education,
    .languages {
        grid-column: 1 / 7;
        grid-row: auto;
    }
}

/* Small Desktop / Large Tablet Landscape (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
     .bento-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1.8rem;
        padding: 20px;
    }

    .profile {
        grid-column: 1 / 6;
        grid-row: 1 / 3;
    }
    .hobbies {
        grid-column: 6 / 9;
        grid-row: 1 / 2;
    }
    .cv-download {
        grid-column: 6 / 9;
        grid-row: 2 / 3;
    }
    .projects {
        grid-column: 1 / 9;
        grid-row: 3 / 4;
        margin-top: 1.8rem;
    }
    .main-skills-block {
        grid-column: 1 / 5;
        grid-row: 4 / 5;
    }
    .hard-skills-block {
        grid-column: 5 / 9;
        grid-row: 4 / 5;
    }
     .soft-skills-block {
        grid-column: 1 / 9;
        grid-row: 5 / 6;
    }
    .experience {
        grid-column: 1 / 6;
        grid-row: 6 / 7;
    }
    .education {
        grid-column: 6 / 9;
        grid-row: 6 / 7;
    }
    .languages {
        grid-column: 1 / 4;
        grid-row: 7 / 8;
    }
}

/* Desktop (1280px - 1599px) */
@media (min-width: 1280px) and (max-width: 1599px) {
    .bento-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
        padding: 20px;
    }

    .profile {
        grid-column: 1 / 8;
        grid-row: 1 / 3;
    }
    .hobbies {
        grid-column: 8 / 13;
        grid-row: 1 / 2;
    }
    .cv-download {
        grid-column: 8 / 13;
        grid-row: 2 / 3;
    }
    .projects {
        grid-column: 1 / 13;
        grid-row: 3 / 4;
        margin-top: 2rem;
    }
    .main-skills-block {
        grid-column: 1 / 5;
        grid-row: 4 / 5;
    }
    .hard-skills-block {
        grid-column: 5 / 9;
        grid-row: 4 / 5;
    }
    .soft-skills-block {
        grid-column: 9 / 13;
        grid-row: 4 / 5;
    }
    .experience {
        grid-column: 1 / 9;
        grid-row: 5 / 6;
    }
    .education {
        grid-column: 9 / 13;
        grid-row: 5 / 6;
    }
    .languages {
        grid-column: 1 / 5;
        grid-row: 6 / 7;
    }
}

/* Large Desktop (1600px and up) */
@media (min-width: 1600px) {
     .bento-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
        padding: 20px;
        max-width: 1600px;
        margin: 0 auto;
     }
     .profile {
        grid-column: 1 / 8;
        grid-row: 1 / 3;
    }
    .hobbies {
        grid-column: 8 / 13;
        grid-row: 1 / 2;
    }
    .cv-download {
        grid-column: 8 / 13;
        grid-row: 2 / 3;
    }
    .projects {
        grid-column: 1 / 13;
        grid-row: 3 / 4;
        margin-top: 2rem;
    }
    .main-skills-block {
        grid-column: 1 / 5;
        grid-row: 4 / 5;
    }
    .hard-skills-block {
        grid-column: 5 / 9;
        grid-row: 4 / 5;
    }
    .soft-skills-block {
        grid-column: 9 / 13;
        grid-row: 4 / 5;
    }
    .experience {
        grid-column: 1 / 9;
        grid-row: 5 / 6;
    }
    .education {
        grid-column: 9 / 13;
        grid-row: 5 / 6;
    }
    .languages {
        grid-column: 1 / 5;
        grid-row: 6 / 7;
    }
}

/* Ensure project grid columns adapt within their parent container */
.project-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     gap: 1.5rem;
     margin-top: 1.5rem;
}

/* Specific project grid adjustments for larger screens */
@media (min-width: 768px) {
     .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.8rem;
     }
}

@media (min-width: 1024px) {
     .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
     }
}

@media (min-width: 1280px) {
     .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     }
}

@media (min-width: 1600px) {
     .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 2.5rem;
     }
}

@media (max-width: 700px) {
  .skill-category ul {
    grid-template-columns: repeat(2, 1fr);
  }
} 