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

/* Colors & typography */

:root {
    --bg-dark: #070a12;
    --bg-dark-translucent: #070a12d9;
    --bg-card: #0d121f;
    --bg-card-border: #1e293b;
    --bg-hero-gradient: radial-gradient(
        circle at 10% 10%, 
        rgba(0, 212, 254, 0.12) 0%, 
        rgba(7, 10, 18, 1) 50%
    );
    --text-primary: #f8fafc;
    --text-secondary: #00c3fec5;
    --text-muted: #94a3b8;
    --accent-cyan: #00d4fe;
    --accent-green: #10b981;
}

/* Global styles */

html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
}

body {
    min-height: 100vh;
}

.stack-section,
.projects-section,
.about-section,
.contact-section  {
    padding: 3rem 1.5rem;
    background-color: var(--bg-dark);
    scroll-margin-top: 80px;
}

.project-title,
.stack-category-title,
.about-card-title  {
    font-size: 1.25rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.project-description,
.about-description {
    color: var(--text-muted);
    margin: 1rem;
}

.about-card,
.project-card,
.stack-card,
.contact-card {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Shared containers */

.hero-container,
.projects-container,
.stack-container,
.about-container,
.contact-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Grids */

.projects-grid, 
.stack-grid, 
.about-grid {
    margin-top: 1.5rem;
    gap: 2rem;
}

/* Header and navigation styles */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark-translucent);
    z-index: 1000;
    border-bottom: 1px solid var(--bg-card-border);
    backdrop-filter: blur(10px);
}

header nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    width: 100%;
    margin: 0 auto;
}

ul {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.logo {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 1.05rem;
}

.logo-sufix,
.name {
    color: var(--accent-cyan);
}

.btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--text-secondary);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease-in-out,
        color 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
    transform: scale(1.025);
}

/* CV button exception */

header nav ul .btn {
    display: inline-block;
    width: auto;
    padding: 0.4rem 1rem;
}

header nav ul.is-open .btn {
    display: inline-block;
    width: auto;
    padding: 0.4rem 1rem;
    margin-right: 1rem;
}


/* Hamburger menu styles - visible on mobile */

.hamburger {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 0.75rem;
    padding: 0.45rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Menu hidden by default on mobile */

header nav ul {
    display: none;
}

header nav ul.is-open {
    position: absolute;
    top: 100%;
    right: 0;
    width: max-content;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--bg-dark-translucent);
    border: 1px solid var(--bg-card-border);
    border-radius: 0 0 0.75rem 0.75rem;
    backdrop-filter: blur(10px);
}

header nav ul a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

header nav ul a:hover {
    color: var(--accent-cyan);
}

/* Language switcher */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-switcher a {
    padding: 0.5rem 0.5rem;
    font-weight: bold;
}

.lang-switcher a[aria-current="page"] {
    color: var(--accent-cyan);
}

/* Hero section styles */

.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 3rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background: var(--bg-hero-gradient);
}

.hero-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    text-align: left;
}

.status-badge {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    background-color: var(--bg-card);
    margin-bottom: 1rem;
    border: 1px solid var(--bg-card-border);
    border-radius: 0.75rem;
    width: fit-content;
    padding: 0.25rem 0.75rem;
}

.status-dot {
    color: var(--accent-green);
    font-size: 1.25rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-bottom: 2rem;
}

/* Terminal styles */

.linux-term {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 0.75rem;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    font-family: monospace;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background-color: #111827;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-card-border);
}

.terminal-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.terminal-icon {
    color: var(--accent-cyan);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.terminal-body {
    padding: 1rem;
    font-size: 0.9rem;
    overflow-x: auto;
}

.prompt-user {
    color: var(--accent-green);
    font-weight: bold;
}

.prompt-location {
    color: var(--accent-cyan);
}

.command {
    color: var(--text-primary);
}

/* Project section styles */

.project-tech {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tech-tag {
    display: inline-block;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--bg-card-border);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    margin: 0.25rem;
}

.project-card .btn {
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.project-badges img {
    height: 20px;
}

/* Tech stack section styles */

.stack-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.stack-items {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stack-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-card);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--bg-card-border);
    border-radius: 0.5rem;
    font-size: 0.75rem;
}

/* About section styles */ 

.check {
    color: var(--accent-green)
}

/* Contact section styles */

.contact-card p {
    text-align: center;
    color: var(--text-muted);
}

.contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.contact-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.2s ease-in-out;
}

.contact-links a:hover {
    color: var(--accent-cyan);
    transform: scale(1.125);
}

.contact-links svg {
    width: 2rem;
    height: 2rem;
    fill: currentColor;
}

/* Footer */

footer {
    padding: 1.5rem;
    background-color: var(--bg-dark);
    border-top: 1px solid var(--bg-card-border);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.875rem;
}

/* Media queries */

@media (min-width: 768px) {

    .hamburger {
        display: none;
    }

    header nav {
        padding: 1.25rem 2rem;
    }

    header nav ul {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
        gap: 2rem;
        background-color: transparent;
        border: none;
    }

    .hero-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 3rem;
    }

    .terminal-card {
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: row;
        width: auto;
    }

    .hero-buttons .btn {
        display: inline-block;
        width: auto;
    }

    .projects-grid,
    .about-grid  {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .stack-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {

    .hero-container {
        grid-template-columns: 1.2fr 1fr;
        gap: 4rem;
    }

    h1 {
        font-size: 4rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1.15rem;
        max-width: 650px;
    }

    .terminal-body {
        padding: 1.5rem;
        font-size: 0.95rem;
    }

    .project-card .btn {
        display: block;
        width: fit-content;
    }

    .stack-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}