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

html,
body {
    background: #05070d;
    color: white;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* =========================
   BACKGROUND
========================= */

#background {
    position: fixed;
    inset: 0;
    z-index: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(0, 255, 200, 0.06),
            transparent 60%
        ),
        #05070d;
}

#bgCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(rgba(0,255,200,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,200,0.03) 1px, transparent 1px);

    background-size: 80px 80px;
}

.vignette {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle,
            transparent 55%,
            rgba(0,0,0,0.92) 100%
        );
}

/* =========================
   INTRO
========================= */

#intro-screen {
    position: fixed;
    inset: 0;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 1;
    transform: scale(1);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

#intro-screen.hidden {
    opacity: 0;
    transform: scale(0.92) translateY(-30px);
    pointer-events: none;
}

#intro-content {
    text-align: center;
}

h1 {
    font-size: clamp(3rem, 7vw, 6.5rem);
    letter-spacing: 0.2rem;
    line-height: 0.95;
}

h2 {
    margin-top: 2rem;

    color: rgba(255,255,255,0.7);

    font-size: 0.95rem;
    letter-spacing: 0.2rem;
}

/* =========================
   INTRO CONTACT
========================= */

#intro-screen .contact-row {
    margin-top: 1.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 14px;
}

#intro-screen .contact-row a img {
    width: 24px;
    height: 24px;

    opacity: 0.75;

    transition: 0.2s ease;
}

#intro-screen .contact-row a:hover img {
    opacity: 1;
    transform: scale(1.15);
}

#intro-screen .contact-text {
    color: rgba(255,255,255,0.8);

    cursor: pointer;
    user-select: text;

    
}


/* =========================
   ENTER
========================= */

.line {
    width: 150px;
    height: 1px;

    margin: 2rem auto;

    background: rgba(0,255,200,0.35);
}

#enter {
    display: inline-block;

    background: none;
    border: none;

    color: rgba(0,255,200,1);

    cursor: pointer;

    letter-spacing: 0.2rem;

    transition:
        transform 0.2s ease,
        text-shadow 0.2s ease,
        opacity 0.2s ease;

    opacity: 0.45;

    animation: enterPulse 2.4s ease-in-out infinite;
}

@keyframes enterPulse {

    0% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.45;
    }
}

#enter:hover {

    animation: none;

    opacity: 1;

    text-shadow:
        0 0 10px rgba(0,255,200,0.45),
        0 0 22px rgba(0,255,200,0.18);

    transform: scale(1.05);
}

/* =========================
   APP LAYOUT
========================= */

#app-layout {
    position: relative;
    z-index: 5;

    min-height: 100vh;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.2s ease;
}

#app-layout.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   SIDEBAR
========================= */

#sidebar {
    position: fixed;

    top: 0;
    left: 0;

    width: 320px;
    height: 100vh;
    

    z-index: 9999;

    padding: 40px;
    
    

    background: rgba(0,0,0,0.35);

    backdrop-filter: blur(14px);

    border-right: 1px solid rgba(0,255,200,0.08);
}

.sidebar-inner {
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

/* HEADER */

.sidebar-header h3 {
    font-size: 1.8rem;

    letter-spacing: 0.1rem;
    line-height: 1.2;
}

.sidebar-header p {
    margin-top: 10px;

    font-size: 0.85rem;

    color: rgba(255,255,255,0.6);
}

/* RESUME BUTTON */

.resume-download {
    display: inline-block;

    margin-top: 14px;

    padding: 8px 12px;

    border: 1px solid rgba(0,255,200,0.25);
    border-radius: 4px;

    color: rgba(0,255,200,0.9);

    text-decoration: none;

    font-size: 0.85rem;
    letter-spacing: 0.12rem;

    transition: 0.2s ease;
}

.resume-download:hover {
    background: rgba(0,255,200,0.08);

    border-color: rgba(0,255,200,0.6);

    transform: translateY(-1px);
}

/* =========================
   CONTACT
========================= */

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

    gap: 16px;

    padding: 20px 0;
}

.sidebar-contact .contact-row {
    display: flex;
    align-items: center;

    gap: 12px;
}

.sidebar-contact .contact-row a img {
    width: 22px;
    height: 22px;

    opacity: 0.75;

    transition: 0.2s ease;
}

