/* About Me page styles */

.about-page {
    background-color: #f5f5f5;
    padding-bottom: 3rem;
}

.about-header {
    background-color: var(--dark-bg);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    background-image: linear-gradient(135deg, var(--dark-bg) 0%, #3a3b3c 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.about-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.about-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .about-card {
        flex-direction: row;
    }
}

/* Improved image container for landscape photos */
.about-image-container {
    position: relative;
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.about-image-container.landscape {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

/* Portrait image container */
.about-image-container.portrait {
    width: 100%;
    /* aspect-ratio: 9/16; Reversed from landscape 16/9 to match portrait orientation */
    margin: 0 auto; /* Center the container */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-img {
    width: 90%;
    height: 90%;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

/* In landscape mode, constrain the image properly */
.landscape .about-img {
    width: 100%;
    max-height: 100%;
    object-position: center;
}

/* Portrait image styles */
.portrait .about-img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

/* Image caption styles */
.image-caption {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
    width: 100%;
    padding: 0 1rem;
}

/* General image frame */
.image-frame {
    position: absolute;
    top: 3rem;
    left: 3rem;
    right: 3rem;
    bottom: 3rem;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    z-index: 1;
}

/* Portrait-specific image frame */
.portrait .image-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    z-index: 1;
    box-sizing: border-box;
}

.about-content {
    flex: 2;
    padding: 2rem;
}

.about-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.about-section-title:first-child {
    margin-top: 0;
}

.about-section-title i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.about-section-title h2 {
    color: var(--dark-bg);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.about-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.goal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.goal-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.goal-card:hover {
    transform: translateY(-5px);
}

.goal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(204, 99, 13, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.goal-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.goal-card h3 {
    margin-bottom: 0.75rem;
    color: var(--dark-bg);
    font-weight: 600;
}

.goal-card p {
    font-size: 0.9rem;
    margin-bottom: 0 !important;
}

.skills-section {
    margin-top: 2rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skill-item {
    background-color: #f5f5f5;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-bg);
    transition: all 0.3s ease;
}

.skill-item:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.skill-item i {
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .about-card {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        align-items: center; /* Center items vertically */
    }
    
    .about-image-container.landscape {
        height: auto;
        width: 100%;
        max-height: none;
    }
    
    .about-image-container.portrait {
        height: 100%;
        max-height: 600px; /* Taller max height for portrait */
        justify-self: center; /* Center the container horizontally in grid */
    }
}

.connect-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    border-top: 3px solid var(--primary-color);
}

.connect-card h2 {
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.contact-text {
    color: #555;
    margin-bottom: 1.5rem;
}

.email-container {
    display: flex;
    justify-content: center;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.email-link:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.email-link i {
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-header {
        padding: 2rem 0;
    }
    
    .about-header h1 {
        font-size: 2rem;
    }
    
    .about-image-container {
        padding: 1.5rem;
    }
    
    .about-image-container.portrait {
        max-width: 300px;
    }
    
    .image-frame {
        top: 2.5rem;
        left: 2.5rem;
        right: 2.5rem;
        bottom: 2.5rem;
    }
    
    .about-content {
        padding: 1.5rem;
    }
    
    .about-section-title h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .goal-cards {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        width: 80px;
    }
    
    .about-image-container.portrait {
        max-width: 250px;
    }
}