/* ==============================================
   PORTFOLIO CSS - MUHAMAD IKHSAN
   Modern, Animated, Interactive Design
   ============================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Colors */
    --primary-color: #06367c;
    --secondary-color: #4A90E2;
    --accent-color: #4A90E2;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1a2e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #06367c 0%, #4A90E2 100%);
    --gradient-secondary: linear-gradient(135deg, #06367c 0%, #4A90E2 100%);
    --gradient-accent: linear-gradient(135deg, #06367c 0%, #4A90E2 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #5B8DEF;
    --secondary-color: #6BA3FF;
    --accent-color: #FF6B9D;
    --text-primary: #FFFFFF;
    --text-secondary: #A8B2D1;
    --bg-primary: #0A0E27;
    --bg-secondary: #151932;
    --bg-dark: #1E2139;
    
    /* Dark mode shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

::selection {
    background-color: var(--primary-color);
    color: white;
}

/* ========== PRELOADER ========== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

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

.loader {
    text-align: center;
}

.loader-inner {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.circle {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.circle:nth-child(1) { animation-delay: -0.32s; }
.circle:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

/* ========== CUSTOM CURSOR ========== */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: 0.1s;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    background: rgba(6, 54, 124, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: 0.3s;
}

/* ========== NAVIGATION ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-secondary);
    text-decoration: none;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

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

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: rotate(20deg);
    background: var(--gradient-primary);
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

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

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}

.name-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.typing-text {
    font-weight: 600;
    color: var(--primary-color);
}

.cursor-blink {
    animation: blink 1s infinite;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 2rem;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

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

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.hero-image {
    position: relative;
}

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

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: var(--gradient-primary);
    opacity: 0.3;
    border-radius: 50%;
    filter: blur(60px);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.profile-img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

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

.card-1 {
    top: 5%;
    right: -10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 30%;
    left: -15%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    right: -25%;
    animation-delay: 2s;
}

.card-4 {
    top: 15%;
    left: -20%;
    animation-delay: 1.5s;
}

.card-5 {
    top: 45%;
    right: -20%;
    animation-delay: 0.5s;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
    margin: 0 auto 10px;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 25px; }
}

/* ========== SECTION COMMON STYLES ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

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

.section-number {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    font-family: var(--font-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
    font-family: var(--font-secondary);
}

.title-line {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto;
    border-radius: 2px;
}

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

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

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

.about-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.story-highlight {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.story-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.story-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.story-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.highlight-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.highlight-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.tech-stack h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-item {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.achievement-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.achievement-card {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.achievement-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.achievement-card h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ========== EXPERIENCE SECTION ========== */
.experience-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
}

.company-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.company-logo img {
    max-width: 100%;
    height: auto;
}

.job-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.company-name {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.job-period,
.job-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.achievements-list {
    list-style: none;
    margin-top: 1rem;
}

.achievements-list li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.achievements-list i {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--primary-color);
}

.tech-used {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
}

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

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

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

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

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.project-card:hover {
    box-shadow: var(--shadow-xl);
}

.project-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

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

.project-card.featured .project-image {
    height: 100%;
}

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

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

/* Project 1.5 - Airflow Pipeline Image */
.project-card.project-1-5 .project-image {
    background: #f8f9fa;
}

.project-card.project-1-5 .project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(0.9);
}

/* Removed custom height for Project 2 so it matches the other cards (250px) */

/* Project 4 - Taller for workflow diagram */
.project-card.project-4 .project-image {
    height: 250px;
    background: white;
}

.project-card.project-4 .project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    transform: scale(1.0);
}

/* Project 5 - Smaller image */
.project-card.project-5 .project-image {
    height: 250px;
}

.project-card.project-5 .project-image img {
    object-fit: contain;
    transform: scale(1.65);
}

/* Project 6 - Smaller image */
.project-card.project-6 .project-image {
    height: 250px;
}

.project-card.project-6 .project-image img {
    object-fit: contain;
    transform: scale(1.0);
}

/* Project 7 - Smaller image */
.project-card.project-7 .project-image {
    height: 250px;
}

.project-card.project-7 .project-image img {
    object-fit: contain;
    transform: scale(1.48);
}

/* Project 9 - Smaller image */
.project-card.project-9 .project-image {
    height: 250px;
}

.project-card.project-9 .project-image img {
    object-fit: contain;
    transform: scale(1.15);
}

/* Project 10 - Smaller image */
.project-card.project-10 .project-image {
    height: 250px;
}

