/* style.css - Optimized & Lightweight */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css');

:root {
    --bg: #000;
    --fg: #fff;
    --muted: #999;
    --accent: #fff;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --glow: rgba(255, 255, 255, 0.3);
}

body.light-theme {
    --bg: #fff;
    --fg: #000;
    --muted: #666;
    --accent: #000;
    --glass: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.1);
    --glow: rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Space Grotesk", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* Loading */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.loader-dot {
    color: var(--accent);
}

.loader-bar {
    width: 200px;
    height: 5px;
    background: var(--border);
    border-radius: 10px;
    /* overflow: hidden; */
    margin-bottom: 15px;
    position: relative;
}

.loader-progress {
    height: 100%;
    background: var(--accent);
    width: 0;
    animation: load 2s ease-out forwards;
}

.loader-status {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.progress-fill {
    height: 100%;
    width: 0;
    /* background: linear-gradient(-90deg, #ff4757); */
    background: repeating-linear-gradient(90deg, #ff7f50, #ff4757 15px);
    position: relative;
    animation: load 4s linear forwards;
}

.progress-fill::after {
    content: "\f135";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -35px;
    top: -20px;
    font-size: 28px;
    display: inline-block;
    animation:
        rocket-vibrate 0.2s linear infinite,
        rocket-glow 0.2s ease-in-out infinite alternate;
    transform: rotate(45deg);
}

@keyframes rocket-vibrate {
    0% {
        transform: rotate(45deg) translate(0, 0);
    }

    25% {
        transform: rotate(46deg) translate(1px, -1px);
    }

    50% {
        transform: rotate(44deg) translate(-1px, 1px);
    }

    75% {
        transform: rotate(45deg) translate(1px, 1px);
    }

    100% {
        transform: rotate(45deg) translate(0, 0);
    }
}

@keyframes rocket-glow {
    from {
        text-shadow:
            -2px 2px 5px #ff4757,
    }

    to {
        text-shadow:
            -8px 8px 25px #ff7f50;
    }
}

@keyframes load {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.7;
        text-shadow: 0 5px 0px #ff4757;
    }

    50% {
        opacity: 1;
    }
}

/* Background */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.3;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

body.light-theme .main-header {
    background: rgba(255, 255, 255, 0.9);
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
}

.dot {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav .nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.nav .nav-link.active {
    color: var(--fg);
}

.nav .nav-link:hover {
    color: var(--fg);
    cursor: pointer;
}

.header-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--fg);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.control-btn.active {
    background: var(--accent);
    color: var(--bg);
}

.lang-label {
    font-size: 13px;
    font-weight: 900;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 10;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.skills-subtitle,
.footer-tag {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.badge {
    padding: 6px 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 44px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
}

.highlight {
    color: var(--accent);
}

.glitch {
    position: relative;
    display: inline-block;
}

.hero-desc {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin: 35px 0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-value span {
    font-size: 20px;
}

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

.hero-cta {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    text-align: center;
}

.btn.primary {
    background: var(--accent);
    color: var(--bg);
    border: 2px solid var(--accent);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow);
}

.btn.secondary {
    background: transparent;
    color: var(--fg);
    border: 2px solid var(--border);
}

.btn.secondary:hover {
    border-color: var(--accent);
    background: var(--glass);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-stack span {
    padding: 6px 12px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
}

.tech-stack span:hover {
    background: var(--border);
    transform: translateY(-2px);
}

/* Portrait */
.portrait-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.portrait {
    width: 100%;
    border-radius: 15px;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.portrait:hover {
    filter: grayscale(0%);
}

.portrait-glow {
    position: absolute;
    inset: -70px;
    background: radial-gradient(circle, var(--glow), transparent);
    border-radius: 40%;
    opacity: 1;
    filter: blur(30px);
    z-index: -1;
    animation: pulse 5s infinite;
}

/* About */
.about-text {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
}

.mission-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 35px;
    background: var(--glass);
    border: 2px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.mission-box:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.mission-icon {
    font-size: 40px;
}

.mission-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.mission-text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.skill-card {
    padding: 25px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

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

.skill-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.skill-icon {
    font-size: 28px;
}

.skill-name {
    font-size: 14px;
    font-weight: 700;
    flex: 1;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.skill-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 1.5s ease-out;
}

.skill-percent {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.lang-showcase {
    padding: 40px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.lang-showcase h3 {
    font-size: 24px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 30px;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.lang-grid span {
    padding: 10px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.lang-grid span:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

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

.project-header {
    padding: 20px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-status {
    padding: 4px 10px;
    background: var(--accent);
    color: var(--bg);
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-cat {
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.project-body {
    padding: 0 20px 25px;
}

.project-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.project-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tech span {
    padding: 4px 10px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.project-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.project-link:hover {
    transform: translateX(5px);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 35px;
    background: var(--glass);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

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

.contact-icon svg {
    color: var(--accent);
}

.contact-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.contact-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-value:hover {
    color: var(--accent);
}

/* Footer */
.footer {
    padding: 50px 0 30px;
    border-top: 1px solid var(--border);
    margin-top: 100px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.footer-tag {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
}

.footer-right {
    text-align: right;
}

.footer-right p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 5px;
}

#notfound {
    position: relative;
    height: 100vh;
}

#notfound .notfound {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.notfound .notfound-404 {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-block;
    width: 140px;
    height: 140px;
    background-image: url(../img/emoji.png);
    background-size: cover;
}

.notfound .notfound-404:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-transform: scale(2.4);
    -ms-transform: scale(2.4);
    transform: scale(2.4);
    border-radius: 50%;
    z-index: -1;
}

.notfound p {
    font-family: 'Nunito', sans-serif;
    color: #999fa5;
    font-weight: 400;
}

.notfound a {
    display: inline-block;
    font-weight: 700;
    border-radius: 40px;
    text-decoration: none;
    color: #388dbc;
    line-height: 2.5;
}

.notfound {
    max-width: 560px;
    width: 100%;
    padding-left: 160px;
    line-height: 1.1;
}

.notfound h1 {
    font-family: 'Nunito', sans-serif;
    font-size: 65px;
    font-weight: 700;
    margin-top: 0px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.notfound h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 21px;
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border);
    background: var(--bg);
    white-space: nowrap;
    position: sticky;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 999;
}

.ticker-container {
    display: inline-flex;
    padding-left: 100%;
    animation: ticker-animation 300s linear infinite;
    gap: 20px;
}

.ticker-item {
    display: flex;
    text-decoration: none;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    gap: 5px;
}

.ticker-item .pair {
    color: var(--fg);
    font-weight: 700;
    font-size: 14px;
}

.ticker-item .price {
    color: var(--muted);
    font-size: 12px;
    width: 50px;
}
.ticker-item .change {
    font-size: 12px;
    width: auto;
}
.ticker-item .change.up {
    color: #00c076;
}

.ticker-item .change.down {
    color: #cf304a;
}

.ticker-wrapper:hover .ticker-container {
    animation-play-state: paused;
    cursor: pointer;
}

.ticker-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.hero-socials {
    display: flex;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.hero-socials a {
    color: var(--muted);
    transition: color 0.3s, transform 0.3s;
}

.hero-socials a:hover {
    color: var(--muted);
    transform: translateY(-3px);
}

.tech-icon-float {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    backdrop-filter: blur(5px);
    border-radius: 50%;
    animation: float-auto 4s ease-in-out infinite;
}

.php      { top: 10%; left: 10%; animation-delay: 0s; }
.laravel  { top: 45%; left: 20%; animation-delay: 0.5s; }
.react    { bottom: 10%; left: 10%;top: 75%; animation-delay: 1s; }
.ethereum { top: 0%; left: 45%; animation-delay: 1.5s; }
.node     { top: 10%; right: 10%; animation-delay: 2s; }
.html5    { top: 45%; right: 20%; animation-delay: 2.5s; }
.css3     { bottom: 0%; right: 10%;top: 75%; animation-delay: 3s; }


@keyframes float-auto {
    0%, 100% { margin-top: -15px; }
    50% { margin-top: 15px; }
}

.php { color: #777bb4; }
.laravel { color: #ff2d20; }
.react { color: #61dafb; }
.node { color: #68a063; }
.ethereum { color: #3c3c3d; }


@keyframes ticker-animation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-right {
        max-width: 350px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .content {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 20px;
        padding-top: 10px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section {
        padding: 70px 0;
    }

    .mission-box {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .main-header {
        padding: 12px 20px;
    }

    .logo {
        font-size: 18px;
    }

    .nav .nav-link {
        font-size: 12px;
    }

    .hero-title {
        font-size: 26px;
    }

    .section-title {
        font-size: 28px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 767px) {
    .notfound {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 100px;
    }

    .notfound .notfound-404 {
        width: 100px;
        height: 100px;
    }
}