/* Portfolio Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap');

/* Professional Trajectory Section */
.trajectory-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--soft-orange, #fcf0e3) 0%, var(--soft-pink, #f7f0f0) 100%);
}

.section-title {
    font-size: 2.5rem;
    color: var(--title-orange, #d35400);
    text-align: center;
    margin-bottom: 60px;
    font-weight: 400;
    font-family: 'Lora', serif;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--title-orange, #d35400);
    border-radius: 2px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(211, 84, 0, 0.3);
}

.timeline-item {
    position: relative;
    padding-bottom: 50px;
}

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

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--title-orange, #d35400);
    border-radius: 50%;
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--soft-orange, #fcf0e3);
}

.timeline-content {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius, 10px);
    box-shadow: var(--shadow, 0 5px 15px rgba(0,0,0,0.05));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover, 0 10px 25px rgba(0,0,0,0.1));
}

.timeline-content h3 {
    color: var(--title-orange, #d35400);
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 400;
    font-family: 'Lora', serif;
}

.timeline-date {
    color: #e67e22;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 15px;
    background: var(--soft-pink, #f7f0f0);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    border: 1px solid rgba(211, 84, 0, 0.2);
}

.timeline-content p {
    color: #4a4a4a;
    line-height: 1.6;
    margin: 0;
}

/* Projects Section */
.projects-section {
    padding: 0 0 80px 0 !important; /* Top padding removed, spacing controlled by section above */
    background: #fdf8f4;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border-radius: var(--border-radius, 10px);
    overflow: hidden;
    box-shadow: var(--shadow, 0 5px 15px rgba(0,0,0,0.05));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover, 0 10px 25px rgba(0,0,0,0.1));
}

/* Project Media - Fixed 16:9 Aspect Ratio */
.project-media {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    overflow: hidden;
    background: var(--soft-orange, #fcf0e3);
}

.project-media img,
.project-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    transition: transform 0.5s ease;
}

.project-card:hover .project-media img {
    transform: scale(1.05);
}

/* Project Content */
.project-content {
    padding: 30px;
}

.project-content h3 {
    color: var(--title-orange, #d35400);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 400;
    font-family: 'Lora', serif;
}

.project-content p {
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ================================================== */
/* PROJECT BUTTON RESPONSIVENESS */
/* ================================================== */

/* Medium screens */
@media (max-width: 768px) {
    .trajectory-section {
        padding: 80px 20px;
    }
    
    .projects-section {
        padding: 120px 20px 80px 20px;
    }

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

    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: -40px;
    }

    .timeline-content {
        padding: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-content {
        padding: 20px;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .trajectory-section {
        padding: 80px 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .project-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.65rem;
    }
}

/* ================================================== */
/* SKILLS SECTION */
/* ================================================== */

#my-approach.section {
    padding: 80px 0 0 0; /* Removed bottom padding to fix spacing */
    background: #fdf8f4;
}

#my-approach .card-container .card {
    --stagger-y: 0px;
    transform: translateY(var(--stagger-y));
}

#my-approach .card-container .card:hover {
    transform: translateY(calc(var(--stagger-y) - 5px));
    box-shadow: var(--shadow-hover, 0 10px 25px rgba(0,0,0,0.1));
}

#my-approach .card {
    background-color: var(--soft-orange, #fcf0e3);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#my-approach .card:hover {
    background-color: var(--soft-orange-darker, #f7e4d0);
}

#my-approach .card h3 {
    color: #d35400;
}

/* 1 Card Layout - Small containers get LEAST spacing */
@container (max-width: 600px) {
    #my-approach .card-container {
        grid-template-columns: 1fr;
    }
    #my-approach .card-container .card {
        --stagger-y: 0px;
    }
}

/* 2 Card Layout - Medium containers get MEDIUM spacing */
@container (min-width: 601px) and (max-width: 899px) {
    #my-approach .card-container {
        grid-template-columns: repeat(2, 1fr);
    }
    #my-approach .card-container .card:nth-child(2n-1) { --stagger-y: 20px; }
    #my-approach .card-container .card:nth-child(2n)   { --stagger-y: 0px; }
}

/* 3 Card Layout - Large containers get spacing */
@container (min-width: 900px) and (max-width: 1199px) {
    #my-approach .card-container {
        grid-template-columns: repeat(3, 1fr);
    }
    #my-approach .card-container .card:nth-child(3n-2) { --stagger-y: 40px; }
    #my-approach .card-container .card:nth-child(3n-1) { --stagger-y: 20px; }
    #my-approach .card-container .card:nth-child(3n)   { --stagger-y: 0px; }
}

/* 4+ Card Layout - Extra large containers */
@container (min-width: 1200px) {
    #my-approach .card-container {
        grid-template-columns: repeat(4, 1fr);
    }
    #my-approach .card-container .card:nth-child(4n-3) { --stagger-y: 60px; }
    #my-approach .card-container .card:nth-child(4n-2) { --stagger-y: 40px; }
    #my-approach .card-container .card:nth-child(4n-1) { --stagger-y: 20px; }
    #my-approach .card-container .card:nth-child(4n)   { --stagger-y: 0px; }
}

/* Media queries for section spacing control - separate from container queries */
@media (min-width: 900px) {
    #my-approach.section {
        margin-bottom: 8rem;
    }
}

@media (min-width: 601px) and (max-width: 899px) {
    #my-approach.section {
        margin-bottom: 6rem;
    }
}

@media (max-width: 600px) {
    #my-approach.section {
        margin-bottom: 5rem;
    }
}