/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font: var(--font-paragraph3);
    background-color: var(--color1);
    color: var(--content-color);
}


h1 {
    font: var(--font-heading1);
}

h2 {
    font: var(--font-heading2);
}

h3 {
    font: var(--font-heading3);
}

h6 {
    font: var(--font-heading6);
}

.paragraph1 {
    font: var(--font-paragraph1);
}

.paragraph2 {
    font: var(--font-paragraph2);
}

.paragraph3 {
    font: var(--font-paragraph3);
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

ul {
    list-style-type: disc;
    /* Može biti i circle, square, etc. */
    list-style-position: inside;
    /* Pomera tačku unutra, poravnatu sa tekstom */
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font: var(--font-paragraph2);
    color: var(--content-color);
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}


header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 91px;
    /* Podesiti visinu ako je potrebno */
    z-index: 1000;
    /* Osigurava da se nalazi preko ostalih elementa */
    /*box-shadow: 0 1px 2px rgb(63, 63, 63);*/
    /*border-bottom: 1px solid rgb(218, 218, 218);*/
    background-color: var(--background-color-header);
}

.header-container {
    width: 100%;
    height: 90px;
    align-content: center;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    background-color: var(--color1);
}

.header-stack {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 4.5%;
}

.header-stack2 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-right: 5%;

}

footer {
    padding-top: 15px;
    height: 90px;
}

.font_7 {
    text-wrap: fixed;
    color: var(--content-color);
    width: 130px;
}

/* Zajednički stilovi */

.button-svg,
.button-svga,
.button-svgb {
    transition: all 0.2s ease;
}

.button-svg,
.button-svga {
    transform: rotate(180deg);
}

/* Specifični stilovi za svg elemente */

.button-svg {
    fill: var(--content-color);
}

.button-svga {
    fill: var(--color1);
}

.button-svgb {
    fill: var(--content-color);
}

/* Zajednički stilovi za različite klase */

.font_8,
.font_8a,
.font_8b {
    color: var(--content-color);
    border: 1px solid var(--content-color);
    padding: 10px 10px;
    transition: all 0.2s ease;
}

/* Specifični stilovi za različite klase */
.font_8 {
    color: var(--content-color);
}

.font_8:hover {
    background-color: var(--active-color);
    color: var(--background-color);
    border: 1px solid var(--active-color);
}

.font_8:hover svg {
    fill: var(--background-color);
    transform: rotate(270deg);
}

.font_8a {
    color: var(--color1);
    background-color: var(--active-color);
    border: 1px solid var(--active-color);
}

.font_8a:hover {
    background-color: var(--content-color);
    color: var(--color1);
    border: 1px solid var(--content-color);
}

.font_8a:hover svg {
    fill: var(--color1);
    transform: rotate(270deg);
}

.font_8b {
    color: var(--content-color);
    border: 1px solid var(--content-color);
}

.font_8b:hover {
    background-color: var(--content-color);
    color: var(--color1);
    border: 1px solid var(--content-color);
}

.font_8b:hover svg {
    fill: var(--color1);
}

.font_section {
    /* Section */
    color: var(--content-color);
    text-wrap: fixed;
    white-space: nowrap;
    padding-top: 10%;
}

.font_title {
    /* Title */
    color: var(--content-color);
    text-wrap: fixed;
    white-space: nowrap;
    padding-top: 10%;
}


.font_description {
    /* Description */
    color: var(--content-color);
}

#test {
    text-align: start;
    margin-right: 1.5%;
}


footer {
    background-color: var(--color1);
    text-align: center;
}

header h1,
footer p {
    margin: 0;
}

.title {
    position: sticky;
    top: 91px;
    align-self: start;
}

.content {
    overflow-y: auto;
    /*max-height: 80vh;*/
    padding-right: 20px;
}

.section-hero {
    margin-top: 91px;
    width: 100%;
    height: 70vh;
    display: grid;
    grid-template-columns: 300px 2fr 2fr;
    grid-template-rows: auto;
    padding: 6% 0 8% 4%;
    position: relative;
}

