@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');
/* styles */

* {
    --primary: #7c3aed;
    --primary-content: #ffffff;
    --primary-dark: #5f14e0;
    --primary-light: #9b69f1;
    
    --background: #19181b;
    --foreground: #252329;
    --border: #3e3b45;
    
    --copy: #fbfbfb;
    --copy-light: #d8d6dc;
    --copy-lighter: #a49fac;
    
    --fs-h1: 96px;
    --fs-p: 24px;
    --ff: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, rgba(37,33,44,1) 0%, rgba(7,7,7,1) 100%);
    color: var(--primary-content);
    font-family: var(--ff);
    overflow-x: hidden; /* Optional: Prevent horizontal scrolling */
    overscroll-behavior: none; /* Prevent the bounce or over-scroll effect */
}

html { 
    padding: env(safe-area-inset);
  }

body {
    line-height: 1.5;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

a {
    text-decoration: none; 
    color: inherit; 
  }

#root, #__next {
    isolation: isolate;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.nav-bar {
    background-color: rgba(1, 1, 1, 0.3); /* Adjust opacity and color as needed */
    backdrop-filter: blur(10px); /* Adjust blur amount for the glass effect */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    position: fixed;
    top: 1rem;
    width: 80%;
    z-index: 1000;
    border-radius: 1rem;
}

.logo {
    display: flex;
    gap: 0.5rem;
    cursor: pointer;
}

.hero p {
    margin-top: 2rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem;
}

h1 {
    font-size: calc(1.5rem + 3vw);
    line-height: 1.3;
    letter-spacing: -0.05em;
}


p {
    font-size: 1.2rem;
    color: var(--copy-lighter);
    word-spacing: 0.1rem;
    letter-spacing: -0.05rem;
    
}

span {
    color: var(--primary);
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

li {
    transition: all 0.3s ease-in-out;
    font-weight: 500;
    word-spacing: 0.1rem;
    letter-spacing: -0.05rem;
}

.center-text {
    text-align: center;
}

.projects-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem;
    margin-top: 20vh;
}

.card {
    display: flex ;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(37,33,44,1) 0%, rgba(7,7,7,1) 100%);
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.5s ease;
    user-select: none;
    -webkit-user-select: none;
}

.card:hover {
    background: var(--border);
    cursor: pointer;
}

.card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 100px);
}

.card h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(0.5rem, 1.5rem, 2rem);
}

.card p {
    margin-bottom: 1rem;
}

.card-content .modal-desc {
    display: none; /* Initially hide modal description */
}

.card-content span {
    display: block;
    margin-top: auto; /* Align year to the bottom */
    font-weight: bold;
    color: var(--primary-light);
}

.center-text {
    margin-top: 10rem;
    margin-inline: 1rem;
}

/* utility */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease-in-out;
}

.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
    overflow: auto; /* Enable scrolling if content exceeds viewport */
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(37,33,44,1) 0%, rgba(7,7,7,1) 100%);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    max-width: 90%;
    width: 500px; /* Fallback width for very large screens */
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--primary-content);
}

.modal-left img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.modal-flex {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#modal-year {
    display: block;
    margin-top: auto; /* Align year to the bottom */
    font-weight: bold;
    color: var(--primary-light);
}

.close {
    color: var(--primary-content);
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: var(--primary-light);
    text-decoration: none;
    cursor: pointer;
}


.footer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
}

.footer {
    text-align: center;
    bottom: 10px;
    z-index: 1000;
    border-radius: 1rem;
    padding: 1rem;
}



@media (max-width: 768px) {
    .projects {
        grid-template-columns: 1fr;
    }

    .card h2, .modal h2 {
        font-size: 1.2rem;
    }

    .card p, .modal p {
        font-size: 0.9rem;
    }

    #modal-year {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .modal-content {
        flex-direction: row;
        max-width: 80%;
        width: 700px;
    }

    .modal-left {
        flex: 1;
    }

    .modal-flex {
        flex: 2;
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 80%;
    }
}
