/* Base styles and variables */
:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --secondary: #1a237e;
    --dark: #212121;
    --light: #f5f5f5;
    --gray: #757575;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--secondary);
}

p {
    margin-bottom: 1rem;
}

/* Header and Navigation */
header {
    background-color: var(--dark);
    color: var(--light);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 0;
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    margin-top: 1rem;
}

nav li {
    margin-right: 1.5rem;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hero section */
#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23d32f2f"/><path d="M0 0L100 100" stroke="%231a237e" stroke-width="2"/><path d="M100 0L0 100" stroke="%231a237e" stroke-width="2"/></svg>');
    background-size: cover;
    color: var(--light);
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 8px;
}

#hero h2 {
    font-size: 2.5rem;
    border: none;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Articles and content blocks */
article {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary);
    background-color: rgba(211, 47, 47, 0.05);
    border-radius: 0 8px 8px 0;
}

/* Buttons */
button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Forms */
form {
    max-width: 600px;
}

form div {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light);
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

/* Grid layouts */
#skills > div, #projects > div, #music > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        text-align: center;
        padding: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    main {
        padding: 1rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    #hero h2 {
        font-size: 2rem;
    }
    
    #skills > div, #projects > div, #music > div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
}