.sidebar-contact .contact-row:hover img {
    opacity: 1;
    transform: scale(1.15);
}

.sidebar-contact .contact-text {
    color: rgba(255,255,255,0.75);
    text-decoration: none;

    font-size: 0.9rem;

    cursor: pointer;
    user-select: text;
}

.contact-row a{
    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
    color: inherit;
}



/* =========================
   SOCIAL
========================= */

.social-row {
    display: flex;
    gap: 16px;
}

.social-row img {
    width: 22px;
    height: 22px;

    opacity: 0.7;

    transition: 0.2s ease;
}

.social-row img:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* =========================
   NAV
========================= */

.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 14px;
}

.sidebar-nav a {
    color: rgba(255,255,255,0.6);

    text-decoration: none;

    letter-spacing: 0.15rem;
    font-size: 0.85rem;

    transition: 0.2s ease;
}

.sidebar-nav a:hover {
    color: rgba(0,255,200,1);

    transform: translateX(6px);
}

/* =========================
   CONTENT
========================= */

#portfolio-content {
    margin-left: 320px;

    display: flex;
    flex-direction: column;

    gap: 24px;

    padding: 40px 40px 40px;
}

/* =========================
   SECTIONS
========================= */

.section {
    padding: 28px 24px;

    background: rgba(255,255,255,0.02);

    border: 1px solid rgba(0,255,200,0.06);
    border-radius: 12px;

    backdrop-filter: blur(6px);

    transition: 0.25s ease;
    
}

.section:hover {
    border-color: rgba(0,255,200,0.18);

    background: rgba(255,255,255,0.03);
}

.section h3 {
    margin-bottom: 24px;

    color: rgba(0,255,200,0.85);

    font-size: 0.95rem;
    letter-spacing: 0.2rem;
}

.section p {
    color: rgba(255,255,255,0.82);

    line-height: 1.8;
}

/* =========================
   PROJECT GRID
========================= */

.project-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));

    gap: 24px;
}

/* =========================
   PROJECT CARD
========================= */

.project-card {
    overflow: hidden;

    background: rgba(255,255,255,0.03);

    border: 1px solid rgba(0,255,200,0.08);
    border-radius: 14px;

    cursor: pointer;

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);

    border-color: rgba(0,255,200,0.25);

    box-shadow:
        0 0 35px rgba(0,255,200,0.08);
}

/* =========================
   PROJECT MEDIA
========================= */

.project-media {
    position: relative;

    height: 220px;

    overflow: hidden;
}

.project-image,
.project-video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.project-image {
    opacity: 1;
}

.project-video {
    opacity: 0;
}

.project-card:hover .project-image {
    opacity: 0;
}

.project-card:hover .project-video {
    opacity: 1;
    transform: scale(1.03);
}

/* =========================
   PROJECT OVERLAY
========================= */

.project-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.35);

    opacity: 0;

    color: rgba(255,255,255,0.95);

    font-size: 0.8rem;
    letter-spacing: 0.2rem;

    transition: 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* =========================
   PROJECT CONTENT
========================= */

.project-content {
    padding: 22px;
}

.project-title {
    margin-bottom: 12px;

    color: rgba(255,255,255,0.95);

    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.project-description {
    color: rgba(255,255,255,0.72);

    font-size: 0.92rem;
    line-height: 1.7;
}

/* =========================
   TECH TAGS
========================= */

.tech-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 16px;
}

.tech-tags span {
    padding: 6px 12px;

    border: 1px solid rgba(0,255,200,0.18);
    border-radius: 999px;

    background: rgba(0,255,200,0.05);

    color: rgba(0,255,200,0.9);

    font-size: 0.72rem;
    letter-spacing: 0.04rem;
}

/* =========================
   MODAL
========================= */

.project-modal {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(0,0,0,0.82);

    backdrop-filter: blur(10px);

    opacity: 0;
    pointer-events: none;

    transition: 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;

    width: min(1200px, 100%);
    height: 90vh;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 40px;

    padding: 60px;

    background: rgba(10,12,18,0.96);

    border: 1px solid rgba(0,255,200,0.12);
    border-radius: 20px;

    overflow: hidden;
}

