@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 10pt;
    line-height: 1.4;
    color: #333;
    background: #e0e0e0;
    position: relative;
    z-index: 1;
}

/* CV Container - A4 size */
.cv-container {
    width: 210mm;
    height: 297mm;
    display: flex;
    background: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    touch-action: none;
}

a
{ 
    text-decoration: none;
    color: #fff;
}

.bo{ 
    font-weight: 800;
}
.backgr { 
    top: 0px;
    position: absolute;
    width: 210mm;
    height: 63mm;
    background: linear-gradient(90deg, #ffdcb4, #fff3e5);
    z-index: 1;
}
/* Sidebar */
.sidebar {
    text-align: center;
    height: 239mm;
    width: 32%;
    background: #131625;
    border-radius: 0 15px 0 0;
    padding: 25px 18px;
    display: flex;
    flex-direction: column;
    align-self: flex-end;
    z-index: 999;
    
}

.photo {
    margin-top: 18px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.3);
}

.real-photo{ 
    position: absolute;
    left:6.3%;
    top: 13%;
    width: 160px;
    height: 155px;
    margin: 0 auto 25px;
    border: 2px solid #fff;
    border-radius: 6px;
    overflow: hidden;
    background: #ddd;
    z-index: 1000;
}

.cert { 
    position: absolute;
    bottom: 0;
    right: 5px;
    color: #444;
    font-size: 7pt;
    font-style: italic;
}

/* Contact Info */
.contact-info {
    margin-top: 75px;
    
    color: #fff;
}

.contact-item {
   
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
    font-size: 9pt;
    
}

.contact-item i {
    width: 18px;
    margin-right: 10px;
    font-size: 11px;
     margin-top: 2px;
}

.contact-item span {
    flex: 1;
    line-height: 1.4;
    text-align: start;
}

/* Sidebar Sections */
.sidebar-section {
    margin-top: 10px;
    line-height: 2.1;
}

