/* ============================
   RESET & VARIABEL
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #0d0d0d;
    --color-bg-alt: #131313;
    --color-card: #161616;
    --color-text: #f5f5f5;
    --color-text-dim: #a3a3a3;
    --color-accent: hwb(111 2% 46%);
    --color-accent-dim: rgba(49, 241, 15, 0.15);
    --color-accent-border: rgba(49, 241, 15, 0.25);
    --font-main: 'Segoe UI', Arial, sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    --max-width: 1100px;
}

::selection {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}

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

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

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


html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(160deg, #0d0d0d 0%, #0d1f0d 55%, #0a2e0a 100%);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================
   LOADING SCREEN
============================ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-text {
    color: var(--color-text);
    font-size: 0.9rem;
    opacity: 0.7;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
    animation: fadeInWelcome 0.8s ease;
}

.welcome-name {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 30px;
    animation: fadeInWelcome 0.8s ease 0.2s backwards;
}

@keyframes fadeInWelcome {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.progress-bar-container {
    width: 220px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
    transition: width 0.2s ease;
}

.progress-text {
    margin-top: 12px;
    color: var(--color-accent);
    font-size: 0.85rem;
    font-family: monospace;
}

/* ============================
   HERO
============================ */
.hero {
    position: relative;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45) saturate(1.1);
}

.cover-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 260px;
    background: linear-gradient(180deg, rgba(13,13,13,0) 0%, var(--color-bg) 95%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: -70px auto 0 auto;
    padding: 0 24px 70px 24px;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 40px auto;
    flex-wrap: wrap;
    width: fit-content;
}

.navbar a,
.navbar a:visited {
    color: var(--color-text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-accent-border);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.navbar a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.navbar a.active {
    background: var(--color-accent-dim);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.hero h1 {
    text-align: left;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-accent);
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-shadow: 0 0 25px #1c940740;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    max-width: 560px;
}

.hero-eyebrow {
    color: var(--color-accent);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 6px;
}

.hero-text h2 {
    font-size: 2rem;
    color: var(--color-text);
    line-height: 1.25;
}

.hero-text .subtitle {
    font-size: 1.1rem;
    margin-top: 8px;
    color: var(--color-text-dim);
}

.hero-text .tagline {
    font-size: 1rem;
    margin-top: 14px;
    opacity: 0.85;
    font-style: italic;
    min-height: 1.6em;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    background: var(--color-accent);
    color: #0a0a0a;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(49, 241, 15, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--color-accent-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

.profile-pic {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    border-radius: 20px;
    object-fit: cover;
    border: 1px solid var(--color-accent-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

/* Fade-letter tagline animation */
.fade-letter {
    display: inline-block;
    opacity: 0;
    animation: fadeInLetter 0.45s ease forwards;
}

@keyframes fadeInLetter {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   SECTIONS (SHARED)
============================ */
section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 70px 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 1.8rem;
    color: var(--color-accent);
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
    padding-bottom: 6px;
}

.section-divider {
    height: 1px;
    max-width: var(--max-width);
    margin: 0 auto;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-accent-border) 50%,
        transparent 100%);
}

.about p {
    color: var(--color-text-dim);
    max-width: 720px;
    font-size: 1.05rem;
}

/* ============================
   SKILLS
============================ */
.skills ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.skills li {
    background: var(--color-card);
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid var(--color-accent-border);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.skills li i {
    font-size: 1.2rem;
}

/* ============================
   PROJECTS
============================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--color-card);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
}

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

.project-img-wrap {
    overflow: hidden;
    height: 180px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.06);
}

.project-info {
    padding: 18px 20px 22px 20px;
}

.project-info h3 {
    color: var(--color-accent);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.project-info p {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.project-info a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s, color 0.25s;
}

.project-info a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ============================
   FUN FACTS
============================ */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.fact-card {
    background: var(--color-card);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

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

.fact-icon {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.fact-card p {
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

/* ============================
   CONTACT
============================ */
.contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.contact li i {
    font-size: 1.1rem;
    color: var(--color-accent);
    width: 22px;
}

.contact a {
    color: var(--color-text-dim);
    text-decoration: none;
    transition: color 0.25s;
}

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

/* ============================
   FOOTER
============================ */
.site-footer {
    text-align: center;
    padding: 30px 20px 50px 20px;
    color: var(--color-text-dim);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================
   BACK TO TOP
============================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #0d0d0d;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    z-index: 500;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero h1 {
        text-align: center;
    }

    .profile-pic {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 600px) {
    .hero-inner {
        padding: 0 16px 50px 16px;
    }

    section {
        padding: 50px 16px;
    }

    .cover-image {
        height: 180px;
    }

    .cover-image::after {
        height: 180px;
    }
}