body {
    margin: 0;
    padding: 0;
    background-color: #252328;
    min-height: 100vh;
    font-family: 'Martian Mono', monospace;
    overflow-y: auto;
}

#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    margin-top: -30px;
}

.card-container {
    background-color: #252328;
    border-radius: 60px;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

/* Add these new styles for the geometric lines */
.card-container::before,
.card-container::after,
.card-container .line {
    content: '';
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

/* Style for all 20 lines */
.card-container .line:nth-child(n) {
    width: 1px;
    height: var(--line-length, 100px);
    transform: rotate(var(--rotation, 0deg));
    top: var(--top, 0);
    left: var(--left, 0);
}

/* Individual line styles */
.card-container .line:nth-child(1) { --rotation: 11deg; --top: -2%; --left: 0%; --line-length: 650px; }
.card-container .line:nth-child(2) { --rotation: 70deg; --top: 26.5%; --left: 0%; --line-length: 120px; }
.card-container .line:nth-child(3) { --rotation: 160deg; --top: 17%; --left: 0%; --line-length: 300px; }
.card-container .line:nth-child(4) { --rotation: 80deg; --top: 50%; --left: 0%; --line-length: 140px; }
.card-container .line:nth-child(5) { --rotation: 80deg; --top: 85%; --left: 0%; --line-length: 140px; }
.card-container .line:nth-child(6) { --rotation: 11deg; --top: 65.5%; --left: 0%; --line-length: 500px; }
.card-container .line:nth-child(7) { --rotation: 150deg; --top: 84.3%; --left: 0%; --line-length: 160px; }
.card-container .line:nth-child(8) { --rotation: 60deg; --top: 4%; --left: 100%; --line-length: 320px; }
.card-container .line:nth-child(9) { --rotation: 70deg; --top: 65%; --left: 100%; --line-length: 120px; }
.card-container .line:nth-child(10) { --rotation: 130deg; --top: 80%; --left: 100%; --line-length: 300px; }
.card-container .line:nth-child(11) { --rotation: 110deg; --top: -10%; --left: 50%; --line-length: 200px; }
.card-container .line:nth-child(12) { --rotation: 40deg; --top: 90%; --left: 70%; --line-length: 120px; }

.card {
    background-color: rgb(40, 39, 47);
    border-radius: 40px;
    padding: 60px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 85%;
    width: 680px;
    color: #ffffff;
    text-align: left;
    font-family: 'Martian Mono', monospace;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.card h1 {
    font-size: 3em;
    margin-top: 0;
    margin-bottom: 40px;
    color: #ffffff;
    font-family: 'Martian Mono', monospace;
    padding-top: 10px;
}

.card img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.circular-image {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin: 20px auto;
    display: block;
    border: 5px solid rgba(40, 39, 47); /* Same color as the card background */
    box-shadow: 0 0 0 1px rgba(76, 75, 81); /* Darker outer border */
}

.role {
    background: linear-gradient(to right, #8c51d6, #DE8B5D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2em;
    letter-spacing: 2.3px;
    margin-bottom: 25px;
    margin-top: 40px;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
}

.bio {
    font-size: 1.2em;
    line-height: 2.0;
    margin-bottom: 40px;
    color: #a0a0a0;
    font-family: 'Martian Mono', monospace;
}

.bio a {
    color: #8c51d6; /* Purple color from your gradient */
    text-decoration: none;
    transition: color 0.3s ease;
}

.bio a:hover {
    color: #de5dc4; /* Orange color DE8B5D from your gradient */
}

.email-button {
    background-image: linear-gradient(to right, #8c51d6, #8c51d6, #DE8B5D, #DE8B5D);
    background-size: 300% 100%;
    background-position: 0 0;
    color: white;
    padding: 20px 50px;
    font-size: 1.5em;
    letter-spacing: 1.2px;
    border-radius: 35px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    border: none;
    cursor: pointer;
    transition: background-position 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.email-button i {
    margin-left: 25px;
    font-size: 1em;
}

.email-button:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.separator {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin: 50px 0;
}

.social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 0;
}

.social-icons a {
    color: #ffffff;
    font-size: 28px;
    transition: color 0.3s ease;
}

.email-button:hover {
    background: linear-gradient(to right, #8c51d6, #DE8B5D);
}

.social-icons a:hover {
    color: #8c51d6;
}

.bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(to right, #8c51d6, #DE8B5D);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #8c51d6;
}

.nav-link:hover::after {
    width: 100%;
}

.projects-card {
    max-width: 1100px;
    width: 100%;
}

.projects-subtitle {
    margin: 50px 0 24px;
    font-size: 1.3em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.projects-subtitle:first-of-type {
    margin-top: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(140, 81, 214, 0.6), rgba(40, 39, 47, 0.9));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.project-image.has-photo {
    background: none;
}

.project-image.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image.project-image-logo {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.88), rgba(255, 64, 129, 0.82));
    padding: 20px 32px;
}

.project-image.project-image-logo img {
    object-fit: contain;
}

.project-initials {
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

.bg-plum {
    background: linear-gradient(135deg, rgba(140, 81, 214, 0.85), rgba(70, 38, 120, 0.9));
}

.bg-teal {
    background: linear-gradient(135deg, rgba(58, 200, 168, 0.85), rgba(19, 127, 112, 0.9));
}

.bg-indigo {
    background: linear-gradient(135deg, rgba(85, 99, 238, 0.85), rgba(42, 61, 213, 0.9));
}

.bg-amber {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.85), rgba(255, 119, 70, 0.9));
}

.bg-rose {
    background: linear-gradient(135deg, rgba(255, 119, 169, 0.85), rgba(179, 65, 128, 0.9));
}

.bg-slate {
    background: linear-gradient(135deg, rgba(99, 118, 255, 0.85), rgba(32, 41, 69, 0.92));
}

.bg-emerald {
    background: linear-gradient(135deg, rgba(121, 218, 146, 0.85), rgba(28, 112, 83, 0.9));
}

.bg-mood {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.88), rgba(255, 64, 129, 0.82));
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
}

.project-image img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.project-content h2 {
    margin: 0;
    font-size: 1.4em;
}

.project-content p {
    margin: 0;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(140, 81, 214, 0.15);
    border: 1px solid rgba(140, 81, 214, 0.5);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    color: #dcd5f5;
}

.project-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-link:hover {
    color: #8c51d6;
    transform: translateX(4px);
}

@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body {
        overflow-y: auto;
    }

    .container {
        padding: 15px;
        min-height: auto;
        height: auto;
    }

    .card-container {
        padding: 15px;
        border-radius: 30px;
        margin: 10px 0;
        width: 100%;
        box-sizing: border-box;
    }

    .card {
        padding: 30px;
        border-radius: 20px;
        max-width: 90%;
        width: 100%;
        box-sizing: border-box;
    }

    .projects-card {
        max-width: 100%;
    }

    .card h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }

    .circular-image {
        width: 100px !important;
        height: 100px !important;
    }

    .role {
        font-size: 1em;
        letter-spacing: 2px;
        margin-bottom: 20px;
        margin-top: 25px;
    }

    .bio {
        font-size: 1em;
        line-height: 1.8;
        margin-bottom: 30px;
    }

    .email-button {
        padding: 15px 30px;
        font-size: 1.2em;
        border-radius: 30px;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    .separator {
        margin: 35px 0;
    }

    .social-icons {
        gap: 20px;
        margin-top: 0;
        justify-content: center;
    }

    .social-icons a {
        font-size: 24px;
    }

    .bottom-container {
        flex-direction: column;
        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-content {
        padding: 20px;
    }

    .project-image {
        height: 200px;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
    }

    .nav-link {
        font-size: 1em;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 10px;
    }
    
    .card-container {
        padding: 10px;
        border-radius: 25px;
    }
    
    .card {
        padding: 20px;
        border-radius: 15px;
        max-width: 95%;
    }
    
    .card h1 {
        font-size: 1.8em;
    }
    
    .role {
        font-size: 0.9em;
        letter-spacing: 1.5px;
        margin: 15px 0;
    }
    
    .bio {
        font-size: 0.9em;
        line-height: 1.6;
    }
    
    .email-button {
        padding: 12px 20px;
        font-size: 1.1em;
    }
    
    .social-icons a {
        font-size: 22px;
    }
    
    .nav-link {
        font-size: 0.9em;
    }
}

@media (max-height: 700px) {
    body {
        overflow-y: auto;
    }

    .container {
        min-height: auto;
        height: auto;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Remove the old transition animations and replace with these */
.card-transition {
    animation: cardExpand 1s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    transform-origin: center center;
}

.card-container-transition {
    animation: containerFade 1s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes cardExpand {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
        opacity: 0.5;
    }
    100% {
        transform: scale(2) rotate(10deg);
        opacity: 0;
    }
}

@keyframes containerFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* Add these base styles to ensure transitions work */
.card {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    will-change: transform, opacity;
    transform-origin: center center;
}

.card-container {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    will-change: transform, opacity;
}

.back-button {
    margin-top: 30px;
}

.back-button .nav-link {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
}

.back-button .nav-link:hover {
    border-color: #8c51d6;
}
