:root {
    --bg: #050505;
    --card: #111111;
    --accent: #00ff88; 
    --text: #ffffff;
    --gray: #888888;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* --- Hero & Profile --- */
header {
    padding: 60px 20px;
    background: linear-gradient(180deg, #1a1a1a 0%, var(--bg) 100%);
}

.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.profile-pic {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

h1 {
    margin: 0;
    font-size: 3rem;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
}

.skills {
    color: var(--gray);
    font-size: 0.9rem;
}

/* --- Portfolio Grid Layout (Stabilized) --- */
#portfolio {
    padding: 40px 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.video-card {
    background-color: var(--card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #222;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.video-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.video-card h3 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 15px;
}

/* This structural rule prevents the layout shifting and embed crashes seen before */
.tiktok-container {
    width: 100%;
    max-width: 325px; 
    margin: 0 auto;
    aspect-ratio: 9 / 16; 
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
    display: flex;
    justify-content: center;
}

.tiktok-container blockquote {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- Footer & Buttons --- */
footer {
    padding: 60px 20px;
    background-color: var(--card);
    border-top: 1px solid #333;
}

.footer-links {
    margin-top: 30px;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    margin: 0 10px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

button.email-btn {
    display: inline-block;
    background: var(--accent);
    color: #000;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: 'Space Grotesk', sans-serif;
    margin: 20px 0;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

button.email-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    background: #ffffff;
}

/* --- Pop-up Modal Styles --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--accent);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    color: var(--gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover { color: var(--accent); }

.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; margin-bottom: 8px; color: var(--accent); font-size: 0.9rem; font-weight: bold; }
.input-group input, .input-group textarea {
    width: 100%;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    box-sizing: border-box;
}
.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: #000;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}
.submit-btn:hover { background: white; transform: scale(1.02); }