/* ==========================================
   PORTFOLIO 3D - Louis Pandame Siregar
   Design System & Global Styles
   ========================================== */

/* === CSS Variables (Design Tokens) === */
:root {
    /* Light Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.6);

    --color-primary: #0ea5e9; /* Sky blue */
    --color-secondary: #8b5cf6; /* Violet */
    --color-accent: #db2777; /* Pink */
    --color-success: #10b981;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --gradient-primary: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    --gradient-accent: linear-gradient(135deg, #8b5cf6, #db2777);
    --gradient-full: linear-gradient(135deg, #0ea5e9, #8b5cf6, #db2777);
    --gradient-bg: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.05) 0%, transparent 60%);

    --glow-primary: 0 4px 20px rgba(14, 165, 233, 0.15);
    --glow-secondary: 0 4px 20px rgba(139, 92, 246, 0.15);
    --glow-accent: 0 4px 20px rgba(219, 39, 119, 0.15);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 80px;
    --container-width: 1200px;

    /* Borders */
    --border-subtle: 1px solid rgba(0, 0, 0, 0.08);
    --border-glow: 1px solid rgba(14, 165, 233, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Z-index */
    --z-loader: 9999;
    --z-cursor: 9998;
    --z-navbar: 1000;
    --z-back-to-top: 900;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

button {
    cursor: none;
    border: none;
    background: none;
    font-family: inherit;
}

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

ul {
    list-style: none;
}

::selection {
    background: rgba(14, 165, 233, 0.2);
    color: var(--text-primary);
}

/* === Custom Cursor === */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: var(--z-cursor);
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px var(--color-primary), 0 0 20px rgba(14, 165, 233, 0.3);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(14, 165, 233, 0.3);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: var(--z-cursor);
    transition: all 0.15s ease;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    border-color: var(--color-primary);
    background: rgba(14, 165, 233, 0.05);
}

/* === Loader === */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.loader-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    animation: loader-fill 2s ease-in-out forwards;
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes loader-fill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.15)); }
    50% { opacity: 0.7; filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.3)); }
}

/* === Container === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

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

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border-subtle);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 10;
}

.logo-text {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.logo-dot {
    color: var(--color-primary);
    font-size: 2rem;
    line-height: 1;
}

.nav-logo:hover .logo-text {
    color: var(--color-primary);
}

.site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.nav-logo:hover .site-logo, .footer-logo:hover .site-logo {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

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

.nav-link.active::after,
.nav-link:hover::after {
    width: 20px;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bg-primary);
    transition: all var(--transition-normal);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.nav-cta:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
    padding: 5px;
}

.toggle-bar {
    width: 28px;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
    transition: all var(--transition-normal);
}

.nav-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-xl);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.4);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    background: rgba(0, 240, 255, 0.05);
    transform: translateY(-3px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-xl);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* === Gradient Text === */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Section Styles === */
.section {
    padding: var(--section-padding) 0;
    position: relative;
    overflow: hidden;
}

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

.section-tag {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === Scroll Animation === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    background: var(--bg-primary);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-xl);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-success);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.hero-title {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
}

.hero-greeting {
    display: block;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.hero-name {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    background: var(--gradient-full);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

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

.hero-role {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.role-prefix,
.role-suffix {
    color: var(--color-primary);
    opacity: 0.5;
}

.typing-text {
    color: var(--color-primary);
    min-width: 1ch;
}

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

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

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-number::after {
    content: '+';
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
    animation: float-bounce 3s ease-in-out infinite;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.mouse-wheel {
    width: 3px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0; }
}

.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

@keyframes float-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
    background: var(--bg-primary);
    background-image: var(--gradient-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.image-wrapper {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
}

.image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: var(--border-glow);
    box-shadow: var(--glow-primary);
    z-index: 2;
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-frame:hover img {
    transform: scale(1.05);
}

.image-decoration {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-secondary);
    border-radius: var(--radius-lg);
    opacity: 0.3;
    z-index: 1;
}

.image-dots {
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, var(--color-primary) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.3;
    z-index: 0;
}

.about-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.info-item:hover {
    border-color: rgba(0, 240, 255, 0.15);
    background: rgba(0, 240, 255, 0.03);
}

.info-icon {
    font-size: 1.25rem;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.info-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.about-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Floating Shapes Background */
.section-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    animation: float-rotate 20s linear infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: -100px;
    animation-duration: 25s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: -50px;
    animation-duration: 18s;
    animation-direction: reverse;
    border-color: rgba(0, 240, 255, 0.08);
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 20%;
    animation-duration: 22s;
    border-color: rgba(244, 114, 182, 0.08);
}

@keyframes float-rotate {
    0% { transform: rotate(0deg) translateY(0); }
    33% { transform: rotate(120deg) translateY(20px); }
    66% { transform: rotate(240deg) translateY(-20px); }
    100% { transform: rotate(360deg) translateY(0); }
}

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.skill-category {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.skill-category:hover {
    border-color: rgba(0, 240, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-icon-wrapper {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: var(--radius-md);
}

.skill-category h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.skill-percent {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
}

.skill-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tech Stack Icons */
.tech-stack {
    text-align: center;
}

.tech-stack-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.tech-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tech-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
}

.tech-icon:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: var(--glow-primary);
}

.tech-icon svg {
    width: 32px;
    height: 32px;
}

.tech-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    border: var(--border-subtle);
}

/* ==========================================
   SERVICES SECTION
   ========================================== */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: rgba(14, 165, 233, 0.2);
    transform: translateY(-5px);
    box-shadow: var(--glow-primary);
}

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Pricing */
.pricing-header {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 2.5rem;
}

.pricing-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.pricing-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.75rem;
    align-items: start;
    padding-top: 1.5rem;
}

.pricing-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: all var(--transition-normal);
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--glow-primary);
    border-color: rgba(14, 165, 233, 0.2);
}