.container-hero {
    width: 100vh;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    gap: 20px;
    padding: 7% 0 0 5%;

}

.circle {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 50%;
    margin: 50% 0 0 5%;
}

.circle img {
    width: 100%;
    height: 110%;
    object-fit: cover;
}


.section-about {
    /*margin-top: 91px;*/
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto;
    padding: 0 0 8% 4%;
    position: relative;
}

.container-about {
    width: 70%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 20px;
    padding: 7% 0 0 5%;

}

.section-skills {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto;
    padding: 0 0 8% 4%;
}

.container-skills {
    width: 70%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 20px;
    padding: 7% 0 0 5%;

}

.section-projects {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 0 0 8% 4%;
}

.container-projects {
    width: 100%;
    max-width: 1600px;
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: start;
    gap: 20px;
    gap: 5%;
    /*padding: 7% 0 0 5%;*/
    padding-top: 7%;
    padding-left: 5%;

}

.section-contact {
    width: 100%;
    height: 50vh;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto;
    padding: 5% 0 4% 4%;
}

.container-contact {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 25%;
}

.section-email {
    width: 100%;
}


.card-container {
    display: flex;
    direction: column;
    justify-content: space-between;
    flex-wrap: wrap;
}

.card {
    position: relative;
    width: 30%;
    /*  height: 450px;*/
    aspect-ratio: 1/1;
    background-color: var(--active-color);
    color: var(--background-color);
    display: flex;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    transition: transform 0.1s linear;
    perspective: 1000px;
    padding-left: 20px;
      
}

.card-caption {
    position: absolute;
    top: 40%;
    font: var(--font-paragraph1);
    padding-left: 20px;
    padding-right: 20px;
    word-wrap: break-word;
}

.card-content {
    position: absolute;
    top: 60%;
    padding-left: 20px;
    padding-right: 20px;
}

.card-button {
    position: absolute;
    bottom: 10%;
    margin-left: 20px;
    padding-right: 20px;
}

.card-button:hover {
    transform: scale(1.1);
    border-bottom: var(--background-color) 1px solid;
}



#section-certifications {
    display: none;
    /* Ako hocu da se i ova sekcija prikazuje treba da obrisem gornji red*/
}

.rotate-svg {
    animation: rotate 3s infinite linear;
    transform-origin: center center;
    position: relative;   /* neophodno! */
    z-index: 1;           /* mora biti manje od header z-index-a */
}

@keyframes rotate {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    text-decoration: none;

    animation: scrollText 20s linear infinite;
}

.scrolling-text::after {
    content: " " attr(data-text);
    /* Dodaje duplikat teksta */
    padding-left: 150px;
    /* Razmak između rečenica */
}

@keyframes scrollText {
    from {
        transform: translateX(0%);
    }

    to {
        transform: translateX(-50%);
    }
}

