@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Instrument Sans", sans-serif;
    line-height: 1.6;
}

h3 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    font-weight: 500;
}

h4 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

h5 {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 400;
}

img {
    width: clamp(24px, 4vw, 32px);
    height: auto;
}

a {
    text-decoration: none;
    color: #000 !important;
}

p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #333;
}

.bold{
    font-weight: 600;
}

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

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fff;
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loading-screen.hidden {
    transform: translateX(-100%);
    pointer-events: none;
}

.coin-gif {
    width: clamp(50px, 10vw, 80px);
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .coin-gif {
        animation: none;
    }
    #loading-screen {
        transition: none;
    }
}

#main-content.visible {
    display: block;
    animation: slideIn 0.5s ease-in;
}

@keyframes slideIn {
    0% { transform: translateX(20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    margin-top: 4rem;
}

section {
    padding: 1.5rem 0;
}

hr {
    background-color: #000;
    border: none;
    height: 1px;
    margin: 1rem 0;
}

.back h3 {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #6c6c6c;
}

.back:hover {
    text-decoration: underline;
}

.back:hover h3 {
    color: black;
}

.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.title-1, .title-2 {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.title-2 {
    flex-direction: row;
    align-items: center;
}
.title-2 a{
    display: flex;
    justify-content: center;
    align-items: center;
}

.resume {
    padding: 0.2rem 1.2rem;
    border: 1px solid #000;
    border-radius: 14px;
    transition: background 0.2s ease-in-out;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}


.social-img {
    transition: transform 0.2s ease-in-out;
}

.social-img:hover {
    transform: translateY(-5px) scale(1.05);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #fff;
    border: 1px solid #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-content h3 {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: #333;
}

.project-content p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #666;
    line-height: 1.5;
}

.view-all-projects{
    display: flex;
    justify-content: center;
    align-items: end;
    height: 80px;
}

.view-all-projects a{
    border: 1px solid #000;
    padding: 6px 12px;
    border-radius: 12px;
    transition: 0.3s ease-in-out;
}
.view-all-projects a:hover{
    background-color: #000;
    color: #fff !important;
}

.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stack-tag {
    border: 1px solid #000;
    background: #fff;
    color: #000 !important;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    transition: background 0.3s ease, color 0.3s ease;
}

.stack-tag:hover {
    background: #000;
    color: #fff !important;
}

.project-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    pointer-events: none;
}

.project-link, .project-link2 {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    transition: background 0.3s ease, color 0.3s ease;
    flex: 1;
    pointer-events: auto;
    text-align: center;
}

.project-link {
    background: #000;
    color: #fff !important;
}

.project-link2 {
    background: #fff;
    color: #000 !important;
}

.project-link:hover {
    background: #fff;
    color: #000 !important;
}

.project-link2:hover {
    background: #000;
    color: #fff !important;
}

.skill-sect {
    flex: 1 1 280px;
    min-height: 60px;
}

.skill-items {
    padding: 0.25rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.skill-items span {
    padding: 0.2rem 0.8rem;
    border: 1px solid #000;
    border-radius: 12px;
    transition: background 0.2s ease-in-out;
    white-space: nowrap;
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
}

.skill-items span:hover {
    background: #000;
    color: #fff !important;
}

.edu-rows {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.edu-rows > div {
    flex: 1 1 45%;
    min-width: 280px;
}

.edu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-left: 2px solid #000;
    margin-bottom: 1rem;
}

.edu .title-1 {
    gap: 0.25rem;
}

.edu .title-2 {
    align-self: flex-start;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: #666;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-row h5 {
    margin: 0;
}

.school {
    color: #414141;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}


footer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e0e0e0;
    color: rgb(87, 87, 87);
    font-family: system-ui, -apple-system, sans-serif;
}

.contact{
    display: flex;
    flex-direction: column;
}

.contact h4, .sitemap h4 {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 500;
    margin-bottom: 1rem;
    color: rgb(87, 87, 87);
}

.contact a {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #6c6c6c;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.contact a:hover {
    color: rgb(0, 0, 0);
    text-decoration: underline;
}

.sitemap ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sitemap li a {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #6c6c6c;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.sitemap li a:hover {
    color: rgb(0, 0, 0);
    text-decoration: underline;
}


@media (max-width: 768px) {
    .row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .title-2 {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
    }
    .project-content {
        padding: 1rem;
    }
    .edu {
        padding: 0.5rem 0.75rem;
        border-left: 2px solid #000;
    }
    .edu-rows {
        flex-direction: column;
        gap: 1rem;
    }
    .edu-rows > div {
        flex: 1 1 100%;
    }
    .skill-sect {
        flex: 1 1 100%;
    }
    .skill-items {
        gap: 0.25rem;
    }
    footer {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .contact, .sitemap {
        width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        margin-top: 2rem;
        padding: 0 0.5rem;
    }
    .project-buttons {
        flex-direction: column;
    }
    .project-link, .project-link2 {
        width: 100%;
    }
    .skill-items {
        padding: 0.2rem 0;
    }
    .skill-items span {
        padding: 0.15rem 0.6rem;
        font-size: clamp(0.7rem, 2vw, 0.8rem);
    }
    .edu {
        padding: 0.5rem;
        border-left: 1px solid #000;
    }
    footer {
        padding: 1rem;
    }

    .contact h4, .sitemap h4 {
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    }

    .contact a, .sitemap li a {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    }
}