:root {
    --bg-dark: #020204;
    --accent-orange: #f39c12;
    --glass-white: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-gray: #a0a0a0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg-dark); 
    color: white;
    overflow-x: hidden;
}
#spaceCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
}
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 10%; background: transparent;
    position: relative; z-index: 10;
}
.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: 2px; }
.nav-links a {
    color: white; text-decoration: none; margin-left: 30px;
    font-size: 0.9rem; opacity: 0.7; transition: 0.3s;
}
.nav-links a:hover { opacity: 1; color: var(--accent-orange); }
.main-header { 
    text-align: center; margin: 60px 0 40px; padding: 0 20px; 
}
.main-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 800; letter-spacing: 12px;
    text-transform: uppercase; background: linear-gradient(to bottom, #fff 40%, #555 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.main-header p { color: var(--text-gray); max-width: 600px; margin: 20px auto 0; line-height: 1.6; }
.projects-container {
    max-width: 1200px; margin: 0 auto; padding: 40px 20px 100px;
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px;
    justify-items: center;
}
.project-card {
    background: var(--glass-white);
    border: 1.5px solid var(--glass-border);
    border-radius: 24px; 
    width: 100%;
    max-width: 350px;
    height: 520px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(15px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0; transform: translateY(40px);
    position: relative;
}

.project-card.reveal { opacity: 1; transform: translateY(0); }

.project-card:hover {
    border-color: var(--accent-orange);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.project-image {
    width: 100%; height: 180px; overflow: hidden; background: #111;
}
.project-image img { width: 100%; height: 100%; object-fit: cover; }

.project-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }

.project-tags { margin-bottom: 15px; }
.project-tags span {
    font-size: 0.65rem; color: var(--accent-orange);
    border: 1px solid rgba(243, 156, 18, 0.3);
    padding: 4px 10px; border-radius: 20px; margin-right: 5px;
    text-transform: uppercase;
}

.project-card h3 { font-size: 1.4rem; margin-bottom: 10px; font-weight: 700; color: #fff; }
.project-card p { 
    color: var(--text-gray); font-size: 0.9rem; line-height: 1.6; 
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.read-more-btn {
    background: none; border: none; color: var(--accent-orange);
    cursor: pointer; font-weight: 600; font-size: 0.85rem;
    margin-top: 12px; text-align: left; width: fit-content;
}

.project-links { margin-top: auto; padding-top: 15px; }
.project-links a {
    color: white; font-size: 1.2rem; margin-right: 15px; transition: 0.3s; opacity: 0.5;
}
.project-links a:hover { color: var(--accent-orange); opacity: 1; }
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(20px);
    z-index: 1000; display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-content {
    background: #0a0a0c; border: 1px solid var(--glass-border);
    max-width: 600px; width: 100%; border-radius: 24px; 
    padding: 40px; position: relative;
}
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; color: white; cursor: pointer; }
.modal-content h2 { color: var(--accent-orange); margin-bottom: 15px; }
.modal-content p { line-height: 1.7; color: var(--text-gray); }
footer {
    padding: 40px 8%; text-align: center; border-top: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2); backdrop-filter: blur(10px); margin-top: 40px;
}
.footer-text { font-size: 0.9rem; color: var(--text-gray); letter-spacing: 1px; }
.heart { color: #ff4d4d; display: inline-block; animation: beat 1.2s infinite; }

@keyframes beat { 
    0%, 100% { transform: scale(1); } 
    50% { transform: scale(1.2); } 
}