/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #e5e7eb; /* dark gray background for preview */
    color: #1a1a1a;
    line-height: 1.6;
}

/* Page Layout for Print/PDF */
.page {
    background-color: #fff;
    width: 210mm;
    min-height: 297mm; /* Use min-height instead of fixed height so it doesn't crop */
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Cover Page Specific Styles */
.cover-page {
    background-color: #a1ccd4; /* Light teal/cyan from image */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* White square in the middle */
.cover-content {
    background-color: #fff;
    width: 120mm;
    height: 120mm;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cover-logo-box {
    text-align: center;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    color: #000;
    margin-bottom: 5px;
}

.logo-divider {
    height: 1px;
    background-color: #7b9ea3; /* darker teal */
    width: 120%;
    margin: 0 auto 5px auto;
    position: relative;
    left: -10%;
}

.cover-logo-box::before {
    content: "";
    display: block;
    height: 1px;
    background-color: #7b9ea3;
    width: 120%;
    margin: 0 auto 5px auto;
    position: relative;
    left: -10%;
}

.logo-subtext {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.15rem;
    color: #000;
}

/* Cover Footer Banner */
.cover-footer {
    position: absolute;
    bottom: 30mm;
    width: 100%;
    text-align: center;
    padding: 0 20mm;
    box-sizing: border-box;
}

.cover-footer h3 {
    display: inline-block;
    background-color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    line-height: 1.4;
    padding: 15mm 20mm;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ----------------------------------
   Content Pages 
-----------------------------------*/
.content-page {
    padding: 20mm 20mm 40mm 20mm; /* Increased bottom padding to 40mm to prevent overlap with logo */
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Teal borders at top and bottom of content pages */
.content-page::before {
    content: "";
    position: absolute;
    top: 5mm;
    left: 0;
    width: 100%;
    height: 8mm;
    border-top: 3px solid #a1ccd4;
    border-bottom: 7px solid #a1ccd4;
}

.content-page::after {
    content: "";
    position: absolute;
    bottom: 5mm;
    left: 0;
    width: 100%;
    height: 8mm;
    border-top: 7px solid #a1ccd4;
    border-bottom: 3px solid #a1ccd4;
}

/* Sections */
.portfolio-section {
    position: relative;
    z-index: 10;
}

.text-center {
    text-align: center;
}

.mt-large {
    margin-top: 60mm;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    color: #000;
    margin-bottom: 10mm; /* reduced from 15mm */
    text-transform: uppercase;
}

.body-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.6; /* reduced from 1.8 */
    color: #1a1a1a;
    text-align: justify;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

a {
    word-break: break-all; /* prevents URLs from overflowing horizontally */
}

/* Watermark */
.watermark-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    text-align: center;
    z-index: 1;
    width: 80%;
}

/* Creating a fake bridge shape for watermark */
.watermark-container::before {
    content: "";
    display: block;
    width: 100%;
    height: 60px;
    border-top: 4px solid #7b9ea3;
    border-radius: 50% 50% 0 0;
    position: absolute;
    top: -30px;
    left: 0;
    z-index: -1;
}

.watermark-logo {
    font-size: 4rem;
    font-weight: 500;
    letter-spacing: 0.3rem;
    color: #7b9ea3;
}

.watermark-sub {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.2rem;
    color: #7b9ea3;
}

/* Circular Logo Bottom Right */
.page-footer-logo {
    position: absolute;
    bottom: 20mm;
    right: 20mm;
    z-index: 10;
}

.circular-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #a1ccd4;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #a1ccd4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.circular-logo .circ-lexis {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.circular-logo .circ-bridge {
    font-size: 0.3rem;
    font-weight: 400;
}

/* Print Settings */
@media print {
    body {
        background-color: transparent;
    }
    .page {
        margin: 0;
        box-shadow: none;
        page-break-after: always;
    }
}

/* Placeholders */
.content-placeholder {
    background-color: #edf2f7;
    border: 1px dashed #cbd5e0;
    padding: 20px;
    border-radius: 6px;
    color: #718096;
    margin-bottom: 15px;
    text-align: left;
}

.team-member {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 3px solid #cbd5e0;
    text-align: left;
}

.team-member h4 {
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    text-align: left;
}

li {
    margin-bottom: 8px;
}

/* ----------------------------------
   CV Pages Specific Styles
-----------------------------------*/

.cv-header {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px; /* reduced from 30px */
    letter-spacing: 1px;
}

.cv-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.cv-left-col {
    width: 60%;
}

.cv-right-col {
    width: 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cv-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px; /* reduced from 20px */
    text-transform: uppercase;
}

/* Profile Image */
.profile-img-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid #a1ccd4;
    padding: 5px;
    margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(161, 204, 212, 0.5);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Formation List */
.formation-list {
    display: table;
    width: 100%;
    margin-bottom: 15px; /* reduced from 30px */
}

.formation-item {
    display: table-row;
}

.formation-year {
    display: table-cell;
    width: 70px;
    padding-right: 15px;
    padding-bottom: 20px;
    font-weight: 500;
    vertical-align: top;
}

.formation-details {
    display: table-cell;
    padding-bottom: 20px;
    vertical-align: top;
}

.formation-bullet {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #000;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    top: -2px;
}

/* Work History Table */
.work-history-header {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px; /* reduced from 40px */
    letter-spacing: 1px;
}

.work-history-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; /* reduced from 30px to save vertical space */
}

.work-item {
    display: flex;
    justify-content: space-between;
}

.work-left {
    width: 30%;
    padding-right: 20px;
}

.work-right {
    width: 68%;
}

.work-role {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.work-company {
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.work-location, .work-date {
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.work-desc-para {
    margin-bottom: 10px;
    font-size: 1.05rem;
    text-align: justify;
}

