/* =========================================
   Design System & Variables
   ========================================= */
:root {
    /* Color Palette - Industrial / Cyber Mechanical Theme */
    --bg-dark: #090a0f;       /* Deep Obsidian Space */
    --bg-surface: #11131c;    /* Carbon/Dark Metal */
    --bg-surface-glass: rgba(17, 19, 28, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-main: #f5f6f9;     /* Titanium White */
    --text-muted: #8e95a5;    /* Steel Gray */
    
    --primary: #ff6600;       /* Molten Orange */
    --primary-glow: rgba(255, 102, 0, 0.4);
    --primary-neon: #ff8c00;  /* Bright Welding Flame */
    
    --secondary: #0088cc;     /* Electric Arc Blue */
    --secondary-glow: rgba(0, 229, 255, 0.35);
    --secondary-neon: #00e5ff; /* Plasma Arc Blue */
    
    --accent: #ffd700;        /* Caution Yellow */
    --accent-glow: rgba(255, 215, 0, 0.35);
    
    /* Typography */
    --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-cyber: 'Orbitron', 'Outfit', sans-serif;
    --font-tech: 'Share Tech Mono', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   Background Animations (Industrial Geometric)
   ========================================= */
.bg-shape {
    position: fixed;
    filter: blur(8px);
    z-index: -1;
    opacity: 0.15;
    animation: rotate-float 20s infinite linear;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    bottom: -50px;
    right: -50px;
    animation-direction: reverse;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    top: 40%;
    left: 40%;
    opacity: 0.1;
    animation-duration: 25s;
}

@keyframes rotate-float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(50px, 50px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* =========================================
   Components
   ========================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 2px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: inherit;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #121212;
    box-shadow: 4px 4px 0px var(--secondary);
}

.btn-primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--secondary);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* Glass Card */
.glass-card {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-neon);
    box-shadow: 0 12px 30px var(--primary-glow), inset 0 0 15px rgba(255, 102, 0, 0.05);
}

/* Sections */
.section {
    padding: 6rem 0;
}

.bg-secondary {
    background-color: rgba(17, 19, 28, 0.45); /* Slight contrast in dark obsidian */
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-title {
    font-family: var(--font-cyber);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.section-line {
    height: 4px;
    width: 80px;
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    margin: 0 auto;
    border-radius: 2px;
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(9, 10, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-neon);
    letter-spacing: -0.5px;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    font-family: var(--font-cyber);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-neon);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background-image: linear-gradient(rgba(9, 10, 15, 0.85), rgba(9, 10, 15, 0.85)), url('assets/welding_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

/* Sparks Floating Container */
.spark-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.spark {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: var(--primary-neon);
    border-radius: 50%;
    filter: drop-shadow(0 0 4px var(--primary));
    opacity: 0;
    bottom: -10px;
    animation: spark-fly 6s infinite linear;
}

@keyframes spark-fly {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-105vh) translateX(var(--drift, 50px)) scale(0.2);
        opacity: 0;
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.greeting {
    color: var(--primary-neon);
    font-family: var(--font-tech);
    font-size: 1.25rem;
    display: block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-family: var(--font-cyber);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-family: var(--font-cyber);
    font-size: 1.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cursor {
    color: var(--primary-neon);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Hero Image */
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 650px;
    height: 750px;
}

/* Welding Arc Glow behind profile picture */
.hero-image-container::before {
    content: '';
    position: absolute;
    width: 75%;
    height: 75%;
    background: radial-gradient(circle, var(--secondary-glow) 0%, var(--primary-glow) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.6;
    animation: arc-pulse 4s infinite alternate ease-in-out;
}

@keyframes arc-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.4;
        filter: blur(50px);
    }
    100% {
        transform: scale(1.15);
        opacity: 0.8;
        filter: blur(70px);
    }
}

.hero-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 15px 35px var(--primary-glow));
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

@keyframes levitate {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-15px); }
}

.floating-badge {
    position: absolute;
    z-index: 2;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.badge-1 {
    top: 10%;
    right: 5%;
    animation: float-badge 3s ease-in-out infinite alternate;
}

.badge-2 {
    bottom: 10%;
    left: 0;
    animation: float-badge 4s ease-in-out infinite alternate-reverse;
}

.floating-badge i {
    color: var(--secondary);
    font-size: 1.5rem;
}

@keyframes float-badge {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-15px); }
}

/* =========================================
   About Section
   ========================================= */
.about-content {
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* =========================================
   Skills Section
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    padding: 2rem;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-neon);
    box-shadow: 0 12px 30px var(--secondary-glow), inset 0 0 15px rgba(0, 229, 255, 0.05);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-neon);
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    position: relative;
}

/* =========================================
   Projects Section
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-neon);
    box-shadow: 0 15px 35px var(--primary-glow);
}

.project-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.project-tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-radius: 20px;
    font-weight: 600;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Contact Section
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    padding: 3rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.5rem;
}

.footer-socials a:hover {
    color: var(--primary);
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .hero-container, .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-content {
        text-align: center;
        order: 2;
    }
    
    .hero-description {
        margin: 0 auto 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-image-container {
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition-normal);
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .contact-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* =========================================
   Dokumentasi Section
   ========================================= */
.doc-gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1.5rem 0.5rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--primary-neon) rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar for Webkit browsers (Chrome, Safari, Edge) */
.doc-gallery::-webkit-scrollbar {
    height: 8px;
}

.doc-gallery::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.doc-gallery::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    border-radius: 10px;
}

.doc-gallery::-webkit-scrollbar-thumb:hover {
    background: var(--primary-neon);
}

.doc-card {
    flex: 0 0 320px; /* Fixed width, do not shrink */
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.doc-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-radius: 16px;
}

.doc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.doc-card:hover .doc-img {
    transform: scale(1.08);
}

.doc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 15, 0.6);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.doc-card:hover .doc-overlay {
    opacity: 1;
}


