@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

:root {
    --primary-blue: #2160ff;
    --dark-bg: #242424;
    --light-bg: rgb(245, 245, 245);
    --accent-orange: #f06449;
    --success-green: #4bb543;
    --text-dark: #242424;
    --text-light: white;
    --border-color: #c0c4cc;
    --border-hover: #dcdfe6;
    --overlay-bg: #1c1d25;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.28);
    --shadow-heavy: rgba(0, 0, 0, 0.45);
    --shadow-modal: rgba(0, 0, 0, 0.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--light-bg);
    background-image: radial-gradient(circle, #d4d4d4 1px, transparent 1px);
    background-size: 36px 36px;
}

body.dark-theme {
    background-color: var(--dark-bg);
    background-image: radial-gradient(circle, #333333 1px, transparent 1px);
}

html {
    scroll-behavior: smooth;
}

li {
    list-style-type: none;
}

p {
    line-height: 1.5;
    font-size: 16px;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
}

section {
    background-color: transparent;
    transition: all 300ms ease;
}

input, textarea {
    width: 100%;
    background-color: var(--dark-bg);
    color: var(--text-light);
    outline: none;
    border: 3px solid var(--border-color);
    border-top: none;
    border-left: none;
    border-right: none;
    height: 40px;
    transition: all 300ms ease;
}

textarea {
    resize: vertical;
    height: 100px;
    margin-top: 8px;
}

label {
    font-size: 14px;
    font-weight: bold;
}

input:hover, textarea:hover {
    border-color: var(--border-hover);
}

input:focus, textarea:focus {
    border-color: var(--accent-orange);
}

.container {
    padding: 50px 0;
    width: 100%;
}

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

.click {
    cursor: pointer;
    transition: all 300ms ease;
}

.click:hover {
    transform: scale(1.1);
}

.click:active {
    transform: scale(0.8);
}

.title {
    font-size: 120px;
    margin-bottom: 12px;
    text-align: left;
    line-height: 1;
}

.secondary {
    color: var(--primary-blue) !important;
}

.link__hover-effect {
    position: relative;
}

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

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

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

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

nav,
.scroll,
.header {
    opacity: 1;
    visibility: visible;
    transition: all 600ms 250ms;
}

.modal--open nav,
.modal--open .scroll,
.modal--open .header {
    opacity: 0;
    visibility: hidden;
    transition: all 400ms;
}

.dark-theme .title,
.dark-theme .section__title,
.dark-theme .section__sub-title,
.dark-theme .nav__link--anchor,
.dark-theme .fa-adjust,
.dark-theme .header__para {
    color: white;
}

.dark-theme #personal-logo {
    filter: none;
}

.dark-theme .scroll__icon {
    border-color: white;
}

.dark-theme .scroll__icon:after,
.dark-theme .link__hover-effect--black:after {
    background-color: white;
}

.dark-theme .mail__btn {
    background-color: var(--text-light);
    color: var(--text-dark);
}

/*

LANDING PAGE

*/

#landing-page {
    min-height: 100vh;
}

.header {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1000px;
    padding: 0 30px;
}

.header__para {
    font-size: 24px;
    line-height: 2;
    max-width: 400px;
}

.social__list {
    margin-top: 16px;
    display: flex;
}