/* =========================
   MODAL VIDEO
========================= */
.modal-video video {
    width: 100%;
    max-width: 100%;

    height: auto;
    max-height: 75vh;

    display: block;

    object-fit: contain;
}
.modal-video {
    display: flex;
    flex-direction: column;
    gap: 16px;

    width: 100%;
}

.modal-video video,
.modal-video img {
    width: 100%;
    max-width: 100%;

    max-height: 75vh;

    object-fit: scale-down;

    border-radius: 14px;

    display: block;
}


.modal-video video {
    height: auto;
}
.modal-video {
    position: sticky;
    top: 0;

    align-self: start;

    max-height: 90vh;

    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* =========================
   MODAL INFO
========================= */
.modal-info {
    overflow-y: auto;
    max-height: 100%;
    padding-right: 10px;
    padding-top: 0px;
    margin-top: 0px;
}


.modal-info h2 {
    margin: 0 0 20px 0;

    font-size: 2rem;
    line-height: 1.2;
}

.modal-info p {
    margin-bottom: 18px;

    color: rgba(255,255,255,0.78);

    line-height: 1.9;
}

.modal-info ul {
    padding-left: 20px;

    margin-bottom: 28px;
}

.modal-info li {
    margin-bottom: 10px;

    color: rgba(255,255,255,0.82);

    line-height: 1.7;
}

/* =========================
   GITHUB BUTTON
========================= */

.github-link {
    display: inline-block;

    padding: 12px 20px;

    border: 1px solid rgba(0,255,200,0.25);
    border-radius: 6px;

    color: rgba(0,255,200,0.92);

    text-decoration: none;

    letter-spacing: 0.12rem;

    transition: 0.2s ease;
}

.github-link:hover {
    background: rgba(0,255,200,0.08);

    border-color: rgba(0,255,200,0.6);
}

/* =========================
   CLOSE BUTTON
========================= */

.close-modal {
    position: absolute;
    top: 18px;
    right: 18px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.08);

    color: white;

    font-size: 1.5rem;

    cursor: pointer;

    transition: 0.2s ease;

    z-index: 1000;
}

.close-modal:hover {
    background: rgba(0,255,200,0.18);
}

/* =========================
   ENTRY
========================= */

.entry {
    margin-bottom: 22px;
}

.entry-title {
    margin-bottom: 4px;

    color: rgba(255,255,255,0.95);

    font-size: 1.05rem;
    font-weight: 600;
}

.entry-sub {
    margin-bottom: 10px;

    color: rgba(0,255,200,0.7);

    font-size: 0.85rem;
    letter-spacing: 0.05rem;
}

.entry-list {
    padding-left: 18px;
}

.entry-list li {
    margin-bottom: 6px;

    color: rgba(255,255,255,0.78);

    line-height: 1.6;
}

.entry-body {
    margin-bottom: 10px;

    color: rgba(255,255,255,0.8);

    line-height: 1.7;
}

.label {
    margin-right: 6px;

    color: rgba(0,255,200,0.85);

    font-weight: 600;
}

.entry-last {
    margin-bottom: 0px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 1100px) {

    .modal-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        padding-top: 80px;
        max-height: 95vh;
    }

    .modal-video video,
    .modal-video img {
        max-height: 45vh;
        object-fit: contain;
    }

    .modal-info {
        max-height: 45vh;
        overflow-y: auto;
        padding-right: 8px;
    }
}

@media (max-width: 900px) {

    #sidebar {
        position: relative;

        width: 100%;
        height: auto;
    }

    #portfolio-content {
        margin-left: 0;

        padding: 50px 20px 120px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-modal {
        padding: 20px;
    }

    .modal-content {
        padding: 24px;
        padding-top: 80px;
    }

    h1 {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }
}

.disabled-link {
    cursor: not-allowed;

    opacity: 0.55;

    border-color: rgba(255,255,255,0.08);

    color: rgba(255,255,255,0.6);

    background: rgba(255,255,255,0.02);

    pointer-events: none;
}

.disabled-link span {
    display: block;

    margin-top: 8px;

    color: rgba(255,255,255,0.45);

    font-size: 0.72rem;

    letter-spacing: 0.04rem;

    line-height: 1.5;
}


.project-title {
    min-height: 3.2em;
}

.project-description {
    min-height: 5.5em;
}

html {
    text-size-adjust: 100%;
}

.modal-content {
    max-height: 90dvh;
}
