@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
*{
    font-family: "Lato", serif;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a855f7;
  outline-offset: 2px;
}

*:focus {
  outline: none;
}

html {
    scroll-behavior: smooth;
}

:root {
    --color-bg: #ffffff;
    --color-text: #242424;
    --color-primary: #6030b1;
    --color-primary-hover: #5d3eff;
    --color-section-alt: #f8f8f8;
    --color-footer-bg: #242424;
    --color-footer-text: #ffffff;
    --toggle-bg: rgba(0, 0, 0, 0.06);
    --toggle-color: #242424;
}

html.dark {
    --color-bg: #0b0b0c;
    --color-text: #e9e9ea;
    --color-primary: #9a7cff;
    --color-primary-hover: #b39bff;
    --color-section-alt: #0f0f10;
    --color-footer-bg: #050506;
    --color-footer-text: #ddd;
    --toggle-bg: rgba(255, 255, 255, 0.06);
    --toggle-color: #f1f1f1;
}

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

h1, h2, h3, h4, h5, h6, span {
    color: var(--color-text);
    text-align: center;
    line-height: 1.25;
}

h1 {
    font-size: 36px;
}

p {
    list-style: 1.5;
    font-size: 16px;
}

a {
   text-decoration: none;
   position: relative;
   transition: opacity 300ms ease;
}

i:hover {
    opacity: 0.7;
}

.link__hover-effect:after {
    content: "";
    position: absolute;
    height: 3px;
    width: 0;
    bottom: -3px;
    right: 0;
    transition: all 300ms ease;
}

.link__hover-effect--white:after {
    background-color: #fff;
}

.link__hover-effect--black:after {
    background-color: #000;
}

.link__hover-effect:hover:after {
    width: 100%;
    left: 0;
}

li {
    list-style-type: none;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.container {
    padding: 50px 0;
}

.row {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 12px;
}

.text--purple {
    color: var(--color-primary);
}

section:nth-child(even) {
    background-color: var(--color-section-alt);
} 

.section__title {
    margin-bottom: 20px;
}

/* NAVIGATION BAR */

nav {
    height: 100px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
}

.nav__link--list {
    display: flex;
}

.nav__link--anchor {
    margin: 0 12px;
    color: var(--color-text);
    font-weight: 700;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav__link--anchor-primary {
    background-color: var(--color-primary);
    padding: 8px 20px;
    border-radius: 50px;
    color: white;
    transition: all 300ms ease;
}

.nav__link--anchor-primary:hover {
    background-color: var(--color-primary-hover);
} 

.personal__logo {
    font-size: 24px;
    color: var(--color-primary);
    margin: 0 12px;
    font-weight: bold;
}

/* Theme toggle styles */
.theme-toggle {
    background: var(--toggle-bg);
    color: var(--toggle-color);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 12px;
    transition: background 200ms, color 200ms, transform 120ms;
}

.theme-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.theme-toggle:hover {
    transform: translateY(-2px);
}

/* Contact modal styles */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal[aria-hidden="false"] {
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.modal__content {
    position: relative;
    background: var(--color-bg);
    color: var(--color-text);
    max-width: 520px;
    width: calc(100% - 32px);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 2;
}

.modal__close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
}

#contact-form label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    background: transparent;
    color: var(--color-text);
    margin-top: 6px;
    box-sizing: border-box;
}

#contact-form textarea { resize: vertical; }

.form__errors { color: #c72c41; margin-bottom: 12px; }

.form__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }

/* Disabled primary button in forms */
.nav__link--anchor-primary[disabled],
.nav__link--anchor-primary[aria-disabled="true"] {
    opacity: 0.56;
    cursor: not-allowed;
    pointer-events: none;
}

/* Maintain layout while disabled */
.nav__link--anchor-primary[disabled] {
    filter: none;
}

@media (max-width: 480px) {
    .modal__content { padding: 18px; }
    .form__actions { justify-content: center; flex-wrap: wrap; }
}

/* ABOUT ME */

#about-me {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.about-me__info {
    display: flex;
    flex-direction: column;
}

.about-me__info--container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    animation: fade-in 900ms 200ms backwards;
}

.about-me__picture--mask {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
    margin-bottom: 28px;
    animation: animate-profile-picture 800ms 200ms backwards;
}

