/* Reuse your theme colors */
:root {
    --red: #B13D14;
    --light-peach: #f9f2eb;
    --dark-brown: #340701;
    --deep-red: #9C1A04;
    --peach: #FFD7C1;
    --black: #090400;
    --white: #e6e6e6;
}

body {
    background-color: var(--light-peach);
    color: var(--dark-brown);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--light-peach);
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; 
}

/* About page main container */
.about-main {
    padding: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Hero section */
.about-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 2rem;
}

.about-hero .about-text {
    flex: 1;
    min-width: 280px;
}

.about-hero .about-text h1 {
    font-size: 2.5rem;
    color: var(--deep-red);
    margin-bottom: 0.3rem;
}

.about-hero .about-text .subtitle {
    font-size: 1.1rem;
    color: var(--red);
    margin-bottom: 1rem;
}

.about-hero .about-text p {
    color: var(--dark-brown);
}

.about-photo {
    flex: 0 0 250px;
    height: 300px;
    border-radius: 10%;
    background-color: var(--peach);
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Section titles */
.cv-section {
    margin-bottom: 2.5rem;
}

.cv-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-left: 5px solid var(--deep-red);
    padding-left: 0.8rem;
    color: var(--dark-brown);
}

/* Entry styles */
.cv-entry {
    margin-bottom: 1.5rem;
}

.cv-entry h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--red);
}

.cv-entry .cv-meta {
    font-size: 0.95rem;
    color: var(--black);
    margin-bottom: 0.4rem;
}

.cv-section img {
    width: 200px;
    height: 200px;
}

/* Skills layout */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.skill-group {
    flex: 1;
    min-width: 200px;
}

.skill-group h4 {
    color: var(--deep-red);
    margin-bottom: 0.5rem;
}

.skill-group ul {
    list-style: disc inside;
    padding-left: 0.5rem;
}

/* Footer link back */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    text-decoration: none;
    color: var(--red);
    font-weight: 600;
}

/* Card flip effect */
.card-flip {
    position: relative;
    width: 220px;
    height: 150px;
    margin: 2rem 0;
    /* No float */
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: transparent; /* No background */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s cubic-bezier(.4,2,.6,1), visibility 0.5s;
}

.card-front {
    z-index: 2;
    opacity: 1;
    visibility: visible;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* or cover, depending on your preference */
    display: block;
    background: transparent;
}

.card-back {
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    background: transparent; /* No background */
    color: var(--dark-brown, #340701);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-flip:hover .card-front,
.card-flip:focus-within .card-front {
    opacity: 0;
    visibility: hidden;
}

.card-flip:hover .card-back,
.card-flip:focus-within .card-back {
    opacity: 1;
    visibility: visible;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .about-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-photo {
        width: 200px;
        height: 200px;
    }

    .skills-grid {
        flex-direction: column;
    }
}
