/*
 * Copyright (c) 2026 EnkryptattuDev, privadency.com
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

/* variables */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-card: #0d0d0d;
    --border-color: #222222;
    --border-hover: #333333;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #ffffff;
    --accent-dim: #666666;
    --glow: rgba(255, 255, 255, 0.1);
    --font-mono: "JetBrains Mono", monospace;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --nav-height: 60px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

::selection {
    background: var(--text-primary);
    color: var(--bg-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.navbar.visible {
    transform: translateY(0);
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}

.nav-logo:hover {
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

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

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* hero */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.glitch-name {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 0 30px var(--glow);
    white-space: nowrap;
    display: inline-block;
    min-width: 14ch;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2rem;
}

.quick-links {
    display: flex;
    gap: 1.5rem;
}

.quick-links a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-medium);
}

.quick-links a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.quick-links svg {
    width: 22px;
    height: 22px;
}

/* scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.scroll-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator svg {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* sections */
.section {
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.title-bracket {
    color: var(--text-muted);
    font-weight: 300;
}

/* about */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-medium);
}

.about-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.about-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.about-header svg {
    width: 18px;
    height: 18px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.about-card p strong {
    color: var(--text-primary);
}

.about-card .subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-medium);
}

.skill-category:hover {
    border-color: var(--border-hover);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-category h3 svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.skill-tag.learning {
    border-color: var(--text-muted);
    color: var(--text-muted);
    font-style: italic;
}

/* projects */
.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-medium);
    display: block;
}

.project-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.05);
}

.project-card.featured {
    border-color: var(--border-hover);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    padding: 4px;
}

.project-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.project-badge {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.project-card:hover .project-link {
    color: var(--text-primary);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

/* contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    transition: var(--transition-medium);
}

.contact-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-4px);
}

.contact-card svg {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.contact-card:hover svg {
    color: var(--text-primary);
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-handle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-card:hover .contact-handle {
    color: var(--text-primary);
}

/* footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-sub {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.footer .heart {
    color: #e25555;
}

/* animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    animation: fadeIn 1s ease-out;
}

.section {
    animation: fadeIn 0.8s ease-out;
}

/* responsive */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 2rem 0;
    }

    .glitch-name {
        letter-spacing: -1px;
        min-width: auto;
    }

    .section {
        padding: 3rem 0;
    }

    .about-content,
    .skills-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        gap: 1rem;
    }

    .quick-links a {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.75rem;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    .nav-logo {
        font-size: 0.9rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-title {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 404 */
.page-404 {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.back-home {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: var(--transition-fast);
}

.back-home:hover {
    color: var(--text-secondary);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