@keyframes animate-profile-picture {
    0% {
        transform: scale(0);
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.about-me__picture {
    width: 100%;

    /* Improving my own picture */
    transform: scale(1.5);
    padding-top: 8px;
}

.about-me__info--title {
    margin-bottom: 16px;
    animation: fade-up 650ms 400ms backwards;
}

.about-me__info--para {
    font-size: 20px;
    margin-bottom: 28px;
    animation: fade-up 650ms 400ms backwards;
}

.about-me__link {
    font-size: 20px;
    color: var(--color-text);
    padding: 0 16px;
}

.about-me__links {
    animation: fade-up 650ms 800ms backwards;
}

@keyframes fade-up {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-me__image--container {
    flex: 1;
    display: flex;
    align-items: center;
}

.about-me__image--container img {
  padding-top: 24px;
}

.about-me__img {
    width: 100%;
    animation: fade-in 1200ms 800ms backwards;
    padding-top: 28px;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
  .about-me__info--container,
  .about-me__img,
  .about-me__picture--mask,
  .about-me__info--title,
  .about-me__info--para {
    animation: none !important;
  }
}

.wave {
    display: inline-block;
    animation: animate-wave 500ms infinite ease-in-out;
}

@keyframes animate-wave {
    0% {
        transform: rotate(0);
    }
    50% {
        transform: rotate(30deg);
    }
    100% {
        transform: rotate(0);
    }
}

/* Tech Stack */

.language__img {
    width: 100%;
    max-width: 100px;
    transition: all 300ms;
}

.language:hover .language__img {
    filter: brightness(80%);
    opacity: 0.86;
    transform: scale(0.9);
}

.language {
    width: 25%;
    display: flex;
    justify-content: center;
    position: relative;
}

.language__img--wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 16px;
}

.language__list {
    display: flex;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.language__name {
    position: absolute;
    bottom: 0;
    transform: scale(0);
    transition: all 300ms;
    font-size: 20px;
    opacity: 0;
}

.language:hover .language__name {
    transform: scale(1);
    opacity: 1;
}

/* PROJECTS */

.project {
    margin-bottom: 135px;
}

.project:last-child {
    margin-bottom: 40px;
}

.project__img {
    width: 100%;
    transition: all 500ms ease;
}

.project__wrapper {
    display: flex;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.project__wrapper:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #1c1d25;
    opacity: 0;
    transition: opacity 450ms ease;
    z-index: 2;
}

.project:hover .project__wrapper:before {
    opacity: 0.7;
}

.project:hover .project__img {
    transform: scale(1.07);
    filter: blur(5px);
}

.project:hover .project__discription {
    opacity: 1;
    transform: translateY(-50%);
}


.project__list {
    padding-top: 40px;
}

.project__discription {
    position: absolute;
    top: 50%;
    left: 90px;
    transform: translateY(100%);
    max-width: 550px;
    z-index: 3;
    opacity: 0;
    transition: transform 450m, opacity 300ms;
}

.project__discription--title {
    font-size: 40px;
}

.project__discription--para {
    margin: 16px 0;
}

.project__discription--link {
    font-size: 20px;
    margin-right: 16px;
}

.project__discription--title,
.project__discription--sub-title,
.project__discription--para,
.project__discription--link {
    text-align: left;
    color: #fff;
}

/* FOOTER */

footer {
    background-color: var(--color-footer-bg);
} 

.footer__social--list {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 28px;
}

.footer__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8% 0;
}

.footer__logo--img {
    width: 70px;
    height: 70px;
}

.footer__social--link,
.footer__copyright,
.footer__logo--popper {
    color: var(--color-footer-text);
} 

.footer__logo--popper {
    position: absolute;
    right: 0;
    top: 30px;
    font-weight: 700;
    opacity: 0;
    transition: all 300ms ease;
}

.footer__anchor {
    margin-bottom: 20px;
    position: relative;
}

.footer__anchor:hover .footer__logo--popper {
    transform: translateX(60px);
    opacity: 1;
}

/* Small Phones, Tablets, Large Smartphones */

@media (max-width: 768px) {
    nav {
        height: 68px;
    }

    h1 {
        font-size: 28px;
    }

    .about-me__info--para {
        font-size: 18px;
    }

    .language {
        width: calc(100% / 2);
    }

    .project__discription--para {
        font-size: 14px;
    }

    .project__discription {
        left: 30px;
        padding-right: 30px;
    }
}

/* SMALL PHONES */

@media (max-width: 480px) {
    .nav__link:not(:last-child) {
        display: none;
    }

    .project__discription {
        padding: 0;
        left: 0;
        width: 100%;
    }

    .project__discription--para {
        display: none;
    }

    .project__discription--links {
        display: flex;
        justify-content: center;
    }

    .project__discription--title {
        font-size: 32px;
        line-height: 1;
        text-align: center;
    }

    .project__discription--sub-title {
        text-align: center;
        margin: 12px 0;
    }
}