/* General Styles */
:root {
    /* UPDATED: Defining both colors from the logo's gradient */
    --primary-color-light: #0e88eb;
    --primary-color-dark: #0a209a;
    --secondary-color: #1a1a1a;
    --bg-color: #f4f4f9;
    --text-color: #333;
    --light-text: #fff;
    
    /* NEW: A variable for rounded corners, inspired by the logo */
    --border-radius-main: 12px; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* Header */
header {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo { display: block; width: fit-content; }
.logo img { height: 40px; display: block; }

/* Main Content */
main { flex: 1; }

/* Hero Section */
#hero {
    text-align: center;
    padding: 4rem 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

#hero h2 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--secondary-color); }
#hero p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 2rem auto; color: #555; }

/* UPDATED: Button styling to match the logo */
.btn {
    display: inline-block;
    /* Using the gradient from the logo */
    background: linear-gradient(0deg, var(--primary-color-dark), var(--primary-color-light));
    color: var(--light-text);
    padding: 0.8rem 1.8rem;
    /* Applying the rounded corners */
    border-radius: var(--border-radius-main);
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 10px rgba(14, 136, 235, 0.3);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(14, 136, 235, 0.4);
}

/* Latest Content Sections */
#latest-videos, #latest-repos { padding: 3rem 0; }
#latest-repos { background-color: #fff; }
#latest-videos h3, #latest-repos h3 { text-align: center; font-size: 2rem; margin-bottom: 2rem; }

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.loading-text, .error-text { text-align: center; grid-column: 1 / -1; font-size: 1.2rem; color: #666; }

/* UPDATED: Card styling with rounded corners */
.video-card, .repo-card {
    background: #fff;
    /* Applying the rounded corners */
    border-radius: var(--border-radius-main);
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.video-card:hover, .repo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.video-thumbnail { position: relative; width: 100%; padding-top: 56.25%; }
.video-thumbnail img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.video-info { padding: 1rem; }
.video-info h4 { margin: 0 0 0.5rem 0; font-size: 1.1rem; }
.video-info a:hover h4 { color: var(--primary-color-light); }

.repo-card { padding: 1.5rem; display: flex; flex-direction: column; }
.repo-card h4 { margin: 0 0 0.75rem 0; font-size: 1.2rem; }
.repo-card h4 .fab { margin-right: 8px; }
.repo-card p { margin: 0; color: #555; font-size: 0.95rem; line-height: 1.5; }
.repo-card a:hover h4 { color: var(--primary-color-light); }

/* Footer */
footer { background-color: var(--secondary-color); color: var(--light-text); padding: 2rem 0; margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
.contact-info a { color: var(--light-text); }
.contact-info a:hover { color: var(--primary-color-light); }

/* UPDATED: Footer titles with a gradient underline */
.footer-content h4 {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: none; /* Removing the old solid border */
}

.footer-content h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--primary-color-dark), var(--primary-color-light));
}

/* NEW: Styling for social icons to match the theme */
#social-icons { display: flex; gap: 0.75rem; font-size: 1.2rem; }
#social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2a2a2a;
    transition: background 0.3s, transform 0.2s;
}
#social-icons a:hover {
    transform: translateY(-3px);
    background: linear-gradient(45deg, var(--primary-color-dark), var(--primary-color-light));
}

.copyright { text-align: center; border-top: 1px solid #333; padding-top: 1rem; font-size: 0.9rem; color: #aaa; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero h2 { font-size: 2rem; }
    #hero p { font-size: 1rem; }
    .footer-content { flex-direction: column; gap: 2rem; text-align: center; align-items: center; }
}