.scrolling-text:hover {
    animation-play-state: paused;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .container-projects {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 20px;
        padding: 0 10px;
    }

    .card {
        width: calc(50% - 20px);
        /* dve kartice po redu */
        max-width: 400px;
        padding: 40px 15px 15px;
        /* manje unutrašnjih razmaka */
    }

    .card svg {
        top: 15px !important;
        width: 50px !important;
        height: 50px !important;
    }

    .card-caption {
        font-size: 1rem;
        /* smanji font */
        padding-top: 10px;
    }

    .card-content {
        font-size: 0.9rem;
        /* smanji font */
        line-height: 1.4em;
    }

    .card-button {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .section-about,
    .section-skills,
    .section-contact,
    .section-work-experience {
      display: grid;
      grid-template-columns: 220px 1fr; /* Fiksna širina za naslove */
      column-gap: 30px;
      align-items: start;
      padding: 30px 10px;
    }
  
    .section-about h2,
    .section-skills h2,
    .section-contact h2,
    .section-work-experience h2 {
      text-align: left;
      margin: 0;
    }
  
    .section-about h3,
    .section-skills h3,
    .section-contact h3,
    .section-work-experience h3 {
      text-align: left;
      margin-top: 0;
    }
  
    /* SVG ikonica da ide uz naslov, poravnata s njim */
    .section-skills svg,
    .section-work-experience svg {
      margin-left: 0;
    }


}


@media (max-width: 768px) {

    #test2 {
        display: none !important;
    }

    #test3 {
        flex-direction: column !important;
    }


    /* Hero sekcija prelazi u jednu kolonu */
    .section-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        height: auto;
        text-align: center;
    }

    /* Ovaj deo dodatno osigurava da naslovi zauzimaju punu širinu i centriraju tekst */
    .section-hero h3,
    .section-hero h2 {
        width: 100%;
        text-align: center !important;
        margin: 10px 0;
    }

    .circle {
        width: 60%;
        margin: 0 auto 20px;
    }

    .container-hero {
        width: 100%;
        text-align: center;
        padding: 0 10px;
    }

    /* Blok sa dugmadima: jedan pored drugog, centrirano */
    .container-hero>div {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px;
        width: 100%;
        margin-top: 20px;
    }

    /* Očuvaj padding unutar samih dugmadi */
    .font_8a,
    .font_8b {
        padding: 10px 20px;
    }

    /* Sekcije About / Skills / Projects itd. */
    .section-about,
    .section-skills,
    .section-projects,
    .section-contact {
        padding: 20px 10px;
    }

    .section-about>div:first-child,
    .section-skills>div:first-child,
    .section-projects>div:first-child,
    .section-contact>div:first-child {
        text-align: center;
    }

    .container-about,
    .container-skills,
    .container-projects,
    .container-contact {
        width: 100%;
        max-width: none;
        padding: 0;
    }


    

    /* Kartice u jednoj koloni */
    .card-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        max-width: none;
        transform: none !important;
        z-index: auto;
    }

    /* Footer i naslov */
    .title {
        top: auto;
        position: static;
        margin-bottom: 15px;
    }

    .content {
        padding-right: 0;
    }

    /* Premesti .title iz grid/flex reda i postavi ga iznad content-a */
    .section-about,
    .section-skills,
    .section-projects,
    .section-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* centriraj sve */
    }

    /* .title je prvi element (sekcije), pa ga ne diramo u DOM-u,
     ali možemo da resetujemo pozicioniranje i marginu */
    .title {
        position: static;
        top: auto;
        margin-bottom: 15px;
        /* razmak ispod naslova */
        text-align: center;
        width: 100%;
    }

    /* Sadržaj sekcije sledi odmah ispod */
    .content {
        width: 100%;
        padding: 0 10px;
    }

    /* Projekti: stavimo kartice jednu ispod druge */
    .section-projects {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
    }

    /* Naslov sekcije iznad je već .title, centriran */
    .section-projects>div:first-child {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }

    .container-projects {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
        gap: 20px;
    }

    .card {
        position: relative;
        width: 90%;
        max-width: 350px;
        padding: 60px 20px 20px;
        /* ostavi prostora za SVG */
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        margin: 0 auto;
        /* centriraj celu karticu */
    }

    .card svg {
        position: absolute;
        top: 20px;
        inset-inline-start: 0;
        /* levo = 0 */
        inset-inline-end: 0;
        /* desno = 0 */
        margin-inline: auto;
        /* centriraj unutar tog prostora */
        width: 50px;
        height: 50px;
        padding: 0;
    }

    .card-caption,
    .card-content,
    .card-button {
        text-align: center;
        /* centriraj tekst */
        margin: 10px 0;
        /* ne specificiramo width — koristi prirodnu širinu i centriranje */
    }

    .card-button {
        display: inline-block;
        padding: 8px 16px;
        border-radius: 4px;
        background-color: var(--active-color);
        color: var(--background-color);
        transition: transform .2s;
    }

    .card-button:hover {
        transform: scale(1.05);
    }

    /* Sekcija u kolonu */
    .section-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
    }

    /* Naslov + SVG */
    #comp-m21wvkwg1 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 20px;
    }

    /* Wrapper koji sadrži info + dugmad */
    .container-contact>div:nth-child(2) {
        display: flex !important;
        flex-direction: column !important;
        /* prvo info, pa dugmad */
        align-items: center !important;
        gap: 20px !important;
        width: 100%;
        text-align: center;
    }

    /* Kontakt infomacije (prvi unutrašnji div) */
    .container-contact>div:nth-child(2)>div:first-child {
        /* automatika izbločka, centrirani tekst */
        display: block !important;
    }

    .container-contact>div:nth-child(2)>div:first-child p,
    .container-contact>div:nth-child(2)>div:first-child a {
        /*display: block;*/
        margin: 5px 0;
        color: var(--content-color);
    }

    .container-contact>div:nth-child(2)>div:first-child a {
        color: var(--content-color);
    }

    /* Dugmad (drugi unutrašnji div) */
    .container-contact>div:nth-child(2)>div:last-child {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100%;
    }

    .container-contact>div:nth-child(2)>div:last-child .font_8 {
        padding: 8px 12px;
        min-width: auto;
    }

    .rotate-svg {
        animation: none;
        transform: none;
    }


}



