* { box-sizing: border-box; margin:0; padding:0; }
html, body { height:100%; font-family: Arial, sans-serif; background-color:#121212; color:#e0e0e0; }

#loading {
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    display:flex;
    flex-direction: column;
    justify-content:center;
    align-items:center;
    background-color:#121212;
    z-index:9999;
}
.loader {
    border: 5px solid #1a1a1a;
    border-top: 5px solid #00ffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 60px);
    padding: 40px 20px 20px 20px;
}

.intro {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin-top: 200px;
    gap: 150px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.intro-left {
    flex: 0 0 auto;
}
.intro-left .scene {
    width: 220px;
    height: 220px;
    perspective: 800px;
}
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}
.face {
    position: absolute;
    width: 220px;
    height: 220px;
    backface-visibility: hidden;
    border-radius: 15px;
}
.face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}
.face-front  { transform: rotateY(0deg) translateZ(110px); }
.face-back   { transform: rotateY(180deg) translateZ(110px); }
.face-right  { transform: rotateY(90deg) translateZ(110px); }
.face-left   { transform: rotateY(-90deg) translateZ(110px); }
.face-top    { transform: rotateX(90deg) translateZ(110px); }
.face-bottom { transform: rotateX(-90deg) translateZ(110px); }
@keyframes rotateCube { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(360deg) rotateY(360deg); } }

.intro-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding-left: 150px;
}

.bio { font-size: 1.1rem; }

.projects h2 { text-align: left; margin-bottom: 20px; }
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 25px;
}
.card {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px #00ffff33;
    width: 250px;
    transition: transform 0.3s;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 0 25px #00ffff66; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; line-height: 1.4; }

.footer {
    background-color: #1a1a1a;
    text-align: center;
    color: #aaaaaa;
    padding: 15px 20px;
    font-style: italic;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
}

@media (max-width: 900px) {
    .main-content { flex-direction: column; align-items: center; padding: 20px; }
    .intro { flex-direction: column; align-items: center; gap: 60px; margin-top: 100px; text-align:center; }
    .intro-left { margin-bottom: 30px; }
    .intro-right { padding-left: 0; margin-top: 30px; }
    .cards { flex-direction: column; align-items: center; width: 100%; }
    .card { width: 90%; max-width: 400px; }
    .projects { margin-bottom: 100px; }
    .footer { font-size: 0.9rem; }
}

@media (max-width: 500px) {
    .intro { margin-top: 60px; gap: 40px; }
    .card { width: 95%; }
    .bio { font-size: 1rem; }
}
