/* ==========================================
   PORTFOLIO STYLES - Hafiudin Bagir
   Modern Dark Theme with Animations
   ========================================== */

/* CSS Custom Properties */
:root {
    /* Colors */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #1c1c1f;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-tertiary: #a855f7;

    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(90deg, #8b5cf6, #06b6d4, #8b5cf6);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

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

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Custom Cursor */
.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.5;
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
}

@media (max-width: 768px) {

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

    body {
        cursor: auto;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    position: relative;
}

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

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Nav Menu */
.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    overflow: hidden;
}

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

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

.nav-link:hover .nav-link-indicator,
.nav-link.active .nav-link-indicator {
    width: 60%;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

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

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

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

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--transition-normal);
    }

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

    .nav-list {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .nav-link {
        font-size: 1.5rem;
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    overflow: hidden;
}

/* Hero Background */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 40%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent-secondary);
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #06b6d4;
    bottom: 20%;
    left: 30%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: var(--accent-tertiary);
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

.shape-5 {
    width: 80px;
    height: 80px;
    background: #22d3ee;
    bottom: 40%;
    left: 60%;
    animation-delay: -7s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(-30px, -20px) scale(1.05);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Greeting */
.hero-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.greeting-line {
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
}

/* Name */
.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.name-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

/* Title */
.hero-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.title-bracket {
    color: var(--accent-primary);
}

.title-text {
    color: var(--text-primary);
    /* min-width removed to allow brackets to hug the text */
}

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

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Description */
.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.7;
}

