/* margin - for the outer borders
padding - for the inner */

/* global variables */

:root{
    /* light theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-main: #444444;
    --text-titles: #1a1a1a;
    --accent-sage: rgb(117, 176, 117);
    --bio-bg: #2c3e50;
    --bio-text: #ecf0f1;
    --card-border: #2c3e50;
    --pic-border: white;
    --upper-buttons: #505658;
}

*{
    box-sizing: border-box;
}

.foo{
    text-align: center;
    margin: 0;
    padding-top: 20px;
}

.description{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 150px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 80px auto;
    margin-bottom: 200px;
    padding: 0 20px;
}

.pic-container{
    display: flex;
    justify-content: center; /* centers the image */
    align-items: center;
}


.myPic2{
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    border: 1px solid #ddd;
    padding: 5px;
    background-color: var(--pic-border);
}


.bio-container{
    background-color: var(--bio-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 40px;
    text-align: left;
}

.bio-title{
    font-family: 'Lora', serif;
    font-size: 32px;
    color: var(--bio-text);
    margin-top: 0;
    margin-bottom: 5px;
    border-bottom: 2px solid var(--accent-sage);
    display: inline-block;
    padding-bottom: 5px;
}

.bio-text{
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--bio-text);
    margin-bottom: 30px;
}

.reader{
    border-bottom: 1px dashed rgb(117, 176, 117);
    padding-bottom: 3px;
    cursor: help;
    position: relative;
}

.book{
    visibility: hidden;
    position: absolute;
    background-color: white;
    width: 400%;
    height: auto;
    color: black;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 6px;
    z-index: 10;/* it will be shown on top of the text */
    transition: opacity 0.3s ease, top 0.3s ease;
}


.reader:hover .book{
    visibility: visible;
    opacity: 1;
    top: 140%;
}

.contact-button {
    text-decoration: none;
    color: var(--accent-sage);
    background-color: transparent;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid var(--accent-sage);
    border-radius: 20px;
    padding: 10px;
    transition: color 0.3s;
    cursor: pointer;
}

.contact-button:hover {
    color: #ecf0f1;
    border-color: #ecf0f1;
}

.cv-button {
    text-decoration: none;
    color: rgb(176, 117, 118);
    background-color: transparent;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid rgb(176, 117, 121);
    border-radius: 20px;
    padding: 10px 15px;
    margin-left: 30px;
    transition: color 0.3s;
    cursor: pointer;
}

.cv-button:hover {
    color: #ecf0f1;
    border-color: #ecf0f1;
}

.grid{
    display: grid;
    grid-template-columns: 1fr 1fr; /* fr - fraction unit, stands for the width taken by one column */
    gap: 100px;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 60px;
}

.card{
    background-color: var(--bg-secondary);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* x = 0 - the shadow is behind the card
       y = 4 - the shadow looks 4px down
       15px - how blurred the shadow is */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* transform - function that describes what happens on hover
       0.3s - duration
       ease - slow in the beginning and in the end */
    border-left: 5px solid var(--card-border);
}

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

