/* global styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Karla', Tahoma, Geneva, Verdana, sans-serif;
}

/* #0c1014 #2b2b2b*/

:root {
    --primary-color: #06c;
    --text-color: #696969;
    --background-color: #fcfcfc;
    --card-color: #eee;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

hr {
    width: 1080px;
    margin: auto;
    opacity: 0.25;
    border-top: var(--primary-color) 1px solid;

    @media screen and (max-width: 1240px) {
        width: 90%;
    }
}

/* Light/dark mode toggle styling and link icon styling*/

.topBar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    z-index: 1000;

    @media screen and (max-width: 1240px) {
        position: relative;
    }
}

.lightDarkMode, .links {
    position: static; /* remove individual positioning, topBar handles it */
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

    i, a {
        color: var(--primary-color);
        text-decoration: none;
    }
}

.links, .footerLinks {
    display: flex;
    gap: 0.75rem;
    align-items: center;

    span {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.4em;
        font-weight: bold;
        color: var(--background-color);
        margin-top: 0.2em;
    }
}

.lightDarkMode { left: 1rem; }
.links { right: 1rem; }
.footerLinks { position: relative; margin-bottom: 1rem;}

/* Fade in animations */

@keyframes fadeInUp {
  0% {
    transform: translateY(100px) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
@keyframes fadeInUpFooter {
  0% {
    transform: translateY(100px) scaleY(0);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.contentWrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Intro section styling */

.intro {
    height: 100vh;
    width: 1080px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: 1s fadeInUp;

    p {
        font-size: 1.2rem;
    }
    
    @media screen and (max-width: 1240px) {
        width: 100%;
    }
    
    @media screen and (max-width: 768px) {
        flex-direction: column;
        align-items: center;
        gap: 5rem;
    }
}

.introText {
    width: 75%;
    
    padding-right: 0.8rem;
    h1 {
        font-size: 2.6rem;
        color: var(--primary-color);
    }
    
    @media screen and (max-width: 768px) {
        width: 100%;
        padding-right: 0;
        order: 2;
    }
}

.stackWrapper {
    display: flex;
    margin-top: 1rem;
    gap: 2rem;
    
}

.stackIconWrapper {
    display: flex;
}

.stackIcon {
    text-align: left;
    gap: 1rem;
    margin: 0.4rem 0rem;
    i {
        font-size: 2rem;
        color: var(--primary-color);
        text-align: left;
    }
}

.stackTooltip {
  visibility: hidden;
  background-color: var(--primary-color);
  color: #fcfcfc;
  text-align: center;
  border-radius: 6px;
  margin: 1rem;
  padding: 5px;
  position: absolute;
  z-index: 1;
}

.stackIcon:hover .stackTooltip {
  visibility: visible;
}

.introAvatar {
    width: 25%;
    img {
        display: block;
        width: 100%;
        border-radius: 100%;
        box-shadow: #bbb 5px 5px 15px;
    }
    
    @media screen and (max-width: 768px) {
        width: 40%;
        order: 1;
    }
}

/* Experience section styling */

.experience, .projects {
    min-height: 100vh;
    width: 1080px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    
    @media screen and (max-width: 1240px) {
        width: 100%;
    }
    
    p {
        font-size: 1.2rem;
    }
}

.expZigzag {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.expCard {
    width: 75%;
    background-color: var(--card-color);
    border-radius: 10px;
    padding: 1rem;
    padding-bottom: 0.5rem;
    animation: fadeInUp;
    animation-timeline: view(block 80% 0%);

    @media screen and (max-width: 1240px) {
        width: 100%;
    }

    ul {
    list-style-type: none;
    display: block;
    margin-left: 10px;
    }

    li:before {
    content: "- ";
    margin: 0 0 0 -10px;
    }

    li {
    margin-bottom: 0.5rem;
    }
}

.expCard:nth-child(even) {
    align-self: flex-end;
} /* This will align even-numbered cards to the right (flex-end), creating a zigzag pattern. */

.expCardTitle {
    display: flex;
    justify-content: space-between;

    h1 {
        font-size: 1.25rem;
    color: var(--primary-color);
    }
    
    @media screen and (max-width: 768px) {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.ulWrapper {
    display: none;
}

.expExpandArrow {
    width: 100%;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Projects section styling */

.projectGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;

    @media screen and (max-width: 600px) {
        grid-template-columns: 1fr;
    }
}

.projectCard {
    position: relative;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    animation: fadeInUp;
    animation-timeline: view(block 80% 0%);
}

.projectOverlay {
    position: absolute;
    inset: 0;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;

    h1 {
        font-size: 1.25rem;
        color: #fcfcfc;
    }

    a {
        color: #fcfcfc;
        text-decoration: underline;
    }

    i {
        color: #fcfcfc;
        margin-right: 0.5rem;
    }

    span {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 0.3rem;
    }
}

.projectCard:hover .projectOverlay {
    opacity: 1;
}

/* Projects carousel */

.carousel {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: fadeInUp;
    animation-timeline: view(block 80% 0%);
}

.carouselMain {
    width: 100%;
}

.carouselMain .projectCard {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.carouselStrip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #eee;
}

.carouselStrip::-webkit-scrollbar {
    height: 4px;
}

.carouselStrip::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 2px;
}

.carouselStrip::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.carouselThumb {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: pointer;

    @media screen and (max-width: 768px) {
        flex: 0 0 120px;
    }

    @media screen and (max-width: 480px) {
        flex: 0 0 90px;
    }
}

.carouselThumb video {
    max-width: 164px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.6;

    @media screen and (max-width: 768px) {
        max-width: 120px;
    }

    @media screen and (max-width: 480px) {
        max-width: 90px;
    }
}

.carouselThumb span {
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.carouselThumb:hover video,
.carouselThumb.active video {
    border-color: var(--primary-color);
    opacity: 1;
}

.carouselThumb.active span {
    color: var(--primary-color);
    font-weight: bold;
}

/* Projects highlight video — kept for legacy, now unused */

.projectHighlight {
    margin-top: 1rem;
}

.projectHighlight .projectCard {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.expExpandArrow i {
    transition: transform 0.25s ease-in-out;
}

.expCard .projectGrid {
    margin-bottom: 0.5rem;
}

/* Footer styling */

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem 1rem;
    margin-top: 5rem;
    background-color: var(--primary-color);
    color: #fcfcfc;
    animation: fadeInUpFooter;
    animation-timeline: view(block 100% 0%);

    h1 {
        margin-bottom: 2rem;
        font-size: 2.6rem;
    }

    .footerLinks {
        display: flex;
        gap: 1rem;
        font-size: 2rem;

        a {
            position: relative;
            color: #fcfcfc;
            text-decoration: none;
        }
        i {
                color: #fcfcfc;
        }
    }

    .footerContact {
        display: flex;
        gap: 2rem;
        font-size: 1rem;

        a {
            color: #fcfcfc;
            text-decoration: none;

            i {
                color: #fcfcfc;
                margin-right: 0.4rem;
            }
        }

        @media screen and (max-width: 600px) {
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
        }
    }

    .footerCopy {
        font-size: 0.85rem;
        opacity: 0.5;
    }
}