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

body {
    font-family: 'Crimson Text', 'Georgia', 'Book Antiqua', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e8e6e3;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(74, 0, 128, 0.1) 0%, transparent 50%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(to bottom, #1a0033 0%, #0a0a0a 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #4a0080;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.3);
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

header nav a {
    color: #b8b5b0;
    text-decoration: none;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

header nav a:hover {
    color: #ff6b6b;
    text-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b;
}

main {
    margin-top: 60px;
}

.hero {
    background: linear-gradient(135deg, #1a0033 0%, #4a0080 50%, #8b0000 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23000000" fill-opacity="0.2" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,90.7C1248,85,1344,107,1392,117.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 30px rgba(138, 43, 226, 0.5);
    letter-spacing: 3px;
    position: relative;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero .subtitle {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.btn {
    display: inline-block;
    background: transparent;
    color: #ff6b6b;
    padding: 12px 30px;
    border: 2px solid #ff6b6b;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

.btn:hover {
    background: #ff6b6b;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6), inset 0 0 20px rgba(255, 107, 107, 0.2);
    transform: scale(1.05);
}

.section {
    padding: 80px 0;
    background: #0a0a0a;
    border-top: 1px solid #2a2a2a;
}

.section:nth-child(even) {
    background: linear-gradient(to bottom, #0f0f0f, #0a0a0a);
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 20px rgba(255, 107, 107, 0.3);
    letter-spacing: 2px;
}

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

.project-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a0a3e 100%);
    padding: 2rem;
    border: 1px solid #4a0080;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4a0080, #8b0000, #4a0080);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.4rem;
}

.project-card p {
    color: #b8b5b0;
    font-size: 1.05rem;
    line-height: 1.8;
}

#contact ul {
    list-style: none;
    margin-top: 1rem;
}

#contact p {
    font-size: 1.1rem;
    line-height: 1.8;
}

#contact li {
    margin-bottom: 0.5rem;
    color: #b8b5b0;
    font-size: 1.1rem;
}

#contact a {
    color: #ff6b6b;
    text-decoration: none;
    transition: all 0.3s;
}

#contact a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.about-content p,
.profesor-content p {
    margin-bottom: 1.5rem;
    line-height: 2;
    text-align: justify;
    color: #b8b5b0;
    font-size: 1.1rem;
}

.contact-info {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1a0033 0%, #4a0080 100%);
    color: white;
    border: 2px solid #ff6b6b;
    border-radius: 0;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.2);
}

footer {
    background: #000000;
    color: #666;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #4a0080;
    font-size: 0.9rem;
}

/* Writer Profile Styles */
.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.portrait {
    flex-shrink: 0;
}

.writer-portrait {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff6b6b;
    filter: grayscale(100%);
    display: block;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
}

.writer-profile {
    max-width: 800px;
    margin: 0 auto;
}

.writer-info {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a0a3e 100%);
    border: 1px solid #4a0080;
}

.writer-info h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.writer-info p {
    color: #b8b5b0;
    margin-bottom: 2rem;
}

.writer-info p:last-child {
    margin-bottom: 0;
}

.featured-work {
    font-style: italic;
}

/* General link styles */
a {
    color: #ff6b6b;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: #ff8c8c;
    border-bottom-color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

a:visited {
    color: #d155d1;
}

a:visited:hover {
    color: #e066e0;
    border-bottom-color: #d155d1;
}

/* Book links - match header link styling */
.writer-info p a {
    color: #b8b5b0;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: none;
}

.writer-info p a:hover {
    color: #ff6b6b;
    text-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b;
    border-bottom: none;
}

.writer-info p a:visited {
    color: #b8b5b0;
}

.writer-info p a:visited:hover {
    color: #ff6b6b;
    text-shadow: 0 0 10px #ff6b6b, 0 0 20px #ff6b6b;
}

.books {
    margin-bottom: 3rem;
}

.back-link {
    text-align: center;
    margin-top: 3rem;
}

/* Mobile menu toggle button */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #b8b5b0;
    color: #b8b5b0;
    padding: 8px 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: inherit;
}

.menu-toggle:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
    text-shadow: 0 0 10px #ff6b6b;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        margin: 0 auto;
    }
    
    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        margin-top: 1rem;
    }
    
    header nav ul.menu-open {
        max-height: 400px;
        transition: max-height 0.5s ease-in;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .portrait {
        order: 2;
        margin-top: 1.5rem;
    }
    
    .hero-text {
        order: 1;
    }
    
    .writer-portrait {
        width: 150px;
        height: 150px;
        margin-bottom: 1rem;
    }
}