/* custom variables for main colours */
:root {
    --turq-dark: #116466;
    --turq-darkest: #17252A;
    --turq-light: #3AAFA9; 
    --white-font: #FEFFFF;
    --header-height: clamp(56px, 7vh, 72px);
}

/* base reset for all HTML elements on the page eliminating the default browsers values */
* { 
    margin: 0;
    padding: 0;
}

/* override box sizing for all elements */
*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
    box-sizing: border-box;
    /* Set font size for easy rem calculations
    * default document font size = 16px, 1rem = 16px, 100% = 16px
    * (100% / 16px) * 10 = 62.5%, 1rem = 10px, 62.5% = 10px
    */
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* base styles */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--white-font);
    font-size: 1.8rem; /* 18px */
    background-color: var(--turq-light);
    font-weight: 400;
    line-height: 1.4;
}

h1,
h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  text-align: center;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 3rem;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}
  

/* Lightbox overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.lightbox-overlay.is-open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: min(95vw, 1200px);
    max-height: 90vh;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: var(--turq-darkest);
    color: var(--white-font);
    border: 1px solid var(--turq-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    cursor: pointer;
}

#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: var(--turq-darkest);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 0 rgba(33, 62, 54, 0.4);
    height: var(--header-height);
    padding-inline: 8px;
}

nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

#logo {
    height: var(--header-height);
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
}

nav li {
    margin: 0 10px;
    /* height: 100%; */
}

nav a {
    color: var(--white-font);
    text-decoration: none;
    display: block;
    font-size: 2rem;
    padding: 2rem 1rem;
}

nav a:hover {
    background-color: var(--turq-light);
}

nav a.active {
    box-shadow: inset 0 -3px 0 var(--turq-light);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: var(--turq-darkest);
    color: var(--white-font);
    border-radius: 6px;
}

#nav-toggle {
    display: none;
    background: transparent;
    color: var(--white-font);
    border: 1px solid var(--turq-light);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 2rem;
}

/* intro section */
#intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100svh - var(--header-height));
}

#intro h2 {
    padding-bottom: 5%;
}

#intro p {
    padding: 0 5%;
    max-width: 80%;
    font-size: 2rem;
    font-weight: 200;
    text-align: center;
    font-style: italic;
}

/* projects section */
#projects {
    text-align: center;
    padding: 10rem 2rem;
    background: var(--turq-dark);
}

#projects h2 {
    margin: 0 auto 6rem auto;
}

#projects .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-gap: 4rem;
    max-width: 1280px;
    width: 90vw;
    margin: 0 auto;
    margin-bottom: 6rem;
}

.project-card {
    background-color: var(--turq-darkest);
    padding: 5px;
    border-radius: 10px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card a {
    max-height: 15%;
    color: var(--white-font);
    text-decoration: none;
    font-size: 2rem;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.project-card a:hover {
    background-color: var(--turq-light);
}

.project-card a:hover .tag {
    color: var(--turq-light)
}

.tag {
    color: brown;
}

.project-card:active {
    z-index: 10;
}

.project-card[aria-disabled="true"] {
    opacity: 0.5;
    filter: grayscale(30%);
}

.project-card[aria-disabled="true"] .project-github-link {
    pointer-events: none;
    cursor: default;
}

.project-tech-stack {
    font-family: "Courier New", Courier, monospace;
    font-size: small;
    height: 15%;
    padding: 0.5rem 0;
}

.project-image {
    border-radius: 5px;
    border: 1px solid var(--turq-dark);
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.project-image:active:not(.tbd) {
    border: 0;
    transform: scale(1.5) translateX(20%);
    transition: transform 0.5s;
    overflow: visible;
}

/* focus styles */
a:focus-visible, button:focus-visible {
    outline: 3px solid #FEFFFF;
    outline-offset: 2px;
    border-radius: 4px;
}

#contacts {
    min-height: calc(100svh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#contacts h2 {
    padding-top: 8%;
}

#contacts a {
    color: var(--white-font);
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 5px;
}

#contacts p {
    max-width: 30%;
    margin: 0 auto;
}

#contacts p a:hover {
    background-color: var(--turq-dark);
    border-radius: 5px;
}

#email_image {
    width: clamp(140px, 20vw, 220px);
    height: auto;
    transition: transform 0.2s ease;
}

#email_image:hover {
    transform: scale(1.05);
}

footer {
    font-style: italic;
    text-align: center;
    padding: 2rem;
    border-top: 0.5px dashed var(--turq-dark);
}

main {
    padding-top: var(--header-height);
}

/* adjusting of the design for medium sized viewports */
@media (max-width: 768px) {
    #header {
        display: none;
    }

    #nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #site-nav {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        display: none;
        background: var(--turq-darkest);
        box-shadow: 0 2px 0 rgba(33, 62, 54, 0.4);
    }

    #site-nav.is-open {
        display: block;
    }

    nav ul {
        flex-direction: column;
    }

    nav a {
        padding: 1.2rem 2rem;
    }

    .project-image:active:not(.tbd) {
        overflow: visible;
        transform: scale(1.1);
        transition: transform 0.5s;
    }

    #contacts p {
        max-width: 50%;
    }
}

/* adjusting of the design for small sized viewports, e.g. mobiles */
@media (max-width: 500px) {

    .project-image:active:not(.tbd) {
        border: 1px solid var(--turq-dark);
        overflow: hidden;
        transform: none;
    }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}