/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    line-height: 1.6;
    color: #f8f8f2;
    background: linear-gradient(135deg, #282a36 0%, #1e1f2e 100%);
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* Navigation */
.main-nav {
    margin-bottom: 1rem;
    text-align: right;
}

.nav-link {
    color: #8be9fd;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff79c6;
}

/* Typography */
h1 {
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #50fa7b;
    text-shadow: 0 0 10px rgba(80, 250, 123, 0.3);
}

h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.2rem;
    color: #8be9fd;
    border-bottom: 2px solid #44475a;
    padding-bottom: 0.8rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #ff79c6;
}

h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: #ffb86c;
}

p {
    margin-bottom: 1rem;
    color: #f8f8f2;
    line-height: 1.7;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid #44475a;
    background: rgba(68, 71, 90, 0.2);
    border-radius: 12px;
    padding: 3rem 2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #bd93f9;
    font-weight: 400;
    margin-top: 1rem;
}

/* Main content */
main {
    margin-bottom: 3rem;
}

section {
    margin-bottom: 4rem;
}

/* About section styling */
.about {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Skills grid */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(80, 250, 123, 0.15);
    border-color: #50fa7b;
}

.skill-category ul {
    list-style: none;
    margin-top: 1rem;
}

.skill-category li {
    padding: 0.6rem 0;
    color: #f8f8f2;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.skill-category li {
    text-indent: -1rem;
    padding-left: 1rem;
}

.skill-category li:before {
    content: "▶ ";
    color: #ff79c6;
    margin-right: 0.2rem;
    font-size: 0.8rem;
}

.skill-category li[style*="margin-left"]:before {
    content: "";
    margin-right: 0;
}

.skill-category li:hover {
    color: #50fa7b;
}

/* Projects */
.project-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.project {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(139, 233, 253, 0.15);
    border-color: #8be9fd;
}

.project.featured {
    border-left: 4px solid #ff79c6;
    background: linear-gradient(135deg, #44475a 0%, #4a4d6a 100%);
}

.project h3 {
    margin-bottom: 1rem;
    color: #ffb86c;
    font-size: 1.3rem;
}

.project p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #f8f8f2;
}

.project-links {
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-block;
    color: #8be9fd;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 2px solid #8be9fd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 1rem;
    background: rgba(139, 233, 253, 0.1);
}

.project-link:hover {
    background: #8be9fd;
    color: #282a36;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 233, 253, 0.4);
}

.tech {
    font-size: 0.9rem;
    color: #bd93f9;
    font-style: italic;
    display: block;
    margin-top: 1rem;
    font-family: 'Fira Code', monospace;
}

/* Philosophy section */
.philosophy {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.philosophy strong {
    color: #50fa7b;
    text-shadow: 0 0 5px rgba(80, 250, 123, 0.3);
}

/* Footer */
footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    padding: 3rem 2rem;
    border-top: 2px solid #44475a;
    margin-top: 4rem;
    background: rgba(68, 71, 90, 0.2);
    border-radius: 12px;
}

.contact h3 {
    margin-bottom: 1rem;
    color: #ffb86c;
}

.contact p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.email, .matrix {
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    background: rgba(68, 71, 90, 0.6);
    color: #50fa7b;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid #6272a4;
}

.matrix {
    cursor: pointer;
    transition: all 0.2s ease;
}

.matrix:hover {
    background: rgba(80, 250, 123, 0.2);
    border-color: #50fa7b;
}

.contact {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    grid-column: 2;
    grid-row: 1 / 3;
    justify-content: center;
}

.link {
    color: #8be9fd;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border: 2px solid #8be9fd;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    background: rgba(139, 233, 253, 0.05);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(139, 233, 253, 0.1);
}

.link:hover {
    background: #8be9fd;
    color: #282a36;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 233, 253, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .skill-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    footer {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 2rem;
        text-align: center;
    }
    
    .contact {
        grid-row: 1;
        grid-column: 1;
    }
    
    .links {
        grid-row: 2;
        grid-column: 1;
    }
    
    .links {
        justify-content: center;
    }
    
    header {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .project-link {
        display: block;
        text-align: center;
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .link {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    footer {
        padding: 2rem 1rem;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #282a36;
}

::-webkit-scrollbar-thumb {
    background: #44475a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6272a4;
}

/* Subtle animations */
@media (prefers-reduced-motion: no-preference) {
    .project, .skill-category, .link, .project-link {
        transition: all 0.3s ease;
    }
    
    .skill-category li {
        transition: all 0.2s ease;
    }
}

/* Impressum styling */
.impressum {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    margin: 4rem auto 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.impressum h2 {
    color: #ffb86c;
    margin-bottom: 2rem;
}

.impressum p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.impressum strong {
    color: #8be9fd;
}

/* Blog styling */
.blog {
    margin: 4rem 0;
}

.blog-posts {
    margin-bottom: 2rem;
}

.blog-post-preview {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.blog-post-preview:hover h3 {
    color: #ff79c6;
}

.blog-post-preview h3 {
    margin-bottom: 0.5rem;
}

.blog-link {
    color: #8be9fd;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.blog-link:hover {
    color: #50fa7b;
}

.blog-date {
    color: #6272a4;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: #f8f8f2;
    line-height: 1.6;
}

.blog-content {
    background: linear-gradient(135deg, #44475a 0%, #3a3c4e 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #6272a4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.blog-close {
    background: #ff79c6;
    color: #282a36;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: background 0.3s ease;
}

.blog-close:hover {
    background: #ff92d0;
}

#blog-post-content h1,
#blog-post-content h2,
#blog-post-content h3 {
    color: #8be9fd;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#blog-post-content h1:first-child {
    margin-top: 0;
    color: #50fa7b;
}

#blog-post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

#blog-post-content pre {
    background: #282a36;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #44475a;
}

#blog-post-content code {
    background: #282a36;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: inherit;
    color: #50fa7b;
}

#blog-post-content pre code {
    background: transparent;
    padding: 0;
}

#blog-post-content ul,
#blog-post-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

#blog-post-content li {
    margin-bottom: 0.5rem;
}

#blog-post-content blockquote {
    border-left: 4px solid #ff79c6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #bd93f9;
    font-style: italic;
}

/* Blog preview link styling */
.blog-post-preview-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-post-preview-link .blog-post-preview {
    cursor: pointer;
}

.blog-post-preview-link:hover .blog-post-preview h3 {
    color: #ff79c6;
}

/* Selection styling */
::selection {
    background: #ff79c6;
    color: #282a36;
}

::-moz-selection {
    background: #ff79c6;
    color: #282a36;
}