/* CTA Buttons */
.hero-cta {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Code Window Visual */
.hero-visual {
    display: flex;
    justify-content: flex-end;
}

.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform var(--transition-normal);
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red {
    background: #ff5f56;
}

.code-dot.yellow {
    background: #ffbd2e;
}

.code-dot.green {
    background: #27ca40;
}

.code-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-content {
    padding: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-keyword {
    color: #c792ea;
}

.code-variable {
    color: #82aaff;
}

.code-property {
    color: #c3e88d;
}

.code-string {
    color: #c3e88d;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.scroll-indicator:hover {
    color: var(--text-primary);
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: var(--border-color);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        top: 0;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        align-items: center;
    }

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

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

    .hero-visual {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        justify-content: center;
    }
}

/* ==========================================
   SECTION COMMON STYLES
   ========================================== */

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

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

/* ==========================================
   SKILLS SECTION
   ========================================== */

.skills {
    padding: var(--section-padding) 0;
    position: relative;
    overflow: hidden;
}

.skills-container {
    position: relative;
}

.skills-constellation {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG Threads */
.skills-threads {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.thread {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke var(--transition-normal);
}

.thread.animated {
    animation: drawThread 2s ease forwards;
}

@keyframes drawThread {
    to {
        stroke-dashoffset: 0;
    }
}

/* Energy Particles */
.energy-particle {
    fill: #8b5cf6;
    opacity: 0;
}

.energy-particle.energy-left {
    fill: url(#energyGradient1);
    fill: #8b5cf6;
}

.energy-particle.energy-right {
    fill: url(#energyGradient2);
    fill: #a855f7;
}

.skills-constellation:hover .energy-particle,
.skills.in-view .energy-particle {
    opacity: 1;
    animation: energyPulse 1.5s ease-in-out infinite alternate;
}

@keyframes energyPulse {
    0% {
        opacity: 0.6;
        r: 4;
    }

    50% {
        opacity: 1;
        r: 7;
    }

    100% {
        opacity: 0.8;
        r: 5;
    }
}

/* Thread glow effect on energy flow */
.thread {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke var(--transition-normal), stroke-width var(--transition-normal);
}

.thread.animated,
.skills.in-view .thread {
    stroke-dashoffset: 0;
    animation: drawThread 2s ease forwards, threadGlow 3s ease-in-out infinite alternate;
}

@keyframes threadGlow {
    0% {
        stroke: rgba(255, 255, 255, 0.12);
        stroke-width: 1;
    }

    50% {
        stroke: rgba(139, 92, 246, 0.4);
        stroke-width: 2;
    }

    100% {
        stroke: rgba(255, 255, 255, 0.15);
        stroke-width: 1.5;
    }
}

/* Center Skills Badge */
.skills-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.skills-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-normal);
}

.skills-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.5);
}

.skills-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.skills-label {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Skill Icons */
.skill-icon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0;
    transform: translateY(20px);
}

.skill-icon.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-icon-inner {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.skill-icon-inner svg {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.skill-icon:hover .skill-icon-inner {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.skill-icon:hover .skill-icon-inner svg {
    color: var(--accent-primary);
}

.skill-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    transition: all var(--transition-fast);
}

.skill-icon:hover .skill-name {
    opacity: 1;
    transform: translateY(0);
    color: var(--text-secondary);
}

/* Skill Positions - Left Side */
.skill-1 {
    left: 8%;
    top: 10%;
}

.skill-2 {
    left: 5%;
    top: 28%;
}

.skill-3 {
    left: 8%;
    top: 46%;
}

.skill-4 {
    left: 5%;
    top: 64%;
}

.skill-5 {
    left: 8%;
    top: 82%;
}

/* Skill Positions - Right Side */
.skill-6 {
    right: 8%;
    top: 10%;
}

.skill-7 {
    right: 5%;
    top: 28%;
}

.skill-8 {
    right: 8%;
    top: 46%;
}

.skill-9 {
    right: 5%;
    top: 64%;
}

.skill-10 {
    right: 8%;
    top: 82%;
}

/* Responsive Skills */
@media (max-width: 992px) {
    .skills-constellation {
        height: 800px;
    }

    .skill-1 {
        left: 5%;
        top: 5%;
    }

    .skill-2 {
        left: 2%;
        top: 20%;
    }

    .skill-3 {
        left: 5%;
        top: 35%;
    }

    .skill-4 {
        left: 2%;
        top: 50%;
    }

    .skill-5 {
        left: 5%;
        top: 65%;
    }

    .skill-6 {
        right: 5%;
        top: 5%;
    }

    .skill-7 {
        right: 2%;
        top: 20%;
    }

    .skill-8 {
        right: 5%;
        top: 35%;
    }

    .skill-9 {
        right: 2%;
        top: 50%;
    }

    .skill-10 {
        right: 5%;
        top: 65%;
    }
}

@media (max-width: 576px) {
    .skills-constellation {
        height: auto;
        min-height: 600px;
        flex-wrap: wrap;
        padding: 100px 0;
    }

    .skills-threads {
        display: none;
    }

    .skill-icon {
        position: relative;
        left: auto !important;
        right: auto !important;
        top: auto !important;
    }

    .skills-center {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-bottom: 40px;
    }

    .skills-constellation {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .skill-icon.visible {
        margin: 10px;
    }
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */

.projects {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* Project Card */
.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.project-card.project-left {
    transform: translateX(-100px);
}

.project-card.project-left.visible {
    transform: translateX(0);
}

.project-card.project-left {
    direction: rtl;
}

.project-card.project-left>* {
    direction: ltr;
}

/* Project Image */
.project-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1860 / 949;
    /* FIX sesuai gambar */
    background: #000;
    overflow: hidden;
    border-radius: 12px;
}


/* Phone Mockup for Mobile App Projects */
.project-card.project-app .project-image {
    aspect-ratio: auto;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.phone-mockup {
    position: relative;
    width: 280px;
    height: 560px;
    background: #000;
    border-radius: 40px;
    box-shadow: 0 0 0 10px #1a1a1a, 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transform-style: preserve-3d;
    transition: transform var(--transition-normal);
}

/* Energy Border Animation for Phone */
.phone-mockup::before {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: -1;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6, #ec4899, #8b5cf6);
    background-size: 400% 400%;
    border-radius: 46px;
    animation: energyFlow 3s linear infinite;
    opacity: 0.8;
    filter: blur(10px);
}

/* Web Mockup Container */
.web-mockup {
    position: relative;
    width: 100%;
    /* max-width: 600px; Remove fixed max-width to allow card flex to control */
    background: #0f0f12;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2;
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.web-header {
    height: 36px;
    background: #1a1a1f;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    border-bottom: 1px solid #2a2a2f;
}

.web-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.web-address-bar {
    flex: 1;
    height: 24px;
    background: #000;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #666;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-family: monospace;
}

.web-screen {
    max-height: 420px;
    overflow: hidden;
    position: relative;
    width: 100%;
    aspect-ratio: 1850 / 940;
    /* ≈ 1.96 */
    background: #000;
    overflow: hidden;
    border-radius: 12px;
}


.web-screen-image {
    width: 99%;
    height: auto;

    background: #000;
}

/* Energy Border for Web Mockup */
.web-mockup::before {
    content: '';
    position: absolute;
    inset: -3px;
    z-index: -1;
    /* background: linear-gradient(90deg, #8b5cf6, #3b82f6, #ec4899, #8b5cf6); */
    background-size: 400% 400%;
    border-radius: 14px;
    animation: energyFlow 3s linear infinite;
    opacity: 0.7;
    filter: blur(8px);
}

.project-card:hover .web-mockup {
    transform: scale(1.02) translateY(-5px);
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


.project-card:hover .phone-mockup {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow:
        0 35px 60px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(139, 92, 246, 0.3);
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Phone notch */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #1a1a2e;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

/* Phone screen content placeholder */
.phone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px 20px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-card) 50%, var(--bg-tertiary) 100%);
}

/* Phone screen with actual image */
.phone-screen-image {
    flex: 1;
    width: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 0 0 28px 28px;
}

.phone-app-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Phone app logo image */
.phone-app-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-normal);
}

.project-card:hover .phone-app-logo {
    transform: scale(1.1);
}

.phone-app-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
}

.phone-app-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* Phone home indicator */
.phone-home-indicator {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 8px auto;
}

/* Phone buttons decoration */
.phone-mockup::before {
    content: '';
    position: absolute;
    right: -3px;
    top: 100px;
    width: 3px;
    height: 30px;
    background: #333;
    border-radius: 0 3px 3px 0;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 150px;
    width: 3px;
    height: 60px;
    background: #333;
    border-radius: 0 3px 3px 0;
}

/* Responsive phone mockup */
@media (max-width: 768px) {
    .phone-mockup {
        width: 180px;
        height: 370px;
        border-radius: 32px;
        padding: 10px;
    }

    .phone-screen {
        border-radius: 22px;
    }

    .phone-notch {
        width: 80px;
        height: 22px;
    }
}

.project-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
}

.placeholder-icon {
    font-size: 3rem;
}

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

/* Full project image for web cards */
.project-image-full {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* tampil UTUH */
    object-position: center;
    background-color: #000;
    transition: transform var(--transition-normal);
}


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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(139, 92, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

/* Hide overlay for web projects - just zoom instead */
.project-web .project-overlay {
    display: none;
}

.overlay-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateY(10px);
    transition: transform var(--transition-normal);
}

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

.project-image:hover .overlay-text {
    transform: translateY(0);
}

/* Project Content */
.project-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tag {
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.project-links {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.project-link svg {
    width: 18px;
    height: 18px;
}

.project-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

@media (max-width: 992px) {
    .project-card {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-card.project-left {
        direction: ltr;
    }
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact {
    padding: var(--section-padding) 0;
    position: relative;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.social-link:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.social-link:hover::before {
    opacity: 0.1;
}

.social-icon-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    transition: all var(--transition-normal);
}

.social-link:hover .social-icon-wrapper {
    background: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.social-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.social-link:hover .social-icon {
    color: white;
}

.social-label {
    position: relative;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.social-handle {
    position: relative;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .social-links {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

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

/* ==========================================
   UTILITY CLASSES
   ========================================== */

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

.no-scroll {
    overflow: hidden;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}