.project-card.project-10 .project-image img {
    object-fit: contain;
    transform: scale(1.20);
}

/* Project 11 - Same as Project 9 */
.project-card.project-11 .project-image {
    height: 250px;
}

.project-card.project-11 .project-image img {
    object-fit: contain;
    transform: scale(1.10);
}

/* Project 12 - Same as Project 11 */
.project-card.project-12 .project-image {
    height: 250px;
}

.project-card.project-12 .project-image img {
    object-fit: contain;
    transform: scale(1.10);
}

/* Project 14 - Same as Project 11 */
.project-card.project-14 .project-image {
    height: 250px;
}

.project-card.project-14 .project-image img {
    object-fit: contain;
    transform: scale(1.0);
}

/* Project 15 - Same as Project 14 */
.project-card.project-15 .project-image {
    height: 250px;
}

.project-card.project-15 .project-image img {
    object-fit: contain;
    transform: scale(1.0);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 54, 124, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.overlay-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-base);
}

.overlay-btn:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

.featured-label {
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.personal-label {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

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

.project-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-description {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.feature-item i {
    color: var(--primary-color);
}

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

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

.project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-secondary);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.stat i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* ========== SKILLS SECTION ========== */
.skills-content {
    display: grid;
    gap: 3rem;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

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

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.skill-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 1s ease;
}

.skill-percentage {
    font-weight: 600;
    color: var(--primary-color);
}

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

.tool-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.tool-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.tool-item img {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.5rem;
    display: block;
}
.tool-item img:not(.no-filter) {
    /* Make images blue (hex #06367c) */
    filter: brightness(0) saturate(100%) invert(16%) sepia(87%) saturate(2361%) hue-rotate(205deg) brightness(85%) contrast(98%);
}

.tool-item img {
    transition: filter var(--transition-base), transform var(--transition-base);
}

[data-theme="dark"] .tool-item img:not(.no-filter) {
    /* Make images blue dark mode (hex #5B8DEF) */
    filter: brightness(0) saturate(100%) invert(56%) sepia(50%) saturate(3015%) hue-rotate(192deg) brightness(99%) contrast(92%);
}

.hf-outline {
    filter: drop-shadow(-1px -1px 0 var(--primary-color)) 
            drop-shadow(1px -1px 0 var(--primary-color)) 
            drop-shadow(-1px 1px 0 var(--primary-color)) 
            drop-shadow(1px 1px 0 var(--primary-color));
    border-radius: 50%;
}

[data-theme="dark"] .hf-outline {
    filter: drop-shadow(-1px -1px 0 var(--primary-color)) 
            drop-shadow(1px -1px 0 var(--primary-color)) 
            drop-shadow(-1px 1px 0 var(--primary-color)) 
            drop-shadow(1px 1px 0 var(--primary-color));
}

.soft-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.soft-skill-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-base);
}

.soft-skill-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.soft-skill-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.soft-skill-item:hover i {
    color: white;
}

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

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

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card h4 {
    margin-bottom: 0.5rem;
}

.contact-card a {
    color: var(--text-secondary);
    text-decoration: none;
}

.social-links-contact {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-base);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
}

.contact-form-wrapper {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid #d1d5db; /* Add a thin visible gray border */
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
}

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

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

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

.footer-socials a {
    color: white;
    font-size: 1.5rem;
    transition: all var(--transition-base);
}