.social__link {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 6px;
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.mail__btn {
    width: 70px;
    height: 70px;
    font-size: 32px;
    border-radius: 50%;
    border: none;
    background-color: var(--dark-bg);
    color: var(--text-light);
    position: fixed;
    bottom: 32px;
    right: 40px;
    z-index: 100;
    box-shadow: 0 12px 30px 0 var(--shadow-medium);
}

.scroll {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll__icon {
    width: 20px;
    height: 30px;
    border: 2px solid var(--text-dark);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll__icon:after {
    content: "";
    width: 4px;
    height: 6px;
    background-color: var(--text-dark);
    border-radius: 2px;
    animation: scroll 1000ms infinite alternate-reverse;
}

@keyframes scroll {
    0% {
        transform: translateY(3px);
    }

    100% {
        transform: translateY(-3px);
    }
}

/*

NAVIGATION 

*/

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

#personal-logo {
    height: 50px;
    width: 50px;
    filter: invert(1);
}

.nav__link--list {
    display: flex;
}

.nav__link {
    margin: 0 12px;
}

.nav__link--dropdown {
    position: relative;
}

.dropdown__menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: white;
    box-shadow: 0 10px 20px var(--shadow-light);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease;
    z-index: 100;
}

.dark-theme .dropdown__menu {
    background-color: var(--dark-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.nav__link--dropdown:hover .dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown__link {
    color: var(--text-dark);
    font-weight: 700;
    padding: 10px 20px;
    display: block;
    transition: all 300ms ease;
}

.dark-theme .dropdown__link {
    color: white;
}

.dropdown__link:hover {
    background-color: #f0f0f0;
    color: var(--primary-blue);
}

.dark-theme .dropdown__link:hover {
    background-color: #323232;
}

.nav__link--anchor {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 700;
}

.fa-adjust {
    font-size: 20px;
}

.nav__dropdown-icon {
    font-size: 11px;
    transition: transform 300ms ease;
}

.nav__link--dropdown:hover .nav__dropdown-icon,
.nav__link--dropdown:focus-within .nav__dropdown-icon {
    transform: rotate(180deg);
}

/*

MODAL

*/

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1100px;
    height: 700px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    visibility: hidden;
    z-index: -1;
    transition: visibility 1s, z-index 1s, box-shadow 0.5s ease;
}

.modal--open .modal{
    z-index: 60;
    box-shadow: 0 20px 80px 0 var(--shadow-modal);
    visibility: visible;
}

.modal__half {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: all 300ms ease-in;
}

.modal--open .modal__about,
.modal--open .modal__contact {
    transform: translate(0%);
}

.modal__about {
    background-color: var(--text-light);
    transform: translateX(-110%);
}

.modal__languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.modal__language {
    width: 25%;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 300ms ease;
}

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

.modal__language:hover {
    filter: brightness(80%);
    transform: scale(0.9);
}

.language__name {
    position: absolute;
    bottom: -10px;
    transform: scale(0);
    transition: all 300ms ease;
}

.modal__language--img {
    width: 100%;
}

.modal__contact {
    background-color: var(--dark-bg);
    color: var(--text-light);
    transform: translateX(110%);
}

.modal__title {
    font-size: 26px;
}

.modal__sub-title {
    margin: 12px 0 24px 0;
    font-size: 14px;
}

.modal__para {
    margin-bottom: 12px;
    line-height: 1.75;
}

.form__item {
    margin-bottom: 20px;
}

.form__submit {
    background-color: var(--accent-orange);
    border: 2px solid var(--accent-orange);
    color: var(--text-light);
    font-weight: 700;
    width: 100%;
    max-width: 240px;
    padding: 12px 24px;
    font-size: 20px;
    transition: all 300ms ease;
}

.form__submit:hover {
    border-color: white;
    background-color: transparent;
}

.form__submit:active {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: -1;
}

.modal__overlay--loading {
    background-color: var(--dark-bg);
    font-size: 80px;
}

.modal__overlay--success {
    background-color: var(--success-green);
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    padding: 28px;
}

.modal__overlay--visible {
    z-index: 1;
    display: flex;
}

.fa-spinner {
    animation: spinner 750ms infinite;
}

@keyframes spinner {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}

.form__error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

.modal__exit {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 36px;
    z-index: 100;
}

/*

PROJECTS

*/

.section__title {
    text-align: center;
    font-size: 48px;
    margin-bottom: 60px;
}

.project {
    flex: 1 1 45%;
    max-width: 45%;
    box-sizing: border-box;
}


.project__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0;
    list-style: none;
}

.project__img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 600ms ease;
    margin: 0;
    padding: 0;
}

.project__wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 80px 0 var(--shadow-heavy);
    overflow: hidden;
}

.project__wrapper:hover .project__description {
    opacity: 1;
    transform: translateY(-50%);
}

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

.project__description {
    position: absolute;
    top: 50%;
    left: 90px;
    transform: translateY(100%);
    opacity: 0;
    transition: opacity 300ms, transform 450ms ease;
    color: white;
    max-width: 100%;
}

.project__wrapper:hover .project__wrapper--bg {
    opacity: 0.85;
}

.project__wrapper--bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    opacity: 0;
    transition: all 450ms ease;
}

.project__description--title {
    font-size: 36px;
}

.project__description--sub-title {
    margin-top: 8px;
}

.project__description--link {
    color: white;
    font-size: 20px;
    margin-right: 16px;
}

.project__description--para {
    margin: 6px 0;
}

/*

FOOTER

*/

footer {
    position: relative;
    background-color: var(--dark-bg);
    display: flex;
    padding: 6% 0;
}