:root {
    /* Paleta boja */
    --color1: #222222;
    --background-color: #2c2c2c;
    --background-color-header: #3f3f3f;
    --color4: #828282;
    --content-color: #e2e2e2;
    --active-color: #00FFA3;
    --transparent: transparent;

    /* Fontovi */
    --font-heading1: normal 400 148px/1.2em "Azeret Mono", serif;
    /* scale text */
    --font-heading2: normal 700 59px/1.3em "Azeret Mono", serif;
    /* scale text */
    --font-heading3: normal 700 32px/1.3em "Azeret Mono", serif;
    /* no scale text */
    --font-heading4: normal 700 30px/1.3em "Azeret Mono", serif;
    /* no scale text */
    --font-heading5: normal 400 23px/1.3em "Azeret Mono", serif;
    /* scale text */
    --font-heading6: normal 900 16px/1.4em "Azeret Mono", serif;
    /* no scale text */
    --font-paragraph1: normal 700 18px/1.6em "Azeret Mono", serif;
    /* no scale text */
    --font-paragraph2: normal 400 16px/1.6em "Azeret Mono", serif;
    /* no scale text */
    --font-paragraph3: normal 400 14px/1.6em "Azeret Mono", serif;
    /* no scale text */
}

/* Tablet (769px – 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --font-heading1: normal 400 120px/1.2em "Azeret Mono", serif;
        --font-heading2: normal 700 48px/1.3em "Azeret Mono", serif;
        --font-heading3: normal 700 28px/1.3em "Azeret Mono", serif;
        --font-heading4: normal 700 26px/1.3em "Azeret Mono", serif;
        --font-heading5: normal 400 20px/1.3em "Azeret Mono", serif;
        --font-heading6: normal 900 14px/1.4em "Azeret Mono", serif;
        --font-paragraph1: normal 700 16px/1.6em "Azeret Mono", serif;
        --font-paragraph2: normal 400 14px/1.6em "Azeret Mono", serif;
        --font-paragraph3: normal 400 12px/1.6em "Azeret Mono", serif;
    }
}

/* Mobilni (≤768px) */
@media (max-width: 768px) {
    :root {
        --font-heading1: normal 400 90px/1.2em "Azeret Mono", serif;
        --font-heading2: normal 700 36px/1.3em "Azeret Mono", serif;
        --font-heading3: normal 700 24px/1.3em "Azeret Mono", serif;
        --font-heading4: normal 700 22px/1.3em "Azeret Mono", serif;
        --font-heading5: normal 400 18px/1.3em "Azeret Mono", serif;
        --font-heading6: normal 900 14px/1.4em "Azeret Mono", serif;
        --font-paragraph1: normal 700 16px/1.6em "Azeret Mono", serif;
        --font-paragraph2: normal 400 14px/1.6em "Azeret Mono", serif;
        --font-paragraph3: normal 400 12px/1.6em "Azeret Mono", serif;
    }
}