.footer-socials a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero-content,
    .about-content,
    .experience-card {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: white;
        padding: 2rem;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-socials {
        justify-content: center;
    }
    
    /* Responsive Floating Cards for Mobile */
    .floating-card {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .floating-card i {
        font-size: 1rem;
    }
    
    .card-1 {
        top: 5%;
        right: 0%;
    }
    
    .card-2 {
        bottom: 35%;
        left: -5%;
    }
    
    .card-3 {
        bottom: 45%;
        right: 0%;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ========== DARK MODE SPECIFIC STYLES ========== */
[data-theme="dark"] .story-highlight {
    background: var(--bg-dark);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .story-content h3 {
    color: var(--primary-color);
}

[data-theme="dark"] .highlight-item {
    background: var(--bg-dark);
    color: var(--text-primary);
}

[data-theme="dark"] .timeline-item {
    background: var(--bg-dark);
}

[data-theme="dark"] .timeline-content h3,
[data-theme="dark"] .timeline-content h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .timeline-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .experience-card {
    background: var(--bg-dark);
}

[data-theme="dark"] .experience-header h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .experience-content li {
    color: var(--text-secondary);
}

[data-theme="dark"] .project-card {
    background: var(--bg-dark);
}

[data-theme="dark"] .project-title {
    color: var(--text-primary);
}

[data-theme="dark"] .project-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .skill-item {
    background: var(--bg-dark);
}

[data-theme="dark"] .skill-name {
    color: var(--text-primary);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
    background: var(--bg-dark);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .contact-form input::placeholder,
[data-theme="dark"] .contact-form textarea::placeholder {
    color: var(--text-secondary);
}

[data-theme="dark"] .contact-info-item {
    background: var(--bg-dark);
}

[data-theme="dark"] .contact-info-item h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .contact-info-item p {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-card {
    background: rgba(91, 141, 239, 0.1);
    border: 1px solid rgba(91, 141, 239, 0.3);
}

[data-theme="dark"] .stat-number {
    color: var(--text-primary);
}

[data-theme="dark"] .stat-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .filter-btn {
    background: var(--bg-dark);
    color: var(--text-secondary);
}

[data-theme="dark"] .filter-btn.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .filter-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Navbar Dark Mode */
[data-theme="dark"] .navbar {
    background: rgba(10, 14, 39, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-link {
    color: var(--text-primary);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .theme-toggle {
    background: var(--bg-dark);
    color: var(--text-primary);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .menu-toggle span {
    background: var(--text-primary);
}

/* Hero Section Dark Mode */
[data-theme="dark"] .hero {
    background: var(--bg-primary);
}

[data-theme="dark"] .hero-subtitle {
    color: var(--primary-color);
}

[data-theme="dark"] .hero-title {
    color: var(--text-primary);
}

[data-theme="dark"] .typing-text {
    color: var(--primary-color);
}

[data-theme="dark"] .hero-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .floating-card {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .floating-card i {
    color: var(--primary-color);
}

[data-theme="dark"] .mouse {
    border-color: var(--primary-color);
}

[data-theme="dark"] .wheel {
    background: var(--primary-color);
}

/* Tools & Soft Skills Dark Mode */
[data-theme="dark"] .tool-item {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Skill Cards Dark Mode */
[data-theme="dark"] .skill-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .skill-card h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .skill-bar {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .soft-skill-item {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .soft-skill-item i {
    color: var(--primary-color);
}

[data-theme="dark"] .soft-skill-item:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .soft-skill-item:hover i {
    color: white;
}

/* ========================================
   LIGHTBOX MODAL
======================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 10001;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: #ff4d4d;
}

.lightbox-caption {
    text-align: center;
    color: white;
    font-size: 18px;
    font-weight: 500;
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -40px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .lightbox-caption {
        font-size: 16px;
        margin-top: 15px;
    }
}

/* ========================================
   PROJECT-SPECIFIC ADJUSTMENTS
======================================== */
/* Make Project 13 (Lending Club) image smaller */
.project-card.project-13 .project-image {
    display: flex;
    flex-direction: column; /* stack logos vertically */
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 0; /* give some vertical breathing room */
}

.project-card.project-13 .project-image img {
    max-height: 160px; /* limit height but allow width to scale */
    width: auto;
    object-fit: contain;
    transform: scale(0.98);
    transition: transform 0.25s ease, filter 0.2s ease;
}

/* Make the first (Rakamin) logo larger than the partner badge */
.project-card.project-13 .project-image img:first-child {
    max-width: 70%;
    max-height: 140px;
}

.project-card.project-13 .project-image img:last-child {
    max-width: 40%;
    max-height: 80px;
}

/* Slightly reduce on small screens */
@media (max-width: 768px) {
    .project-card.project-13 .project-image img {
        max-height: 130px;
        transform: scale(0.98);
    }

    .project-card.project-13 .project-image img:first-child {
        max-width: 80%;
        max-height: 110px;
    }

    .project-card.project-13 .project-image img:last-child {
        max-width: 50%;
        max-height: 60px;
    }
}

/* ========== DARK MODE CARDS & FOREGROUND FIXES ========== */
[data-theme="dark"] .experience-card,
[data-theme="dark"] .skill-card,
[data-theme="dark"] .tool-item,
[data-theme="dark"] .soft-skill-item {
    background: var(--bg-secondary);
}

[data-theme="dark"] .project-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .contact-form-wrapper {
    background: var(--bg-primary);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--bg-secondary);
}