.footer__row {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

.footer__social--link,
.footer__copyright {
    color: var(--text-light);
}

.section__sub-description {
  font-size: 1rem;
  max-width: 800px;
  margin: 2rem auto 6rem;
  text-align: center;
  line-height: 1.6;
  color: var(--text-dark);
}

.dark-theme .section__sub-description {
  color: var(--text-light);
}


/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-blue);
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease;
    z-index: 100;
    box-shadow: 0 4px 16px var(--shadow-light);
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.back-to-top:hover {
    background-color: #1a4fd6;
}


/* Scroll fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in--visible {
    opacity: 1;
    transform: translateY(0);
}

/* CMS hidden items */
.cms--hidden {
    display: none;
}

.cms__toggle-btn {
    display: block;
    margin: 32px auto 0;
    padding: 12px 32px;
    background-color: var(--primary-blue);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 300ms ease, transform 150ms ease;
}

.cms__toggle-btn:hover {
    background-color: #1a4fd6;
}

.cms__toggle-btn:active {
    transform: scale(0.97);
}

/* Figma text-only cards */
.figma__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 0;
    list-style: none;
    width: 100%;
}

.figma__card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 300ms ease, transform 300ms ease;
}

.figma__card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    transform: translateY(-4px);
}

.figma__card--header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.figma__card--icon {
    font-size: 24px;
    color: #1abcfe;
}

.figma__card--tag {
    font-size: 12px;
    font-weight: 600;
    background: #eef1ff;
    color: #3c5bfa;
    border-radius: 6px;
    padding: 4px 10px;
}

.figma__card--title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.figma__card--para {
    font-size: 14px;
    color: #555555;
    line-height: 1.65;
    flex: 1;
    margin: 0;
}

.figma__card--link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    margin-top: 4px;
    transition: gap 200ms ease;
}

.figma__card--link:hover {
    gap: 10px;
}

body.dark-theme .figma__card {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark-theme .figma__card--tag {
    background: #1e2a4a;
    color: #7a9fff;
}

body.dark-theme .figma__card--para {
    color: #aaaaaa;
}

body.dark-theme .figma__card--title {
    color: var(--text-light);
}

/* Click/keyboard-triggered dropdown open state */
.dropdown__menu--open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Small phones, tablets, large smartphones */
@media (max-width: 768px) {
    .mail__btn {
        width: 54px;
        height: 54px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top {
        bottom: 24px;
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .nav__link--dropdown:hover .dropdown__menu {
        display: none; /* Disable hover dropdown on mobile */
    }

    .project {
        flex: 1 1 100%; /* single column */
        max-width: 100%;
      }
    
    .title {
        font-size: 80px;
    }
    
    .header__para {
        font-size: 20px;
    }

    .modal {
        top: 0;
        left: 0;
        transform: none;
        height: auto;
        width: 100%;
        flex-direction: column-reverse;
        border-radius: 0;
    }

    .modal__half {
        width: 100%;
    }
}

/* Small phones */
@media (max-width: 942px) and (min-width: 772px) {
    #personal-projects .project__description--para,
    #personal-projects .project__description--sub-title,
    #professional-projects .project__description--para,
    #professional-projects .project__description--sub-title,
    #cms-projects .project__description--para,
    #cms-projects .project__description--sub-title,
    #figma-projects .project__description--para,
    #figma-projects .project__description--sub-title {
        display: none;
    }

    #personal-projects .project__description,
    #professional-projects .project__description,
    #cms-projects .project__description,
    #figma-projects .project__description {
        left: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .project {
        flex: 1 1 100%; /* single column on mobile */
        max-width: 100%;
      }
    
    .title {
        font-size: 52px;
    }

    .header__para {
        font-size: 18px;
    }

    .nav__link:first-child {
        display: none;
    }

    #personal-projects .project__description--para,
    #professional-projects .project__description--para,
    #cms-projects .project__description--para,
    #figma-projects .project__description--para {
        display: none;
    }

    #personal-projects .project__description,
    #professional-projects .project__description,
    #cms-projects .project__description,
    #figma-projects .project__description {
        left: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }

    #personal-projects .project__description--sub-title,
    #professional-projects .project__description--sub-title,
    #cms-projects .project__description--sub-title,
    #figma-projects .project__description--sub-title {
        margin-bottom: 8px;
    }

    .modal__half {
        padding: 40px;
    }
}