.pricing-card.featured {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(124, 58, 237, 0.05));
    border: 2px solid rgba(14, 165, 233, 0.35);
    transform: scale(1.03);
    margin-top: 20px;
    overflow: visible !important;
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-6px);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.2);
}

.pricing-popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.pricing-badge {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 0.75rem;
}

.price-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.price-amount {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.price-range {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 48px;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-features li svg {
    flex-shrink: 0;
    color: var(--color-primary);
}

.pricing-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.pricing-note {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}


.projects {
    background: var(--bg-primary);
    background-image: var(--gradient-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.project-card:hover {
    border-color: rgba(0, 240, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.project-card.featured {
    grid-column: span 2;
}

.project-card.featured .project-image {
    height: 400px;
}

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

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

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

.project-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    transition: all var(--transition-normal);
    transform: translateY(20px);
    opacity: 0;
}

.project-card:hover .project-link {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover .project-link:nth-child(2) {
    transition-delay: 0.1s;
}

.project-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--bg-primary);
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-primary);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.badge-live {
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    animation: dot-pulse 2s ease-in-out infinite;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    color: var(--color-secondary);
    font-weight: 500;
}

/* ==========================================
   CLIENTS SECTION
   ========================================== */
.clients {
    background: var(--bg-secondary);
}

.clients-showcase {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.client-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.client-card:hover {
    border-color: rgba(0, 240, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.client-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.client-logo-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.client-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.client-logo-fallback {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.client-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
}

.client-type {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.client-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.client-deliverables {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.deliverable {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: var(--radius-xl);
    font-size: 0.8125rem;
    color: var(--color-primary);
}

.client-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-normal);
}

.client-link:hover {
    gap: 0.75rem;
}

/* Marquee */
.trust-section {
    text-align: center;
}

.trust-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.marquee-container {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 3rem;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee-item {
    font-size: 1rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact {
    background: var(--bg-primary);
    background-image: var(--gradient-bg);
    position: relative;
}

#globe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.contact-method:hover {
    border-color: rgba(0, 240, 255, 0.15);
    background: rgba(0, 240, 255, 0.03);
    transform: translateX(5px);
}

.method-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.05);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    flex-shrink: 0;
}

.method-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.method-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Contact Form */
.contact-form-wrapper {
    position: relative;
}

.contact-form {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: all var(--transition-normal);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
    background: rgba(0, 240, 255, 0.02);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: var(--border-subtle);
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 0.75rem;
}

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

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: var(--border-subtle);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-credit {
    color: var(--text-muted);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 110px;
    right: 2rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: 50%;
    color: var(--color-primary);
    z-index: var(--z-back-to-top);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-3px);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    /* Mobile Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background: rgba(12, 12, 18, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 5rem 2rem 2rem;
        transition: right var(--transition-slow);
        border-left: var(--border-subtle);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav-link {
        display: block;
        padding: 0.875rem 1rem;
        font-size: 1.1rem;
        border-radius: var(--radius-sm);
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-link::after {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    /* Hero */
    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        grid-column: span 1;
    }

    .project-card.featured .project-image {
        height: 240px;
    }

    /* About */
    .about-info-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Client card */
    .client-card {
        padding: 1.5rem;
    }
}

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

    .hero-name {
        font-size: 2.25rem;
    }

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

    .btn {
        justify-content: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .tech-icons {
        gap: 1rem;
    }
}

/* ==========================================
   UTILITY ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Smooth page transitions */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
}

/* ==========================================
   WHATSAPP FLOATING BUTTON
   ========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease;
    animation: pulse-soft 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

@keyframes pulse-soft {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    .back-to-top {
        right: 20px;
        bottom: 90px;
    }
}

/* Mobile Swipe & Snap Experience */
@media (max-width: 768px) {
    .pricing-grid, .skills-grid, .services-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding-bottom: 2rem; /* Ruang untuk scrollbar/bayangan */
        padding-left: 7.5vw;  /* Agar item pertama di tengah */
        padding-right: 7.5vw; /* Agar item terakhir di tengah */
        gap: 1rem;
        -webkit-overflow-scrolling: touch;
        /* Sembunyikan scrollbar agar lebih estetis layaknya App */
        scrollbar-width: none; 
    }
    .pricing-grid::-webkit-scrollbar, .skills-grid::-webkit-scrollbar, .services-grid::-webkit-scrollbar {
        display: none;
    }
    
    .pricing-card, .skill-category, .service-card {
        flex: 0 0 85vw; /* Kartu mengambil 85% lebar layar */
        scroll-snap-align: center;
        margin-right: 0; /* Hapus margin, ganti pakai gap di parent */
    }
    
    /* Swipe Dots Styling */
    .swipe-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: -10px;
        margin-bottom: 30px;
    }
    
    .swipe-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--text-muted, rgba(0, 0, 0, 0.2));
        transition: all 0.3s ease;
    }
    
    .swipe-dot.active {
        background-color: var(--color-primary, #0ea5e9);
        width: 24px;
        border-radius: 4px;
    }

    /* Nudge Animation for Swipe Hint (Repeats every 4 seconds) */
    @keyframes swipeNudge {
        0%, 75%, 100% { transform: translateX(0); }
        80% { transform: translateX(-15px) rotate(-1deg); }
        88% { transform: translateX(5px) rotate(1deg); }
        95% { transform: translateX(-8px); }
    }

    .shake-hint {
        animation: swipeNudge 4s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
    }
}
