/* --- CSS VARIABLES & THEME CONFIGURATION --- */
:root {
    --bg-dark: #0a0f1d;
    --bg-card: #111827;
    --bg-card-alt: #1f293d;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary-blue: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.3);
    --border-color: rgba(255, 255, 255, 0.08);
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.bg-alt {
    background-color: rgba(17, 24, 39, 0.5);
}

.text-center {
    text-align: center;
}

/* --- TYPOGRAPHY & HEADINGS --- */
.section-tag {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.875rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.section-desc {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.title-bar {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
    margin: 1rem auto 3rem;
    border-radius: 2px;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.25rem 0;
    background: rgba(10, 15, 29, 0.6);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(10, 15, 29, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.logo-accent {
    color: var(--accent-cyan);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-cyan);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
}

.hero-greeting {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    letter-spacing: 2px;
    font-size: 1rem;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0.5rem 0;
    background: linear-gradient(180deg, #ffffff, #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-outline {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-3px);
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.tech-frame {
    position: relative;
    padding: 10px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.6);
}

.hero-img {
    width: 100%;
    max-width: 350px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.corner-tl, .corner-tr, .corner-bl, .corner-br {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--accent-cyan);
    border-style: solid;
}

.corner-tl { top: -2px; left: -2px; border-width: 2px 0 0 2px; }
.corner-tr { top: -2px; right: -2px; border-width: 2px 2px 0 0; }
.corner-bl { bottom: -2px; left: -2px; border-width: 0 0 2px 2px; }
.corner-br { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }

/* --- ABOUT ME SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 calc(45% - 1rem);
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* --- BIODATA SECTION --- */
.biodata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.bio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: var(--transition);
}

.bio-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.bio-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bio-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bio-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 0.2rem;
}

/* --- WHY INFORMATICS --- */
.why-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card-alt));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3.5rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.why-icon-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.why-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.why-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- MY DREAM --- */
.dream-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.dream-icon {
    width: 80px;
    height: 80px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { box-shadow: 0 0 0 20px rgba(6, 182, 212, 0); }
}

.dream-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.dream-desc {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- JOURNEY TIMELINE --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--accent-cyan);
    border-radius: 50%;
    position: absolute;
    top: 25px;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-item.left .timeline-dot { right: -8px; }
.timeline-item.right .timeline-dot { left: -8px; }

.timeline-content {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.timeline-num {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin: 0.2rem 0;
}

.timeline-content h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- GALLERY SECTION --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 29, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--accent-cyan);
    font-size: 2rem;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 85%;
    max-height: 85%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent-cyan);
}

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.social-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    transition: var(--transition);
}

.social-card:hover .social-icon {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

.social-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.social-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- FOOTER --- */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info p {
    font-size: 0.95rem;
}

.footer-info .sub-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-cyan);
    transform: translateY(-3px);
}

/* --- SCROLL ANIMATION CLASSES --- */
.fade-up, .fade-in, .fade-left, .fade-right {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-up { transform: translateY(30px); }
.fade-in { transform: scale(0.95); }
.fade-left { transform: translateX(-40px); }
.fade-right { transform: translateX(40px); }

.appear {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }
.stagger-9 { transition-delay: 0.9s; }

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .fade-up, .fade-in, .fade-left, .fade-right {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: var(--transition);
        box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    /* Timeline Vertical Stack */
    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 12px;
        right: auto;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}