.title{
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
    /* margin-bottom: 25px;
    text-align: center;
    color: #222;
    text-decoration: none;
    border-bottom: 2px solid #ddd;
    display: inline-block;/* block and line, makes the bottom border length be the same as the text itself */ 
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.title::after{
    content: "";
    display: block;
    width: 100px;
    height: 2px;
    background-color: #ddd;
    margin: 5px auto 0;
}

.card h3{
    margin: 0 0 5px 0;
    font-size: 20px;
    color: var(--text-titles);
}

.role{
    font-weight: bold;
    color: var(--card-text-dim, #555);
    margin: 0 0 10px 0;
}

.desc{
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
}

.date{
    display: block;
    font-size: 13px;
    color: var(--card-text-dim, #888);
    margin-bottom: 5px;
    font-style: italic;
}

h3{
    font-size: 25px;
}

h1, h2, h3{
    font-family:  sans-serif;
    color: var(--text-titles);
    margin-top: 0;
}

h1{
    font-family: 'Lora', serif;
    font-weight: bold;
    text-align: center;
    font-size: 55px;
    margin-bottom: 60px;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-top: 20px;
}

h2{
    font-family: 'Lora', serif;
}

.info{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    margin-left: 25px;
}

.img_text{
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 25px;
}

.picture{
    width: 40px;
    height: auto;
    margin-left: 5px;
}

.badge{
    border-radius: 15px;
    padding: 5px 10px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #555;
    margin: 0 0 10px 0;
}

.badge.intermediate{
    background-color: #e8f5e9;
}

.badge.beginner{
    background-color: #f3e5f5;
}

.badge.advanced{
    background-color: #e3f2fd;
}

.contact-title{
    font-size: 28px;
    font-family: 'Lora', serif;
    color: #fff;
    /* border-bottom: 2px solid rgb(117, 176, 117);
    /* ensures the line is only under the title? */ 
    display: inline-block;
    text-align: center;
    position: relative;
    padding-top: 30px;
    padding-bottom: 5px;
    left: 50%;
    transform: translateX(-55%);
}

.contact-title::after{
    content: "";
    display: block;
    width: 100px;
    height: 2px;
    background-color: rgb(117, 176, 117);
    margin: 5px auto 0;
}

.contact-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    margin: 0 auto;
    padding: 20px 20px;
    max-width: 800px;
    gap: 20px
}

.contact-column{
    display: flex;
    flex-direction: column;/* vertical placement */
    gap: 20px;
}


.left-align{
    align-items: flex-end; 
    padding-right: 50px; 
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.right-align{
    align-items: flex-start; 
    padding-left: 40px;
}

.contact-item{
    display: flex;
    align-items: center;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.contact-item:hover{
    color: rgb(117, 176, 117);
}

.footer-icon{
    width: 24px;
    height: 24px;
    margin-right: 15px;
}

.copyright{
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 30px;
    padding-bottom: 10px;
}

/* decorations and stuff */

body{
    background-color: var(--bg-primary);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;/* distance between lines */
    margin: 0;
    padding: 0;
}

.dark{
    background-color: #2c3e50;
}



.divider{
    height: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 50px 0px;
    /* top-bottom, left-right */
}

.cube{
    width: 15px;
    height: 15px;
    background-color: #333;
    rotate: 45deg;
    margin: 0px 20px
}

.divider::before,
.divider::after{
    content: "";
    flex: 1; /* spreads the line left and right */
    /* border-bottom: 2px solid #333; */
    max-width: 500px
}

.imperial-script-regular {
  font-family: "Imperial Script", cursive;
  font-weight: 400;
  font-style: normal;
}

.ending{
    text-align: center;
    font-family: "Imperial Script", cursive;
    font-size: 50px;
    margin: 0;
    padding-bottom: 50px;
}


/* below the lang-menu script */

.dropbtn{
    background-color: transparent;
    color: var(--upper-buttons);
    cursor: pointer; /* makes finger when pointed at it */
    padding: 10px 15px;
    border: none;
    font-size: 17px;
    display: inline-flex;
    align-items: center; /* these two put image and text on the same lvl */
}

 .dropbtn:hover, .dropbtn:focus {
    text-decoration: underline;
} 

.dropbtn::before{ /* arrow up/down */
    content: ' ';
    display: inline-block; 
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--upper-buttons);
    border-bottom: 2px solid var(--upper-buttons);
    transform: rotate(45deg);
    margin-right: 8px;
}

.dropbtn.active::before{
    transform: rotate(225deg);
}

.menu-content{
    display: none; /* ensures it will be hidden unless clicked */
    background-color: var(--menu-bg, rgb(233, 236, 239));
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    min-width: 135px;
    position: absolute;
    margin-left: 13px;
}

.menu-content a{
    color: var(--upper-buttons);
    display: block;
    text-decoration: none;
    font-size: 17px;
    padding-left: 20px;
    min-width: 135px;
}

.lang_menu a:hover{
    background-color: rgb(133, 170, 235);
    text-decoration: underline;
}

.lang_menu{
    position: absolute;
    display: inline-block;
    right: 100px;
    top: 15px;
    z-index: 1000;
}

.show {
    display: block;
}

.menuPic{
    margin-right: 5px;

    width: 25px;
    height: auto;
}

.topBtn{
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99; /* z index defines whether an element will be on or under other elements */
    border: none;
    background-color: rgb(140, 202, 140);
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.topBtnArrow{
    content: ' ';
    display: inline-block; /* ??? */
    width: 8px;
    height: 8px;
    border-right: 2px solid #505658;
    border-bottom: 2px solid #505658;
    transform: rotate(225deg);
    margin-top: 7px;
}

.topBtn:hover{
    background-color: rgb(117, 176, 117);
}

/* object animations */
.hidden{
    opacity: 0.2;
    transform: translateY(30px);
    transition: all 0.5s ease-out;
    pointer-events: none;/* blocks are non-interactive while hidden */
}

.shown{
    opacity: 1;
    transform: translateY(0px);
    pointer-events: all;
}

/* Base Toggle Background (Dark Mode) */
.lightDark {
    color: var(--upper-buttons);
    position: absolute;
    display: inline-block;
    left: 100px;
    top: 20px;
    z-index: 1000;
    
    width: 80px;
    height: 40px;

    border-radius: 220px;
    border: 1px solid var(--upper-buttons);
    cursor: pointer;
    transition: all 0.5s ease;
}

/* The Moving Circle */
.item {
    position: absolute;
    left: 6px;
    top: 7px;

    width: 24px;
    height: 24px;

    /* border: 1px solid #color - essential for the borderline being seen */
    border-radius: 50%;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG Icon Styling */
.icon {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: all 0.5s ease;
}

.moon { opacity: 1; color: var(--upper-buttons); transform: scale(1); }
.sun { opacity: 0; color: var(--upper-buttons); transform: scale(0.5) rotate(-45deg); }

/* --- ACTIVE STATE (Light Mode) --- */


/* Circle moves to the right and turns light */
.active .item {
    left: 52px;
}

/* Swap icons based on the global .active class */
.active .moon { 
    opacity: 0; 
    transform: scale(0.5) rotate(45deg); 
}

.active .sun { 
    opacity: 1; 
    color: #f8f9fa; 
    transform: scale(1) rotate(0); 
}

/* Apply Dark Mode Variables globally */
.active {
    --bg-primary: #2c3e50;
    --bg-secondary: #39516d;
    --text-main: #d1d5da;
    --text-titles: #ffffff;
    --accent-sage: #8fce8f;
    --bio-bg: #111a22;
    --bio-text: #ecf0f1;
    --card-border: var(--accent-sage);
    --pic-border: var(--bio-bg);
    --upper-buttons: #f8f9fa;
    --card-text-dim: #b0c4de; 
    --menu-bg: #39516d;
}

body.active .dark{
    background-color: #111a22;
}

body.active .myPic2 {
    border-color: #62798e;
}

.active .badge.intermediate {
    background-color: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.active .badge.beginner {
    background-color: rgba(156, 39, 176, 0.2); 
    color: #ba68c8; 
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.active .badge.advanced {
    background-color: rgba(33, 150, 243, 0.2); 
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.no-transition * {
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}


/* mobile */

@media (max-width: 768px) {
    .grid{
        grid-template-columns: 1fr;
    }
    .description{
        grid-template-columns: 1fr;
    }
    .book{
        left:100%
    }
    .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .left-align, .right-align {
        align-items: center; /* Center everything */
        border: none;
        padding: 0;
    }

     .contact-title{
        left: 55%;
    }

    .topBtn{
        margin-right: 0px;
    }

    .description{
        gap: 80px;
    }

    .lang_menu{
        position: relative;
        align-items: center;
        right: 0;
        top: 0;
    }

    .menu-content{
        margin-left: -5px;
        box-shadow: none;
    }
    
    .dropbtn{
        padding-left: 0;
    }

    header{
        text-align: center;
        margin-bottom: 60px;
    }    /**/

    h1{
        margin-top: 0;
        margin-bottom: 40px;
    }

    .buttons {
        display: flex;
        flex-direction: column;
        align-items:start;
    }

    .cv-button {
        margin-top: 10px;
        margin-left: 0;
    }

    .lightDark {
        position: relative;
        align-items: center;
        left: 0;
    }


}


/*  *{
    outline: 1px solid red;
}   */