.sidebar-title {
    font-size: 14pt;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.language {
    margin-bottom: 8px;
    color: #fff;
}

.language-name {
    font-size: 11pt;
    font-weight: 700;
    
    margin-bottom: 2px;
}

.language-level {
    font-size: 10pt;
    
    margin-bottom: 5px;
}

.language-desc {
    font-size: 8.5pt;
    line-height: 1.5;
    text-align: center;
}

/* Main Content */
.main-content {
    width: 68%;
    padding: 20px 20px 20px 10px;
    overflow: hidden;
    z-index: 999;
}

/* Header */
.header {
    margin-bottom: 48px;
    text-align: left;
   
}

.name {
    font-size: 16pt;
    font-weight: 300;
    color: #333;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    background: none !important;
}

.title {
    font-size: 13pt;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
    background: none !important;
}

.intro {
    font-size: 9pt;
    color: #000;
    text-align: justify;
    margin-bottom: 8px;
    line-height: 1.5;
    background: none !important;
}

.intro_pt2 {
    font-size: 9pt;
    color: #000;
    text-align: justify;
    margin-bottom: 8px;
    background: none !important;
    line-height: 1.5;
}

/* Sections */
.section {
    margin-bottom: 5px;
}

.section-title {
    font-size: 12pt;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(114, 114, 114, 0.2);
}

/* Timeline with vertical line */
.timeline {
    position: relative;
    padding-left: 15px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 15px;
    width: 2px;
    background: #000;
}

/* Entries (Education, Experience) */
.entry {
    margin-bottom: 7px;
    position: relative;
}

.entry::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
    z-index: 1;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.entry-title {
    font-size: 9.5pt;
    font-weight: 700;
    color: #000;
    flex: 1;
}

.entry-date {
    font-size: 9pt;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    text-align: right;
}

.entry-location {
    font-size: 8.8pt;
    color: #333;
    margin-bottom: 4px;
}

.entry-desc {
    font-size: 8.5pt;
    color: #000;
    line-height: 1.4;
    text-align: justify;
}

.entry-list {
    margin-left: 15px;
    font-size: 9pt;
    color: #444;
}

.skills{ 
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(6, 1fr);
    
}

.skills li { 
    text-align: center;
    list-style-type: none;
    font-weight: 600;
}



.entry-list li {
     line-height: 1.4;
     
}


/* Bold text styling */
strong {
    font-weight: 700;
}


.tips{ 
    position: absolute;
    bottom: 2%;
    font-size: 1rem;
    left: 2%;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.tips h1{ 
    font-weight: 300;
}
/* Theme color backgr */

.theme_panel {
    opacity: 0;
    transition: 0.4s ease-out;
    display: grid;
    align-items: center;
    justify-content: center;
    grid-template-rows: auto 1fr;
    font-size: 1.4rem;
    color: #fff;
    right: 6%;
    top: 5%;
    position: absolute;
    width: 19%;
    height: 15%;
    padding: 12px;
    background: rgba(0,0,0,0);
    border-radius: 10px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.theme_toggle {
    display: none; /* only shown on mobile — see the media query below */
}

.theme_title{
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-weight: 700;
    margin-bottom: 10%;
}

.themes_btn {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  align-items: center;
  gap: 12px;
}

.btn { 
    height: 30px;
    width: 30px;
    border-radius: 30px;
    border: 1px solid rgba(0,0,0,0.8);
}

.btn:hover{ 
    transform: scale(1.3);
    transition: 0.3s ease-out;
    cursor: pointer;
}

.burgundy{ 
    background: #740001;
    color: #fff;
}

.dark_blue{ 
    background: #001533;
    color: #fff;
}

.mauve{ 
    background: #660066;
    color:#fff;
}

.coffee{
    background: #854442;
    color:#fff;
}

.default{
    background: linear-gradient(90deg, #ffdcb4, #fff3e5);
    
}

.coral{
    background: rgba(251,46,1,0.9);
    color: #000;
}

.teal{
    background: #14B8A6;
    color: #000;
}

.rose{
    background: #b5966b;
    color: #000;
}

.gold{
    background: #ffc5d9;
    color:#000;
}

.slate{
    background: #feffde;
    color: #000;
}

/* Print styles for PDF export */
@media print {
   html, body{
        margin: 0;
        padding: 0;
        background: white;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .cv-container {
        min-height: auto;
        width: 210mm;
        height: 297mm;
        box-shadow: none;
    }

    .sidebar {
        align-self: flex-end;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .timeline::before,
    .entry::before {
        
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        size: A4;
        margin: 0;
    }
}

/* Screen display optimization */
@media screen {
    .cv-container {
        margin: 30px auto;
    }
}

/* Mobile: card is visually scaled to fit by three_card.js, but keep the
   overlay UI (hint text, hidden theme panel) from overflowing narrow screens */
@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    /* Without this, the un-transformed 210mm-wide card forces the mobile
       browser to widen its layout viewport to fit it, which zooms the whole
       page out. Capping the wrapper here keeps the viewport at device-width;
       three_card.js pulls .cv-container out of it once the scene mounts. */
    .cv-viewport {
        width: 100vw;
        max-width: 100vw;
        overflow: hidden;
        visibility: hidden;
    }

    .tips {
        font-size: 0.75rem;
        left: 4%;
        bottom: 3%;
    }

    .tips h1 {
        font-size: 0.85rem;
        font-weight: 400;
    }

    .theme_toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 3%;
        right: 4%;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(0,0,0,0.55);
        border: 1px solid rgba(255,255,255,0.4);
        font-size: 1.3rem;
        line-height: 1;
        z-index: 1001;
        touch-action: manipulation;
    }

    /* The card lives in a fixed-position 3D layer once mounted, which collapses
       the normal document flow — position:absolute (the desktop default) then
       measures against the wrong box. Anchor it to the viewport instead, level
       with the toggle button and just to its left, as a slim single-row bar
       rather than a big square card, so it stays out of the way of the CV
       underneath. */
    .theme_panel {
        position: fixed;
        display: flex;
        align-items: center;
        width: max-content;
        max-width: 80vw;
        height: auto;
        right: calc(4% + 42px + 8px); /* toggle button's offset + width + gap */
        top: 3%;
        z-index: 1000;
        background: rgba(19, 22, 37, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        padding: 8px 10px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
    }

    .theme_title {
        display: none; /* a nav-bar strip of swatches doesn't need a label */
    }

    .themes_btn {
        display: flex;
        flex-wrap: nowrap;
        gap: 5px;
    }

    .btn {
        width: 20px;
        height: 20px;
        flex: none;
    }
}
