:root {
    --bg-color: #001524;
    --text-color: #ffffff;
    --header-bg: rgba(2, 43, 73, 0.27);
    --accent: #15616D;
    --card-bg: #022b4945;
    --card-border: rgba(255, 255, 255, 0.05);
    --muted-text: #8892b0;
    --tech-text: #ccd6f6;
    --nav-mobile-bg: #001524;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

[id] {
    scroll-margin-top: 90px;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --header-bg: rgba(255, 255, 255, 0.8);
    --accent: #15616D;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.1);
    --muted-text: #475569;
    --tech-text: #1e293b;
    --nav-mobile-bg: #ffffff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 5%;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

.logo h1 {
    display: flex;
    align-items: baseline;
    margin: 0;
    font-size: 1.5rem;
}

.logo span {
    display: inline-block;
    position: relative;
    width: 10px;
    height: 10px;
    margin: 0 5px;
}

.logo span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    border-radius: 50%;
}

.nav-container {
    display: contents;
}

.links {
    justify-self: center;
    display: flex;
    gap: 25px;
}

.links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 800;
    position: relative;
}

.links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s;
}

.links a:hover::after {
    width: 100%;
}

.actions {
    justify-self: end;
    display: flex;
    gap: 12px;
}

.actions button {
    all: unset;
    box-sizing: border-box;
    color: var(--text-color);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    border-radius: 4px;
}

.actions button img {
    width: 25px;
}

[data-theme="light"] .actions button img {
    filter: invert(1) brightness(0.2);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

@media (max-width: 900px) {
    header {
        display: flex;
        justify-content: space-between;
        padding: 20px 20px;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--nav-mobile-bg);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 50px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
    }

    .nav-container.active {
        right: 0;
    }

    .links {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .links a {
        font-size: 1.8rem;
        margin: 0;
        padding: 10px;
    }

    .actions {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        gap: 20px;
    }

    .actions button {
        font-size: 1rem;
        padding: 12px 24px;
        background-color: var(--accent);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
/* 
/  HERO Section
*/
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    background-image: radial-gradient(circle at 10% 20%, rgba(21, 97, 109, 0.1) 0%, transparent 40%);
}

.content {
    max-width: 750px;
}

.accent {
    color: var(--accent);
    font-weight: 700;
}

.code-text {
    font-family: 'Courier New', monospace;
    color: var(--accent);
    font-size: 1rem;
    display: block;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1;
    margin: 0 0 25px 0;
    letter-spacing: -2px;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted-text);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 550px;
}

.cta-group {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-link {
    background: var(--accent);
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: 0.3s;
}

.main-link:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent);
}

.sub-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    transition: 0.3s;
}

.sub-link:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .hero {
        padding: 0 5%;
        text-align: center;
        justify-content: center;
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    .cta-group {
        flex-direction: column;
        gap: 20px;
    }
}
/* 
/  Projects Section
*/
.projects {
    padding: 100px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header span {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.project-type {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.project-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.project-desc {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.project-tech li {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--tech-text);
    opacity: 0.7;
}

.project-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.project-links svg {
    width: 20px;
    height: 20px;
    stroke: var(--tech-text);
    transition: 0.3s;
}

.project-links a:hover svg {
    stroke: var(--accent);
    transform: scale(1.1);
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: var(--muted-text);
    padding: 50px;
}
/*
/    CONTACT Section
*/
.contact {
    padding: 80px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact .section-header h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 8px;
}

.social-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: rgba(128, 128, 128, 0.05);
    border-radius: 4px;
    text-decoration: none;
    color: var(--tech-text);
    font-family: 'Courier New', monospace;
    font-weight: 800;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
}

.social-item:hover {
    background: rgba(21, 97, 109, 0.1);
    border-color: var(--accent);
    color: var(--text-color);
    transform: translateY(-3px);
}

.footer {
    padding: 40px 10%;
    background-color: var(--bg-color);
    border-top: 1px solid var(--card-border);
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Courier New', monospace;
}

.copyright {
    font-weight: 800;
    color: var(--text-color);
}

.footer-meta {
    text-align: right;
    color: var(--muted-text);
    font-size: 0.85rem;
}

.footer-meta span a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.stack-icons {
    font-size: 0.75rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .footer-meta {
        text-align: center;
    }
}