/* ---------------------------
   Global Reset & Base
---------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(138,180,248,0.08), transparent 40%),
        radial-gradient(800px 500px at 90% 10%, rgba(255,255,255,0.04), transparent 35%),
        linear-gradient(180deg, #0f0f0f, #121212 40%, #101010);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
    z-index: -1;
}

.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
}

.bg-orbs::before,
.bg-orbs::after {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    opacity: 0.12;
    animation: float 25s linear infinite;
}

.bg-orbs::before {
    background: #8ab4f8;
    top: -150px;
    left: -150px;
}

.bg-orbs::after {
    background: #ffffff;
    bottom: -200px;
    right: -200px;
    animation-duration: 35s;
}

@keyframes float {
    0%   { transform: translate(0, 0); }
    50%  { transform: translate(120px, 80px); }
    100% { transform: translate(0, 0); }
}

#portfolio {
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.03),
        rgba(255,255,255,0.01)
    );
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 20px 60px rgba(0,0,0,0.6);
}

/* ---------------------------
   Header & Navigation
---------------------------- */
header {
    background: #1f1f1f;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 1000; 
}

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

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.links {
    display: flex;
    gap: 20px;
}

.links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 10px;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
}

.links a:hover {
    color: #8ab4f8;
    background: rgba(255, 255, 255, 0.05);
}

/* ---------------------------
   Main Content Area
---------------------------- */
main {
    padding: 30px 20px;
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.box {
    background: #1e1e1e;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #f0f0f0;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* ---------------------------
   Footer
---------------------------- */
footer {
    background: #1f1f1f;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    color: #888;
    font-size: 14px;
    border-top: 1px solid #333;
}

/* ---------------------------
   Mobile Responsive
---------------------------- */
@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .box {
        padding: 20px;
    }
}

/* ---------------------------
   Loading UI
---------------------------- */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20,20,20,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 1.1em;
    color: #fff;
    transition: opacity 0.3s;
}

.loading-bar {
    width: 120px;
    height: 8px;
    background: #222;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.loading-bar-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #8ab4f8, #fff);
    border-radius: 4px;
    animation: loading-bar-anim 1.2s linear infinite;
}

.loading-bar-inner.animated {
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, #4fc3f7, #1976d2);
  border-radius: 4px;
  animation: loading-bar-move 1.2s linear infinite;
}

@keyframes loading-bar-anim {
    0% { width: 0%; }
    50% { width: 90%; }
    100% { width: 0%; }
}

@keyframes loading-bar-move {
  0% { margin-left: 0%; }
  100% { margin-left: 70%; }
}
