/* --- Global Styles & Variables --- */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #e60000;
    --accent-color: #c00000;
    --light-bg: #2a2a2a;
    --dark-bg: #121212;
    --text-color: #e0e0e0;
    --light-text: #ffffff;
    --spacing-unit: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: var(--spacing-unit);
    color: var(--light-text);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: var(--spacing-unit) 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--light-text);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: var(--light-text);
    font-weight: 600;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Main Content & Footer --- */
main {
    flex: 1;
    padding: calc(var(--spacing-unit) * 2) 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

section {
    margin-bottom: calc(var(--spacing-unit) * 2);
    background-color: var(--primary-color);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: var(--spacing-unit);
    margin-top: auto;
}

/* --- Page: Home --- */
.welcome-section {
    text-align: center;
    padding: calc(var(--spacing-unit) * 3) var(--spacing-unit);
    background: none;
    box-shadow: none;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quick-link-card {
    background-color: var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-color);
    border: 1px solid var(--light-bg);
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary-color);
}

.quick-link-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.quick-link-card h3 {
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.quick-link-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- Page: My Work --- */
.work-section {
    max-width: 1200px;
    margin: 0 auto;
}

.section-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #a3a3a3;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #444;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.placeholder-image {
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.placeholder-image i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.project-details {
    padding: 1.5rem;
}

.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.project-details h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.project-details p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tech span {
    font-size: 0.8rem;
    background-color: rgba(230, 0, 0, 0.1);
    color: var(--secondary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.project-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
}


/* --- Page: Socials --- */
.socials-section {
    max-width: 1200px;
    margin: 0 auto;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.social-card {
    display: flex;
    align-items: center;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid #444;
}

.social-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.social-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.social-icon i {
    margin: 0;
}

.github .social-icon {
    background-color: #24292e;
    color: white;
}

.twitter .social-icon {
    background-color: #1da1f2;
    color: white;
}

.linkedin .social-icon {
    background-color: #0077b5;
    color: white;
}

.discord .social-icon {
    background-color: #7289da;
    color: white;
}

.social-details h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.2rem;
}

.social-details p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #aaa;
}

.social-handle {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-form-container {
    background-color: var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--light-bg);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group:nth-child(3),
.form-group:nth-child(4) {
    grid-column: span 2;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

input, textarea {
    padding: 0.75rem;
    border: 1px solid #444;
    background-color: var(--dark-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.2);
}

.submit-btn {
    grid-column: span 2;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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


/* --- Page: Resume --- */
.resume-section {
    max-width: 1000px;
    margin: 0 auto;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skill-category h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.skill-category h4 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.skill-card {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #444;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.skill-header h4 a {
    color: var(--light-text);
}

.skill-level {
    width: 100px;
    height: 8px;
    background-color: #555;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--secondary-color);
}

.skill-progress.beginner { width: 30%; }
.skill-progress.intermediate { width: 60%; }
.skill-progress.proficient { width: 85%; }

.skill-tag {
    display: inline-block;
    font-size: 0.75rem;
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skill-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
}

/* --- Page: Specs & Equipment (New Card Styles) --- */

.specs-category {
    margin-bottom: 3rem;
}

.specs-category h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.spec-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.spec-item-card {
    background-color: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
}

.spec-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.spec-item-icon {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
}

.spec-item-icon i {
    font-size: 3rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.spec-item-card:hover .spec-item-icon i {
    transform: scale(1.1);
}

.spec-item-details {
    padding: 1.5rem;
    flex-grow: 1;
}

.spec-item-tag {
    display: inline-block;
    font-size: 0.75rem;
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.spec-item-details h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--light-text);
}

.spec-item-description {
    font-size: 0.9rem;
    color: #aaa;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
}

.spec-item-card:hover .spec-item-description {
    margin-top: 1rem;
    max-height: 200px; /* Expands to this height */
    opacity: 1;
}

/* --- Page: 404 --- */
.not-found-container {
    margin: 10px auto;
    max-width: 600px;
    text-align: center;
}
.not-found-container h1 {
    margin: 30px 0;
    font-size: 4em;
    line-height: 1;
    letter-spacing: -1px;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: var(--spacing-unit);
        right: var(--spacing-unit);
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }

    nav.active {
        max-height: 300px;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: var(--spacing-unit);
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.5rem 0;
    }

    section {
        padding: var(--spacing-unit);
    }

    .work-grid,
    .social-grid,
    .skill-grid,
    .specs-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .submit-btn {
        grid-column: span 1;
    }

    .skill-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}