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

:root {
    /* Color Palette - Classic & Sophisticated */
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #d4af37;
    --accent-light: #f4e4a6;
    --accent-dark: #b8941f;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --background-dark: #0f0f0f;
    --background-light: #1a1a1a;
    --border-color: #333333;
    --gradient-primary: linear-gradient(135deg, #d4af37 0%, #f4e4a6 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(244, 228, 166, 0.05) 100%);
    
    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
    --font-accent: 'Crimson Text', serif;
    --font-mono: 'Montserrat', sans-serif;
    
    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 2rem;
    --border-radius: 12px;
    --border-radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.2);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.3);
}

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

body {
    font-family: var(--font-secondary);
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Prevent image overflow on mobile */
img {
    max-width: 100%;
    height: auto;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

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

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

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--container-padding);
    overflow-x: hidden;
}

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

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-overlay);
    border: 1px solid var(--accent-color);
    border-radius: 50px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    margin-bottom: 1rem;
}

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

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(15, 15, 15, 0.98);
    box-shadow: var(--shadow-medium);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    transition: var(--transition-normal);
}

.logo-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: -1;
}

.logo-wrapper:hover .logo-glow {
    opacity: 0.3;
    animation: pulse 2s infinite;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-normal);
    padding: 0.5rem 0;
}

.nav-text {
    position: relative;
    z-index: 2;
}

.nav-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

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

.nav-link:hover .nav-underline {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition-normal);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--background-dark);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.shape {
    position: absolute;
    border: 1px solid var(--accent-color);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    top: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    top: 60%;
    right: 15%;
    width: 80px;
    height: 80px;
    transform: rotate(45deg);
    animation-delay: 2s;
}

.shape-3 {
    bottom: 30%;
    left: 20%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation-delay: 4s;
}

.shape-4 {
    top: 40%;
    right: 30%;
    width: 120px;
    height: 120px;
    transform: rotate(45deg);
    animation-delay: 1s;
}

.shape-5 {
    bottom: 20%;
    right: 10%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    animation-delay: 3s;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.float-element {
    position: absolute;
    color: var(--accent-color);
    font-size: 2rem;
    opacity: 0.2;
    animation: float 8s ease-in-out infinite;
}

.element-1 {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.element-2 {
    top: 25%;
    right: 10%;
    animation-delay: 2s;
}

.element-3 {
    bottom: 30%;
    left: 15%;
    animation-delay: 4s;
}

.element-4 {
    bottom: 20%;
    right: 20%;
    animation-delay: 6s;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem 0 2rem;
}

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

.hero-text {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--gradient-overlay);
    border: 1px solid var(--accent-color);
    border-radius: 50px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-title {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.title-line {
    display: block;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.8s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

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

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    animation: fadeInUp 1s ease 1s both;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

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

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

.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== HERO ILLUSTRATION ===== */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease 0.8s both;
}

.hero-illustration {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
}

.main-device {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.laptop-mockup {
    width: 300px;
    height: 200px;
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-color);
}

.laptop-screen {
    width: 100%;
    height: 100%;
    background: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.screen-content {
    padding: 1rem;
    height: 100%;
}

.code-window {
    background: var(--background-dark);
    border-radius: 6px;
    height: 100%;
    overflow: hidden;
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.window-controls span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.window-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.code-content {
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.4;
}

.code-line {
    margin-bottom: 0.3rem;
}

.indent {
    padding-left: 1rem;
}

.code-keyword { color: #ff79c6; }
.code-variable { color: #8be9fd; }
.code-operator { color: #f8f8f2; }
.code-string { color: #f1fa8c; }
.code-bracket { color: #f8f8f2; }
.code-comma { color: #f8f8f2; }

.laptop-base {
    width: 320px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 0 0 12px 12px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-top: none;
}

.floating-devices {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.phone-mockup {
    position: absolute;
    width: 80px;
    height: 160px;
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 4px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.phone-1 {
    top: 10%;
    right: 10%;
    animation: float 4s ease-in-out infinite;
}

.phone-2 {
    bottom: 20%;
    left: 5%;
    animation: float 4s ease-in-out infinite 2s;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
}

.app-preview {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.music-app {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.payment-app {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
    animation: fadeInUp 1s ease 1.2s both;
}

.scroll-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    color: var(--accent-color);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding);
    position: relative;
    background: var(--background-light);
}

.about-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.section-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.portfolio-background,
.contact-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

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

.about-text {
    max-width: 600px;
}

.about-intro h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.about-details p {
    margin-bottom: 1.5rem;
}

.skills-highlight {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--gradient-overlay);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition-normal);
}

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

.skill-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.skill-item span {
    font-weight: 600;
    color: var(--text-primary);
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-illustration {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 500px;
}

.profile-card {
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-heavy);
    position: relative;
    z-index: 2;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.profile-info h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.profile-info p {
    color: var(--accent-color);
    margin: 0;
}

.card-stats {
    display: flex;
    gap: 2rem;
}

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

.stat-value {
    display: block;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

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

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.icon-float {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--gradient-overlay);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    animation: float 6s ease-in-out infinite;
}

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

.icon-2 {
    top: 30%;
    left: -15%;
    animation-delay: 1.5s;
}

.icon-3 {
    bottom: 30%;
    right: -10%;
    animation-delay: 3s;
}

.icon-4 {
    bottom: 10%;
    left: -15%;
    animation-delay: 4.5s;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    padding: var(--section-padding);
    position: relative;
    background: var(--background-dark);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.filter-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.filter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    min-height: 400px;
}

.portfolio-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
    display: block;
    visibility: visible;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    display: none !important;
    visibility: hidden;
}

.portfolio-card {
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--accent-color);
}

.card-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.device-showcase {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-light);
}

.phone-stack {
    position: relative;
    width: 200px;
    height: 250px;
    z-index: 15;
}

.phone {
    position: absolute;
    width: 80px;
    height: 160px;
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 4px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    z-index: 5;
}

.phone-1 {
    top: 0;
    left: 0;
    z-index: 20;
}

.phone-2 {
    bottom: 0;
    right: 0;
    z-index: 10;
    transform: rotate(15deg);
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

    .phone-screen img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        will-change: transform;
        width: 100%;
        height: 100%;
        object-fit: cover;
        max-width: 100%;
    }

.laptop-showcase {
    position: relative;
    width: 300px;
    height: 200px;
}

.laptop {
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.laptop-screen {
    width: 100%;
    height: 100%;
    background: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
}

.browser-window {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.browser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.browser-controls {
    display: flex;
    gap: 0.5rem;
}

.browser-controls span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.browser-url {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.website-preview {
    flex: 1;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.kreative-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.coffee-preview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ytop-preview {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.musicsteppr-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.maliksaroma-preview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.starboy-preview {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.iframe-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    background: #1a1a1a;
    border-radius: 0 0 8px 8px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iframe-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.iframe-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

.iframe-placeholder.loaded {
    background: transparent;
}

.iframe-placeholder.loaded .iframe-loading {
    display: none;
}

.website-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
    transform: scale(0.8);
    transform-origin: top left;
    width: 125%;
    height: 125%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.website-preview-iframe.loaded {
    opacity: 1;
}

.website-preview-iframe::-webkit-scrollbar {
    display: none;
}

.website-preview-iframe {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

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

.overlay-content {
    text-align: center;
    color: var(--text-primary);
    pointer-events: auto;
}

.overlay-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.overlay-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.overlay-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition-normal);
    pointer-events: auto;
}

.overlay-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.card-content {
    padding: 2rem;
    position: relative;
    z-index: 50;
    pointer-events: auto;
}

.card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gradient-overlay);
    border: 1px solid var(--accent-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.view-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-overlay);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-normal);
    flex: 1;
    min-width: 120px;
    justify-content: center;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
    cursor: pointer;
    overflow: hidden;
}

.view-project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    z-index: -1;
}

.view-project-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    border-color: var(--accent-color);
}

.view-project-btn:hover::before {
    left: 0;
}

.view-project-btn i {
    font-size: 1rem;
    transition: var(--transition-normal);
}

.view-project-btn:hover i {
    transform: scale(1.1);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--section-padding);
    position: relative;
    background: var(--background-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-details h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0;
}

.professional-profiles {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.professional-profiles h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.profile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--gradient-overlay);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-normal);
    min-width: 120px;
}

.profile-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-color);
}

.profile-link.upwork:hover {
    background: linear-gradient(135deg, #14a800 0%, #0d7a00 100%);
    color: white;
}

.profile-link.fiverr:hover {
    background: linear-gradient(135deg, #1dbf73 0%, #0f9d58 100%);
    color: white;
}

.profile-link i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-link span {
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form {
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-medium);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-normal);
    font-family: var(--font-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.form-actions .btn {
    flex: 1;
    max-width: 200px;
}

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

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.footer-logo span {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 0;
}

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

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gradient-overlay);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    margin: 0;
}

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-image {
        order: -1; /* Show image first on tablet */
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .phone-stack {
        width: 180px;
        height: 230px;
    }
    
    .laptop-showcase {
        width: 280px;
        height: 190px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--background-dark);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition-normal);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-container {
        padding: 4rem 1rem 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .hero-image {
        display: none; /* Hide complex hero illustration on mobile */
    }
    
    .hero-illustration {
        display: none;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .about-image {
        max-width: 100%;
    }
    
    .about-illustration {
        max-width: 100%;
        height: auto;
        min-height: 300px;
    }
    
    .skills-highlight {
        flex-direction: column;
        gap: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-card {
        max-width: 100%;
    }
    
    .card-image {
        height: 250px;
        min-height: 250px;
    }
    
    .device-showcase {
        position: relative;
        height: 100%;
    }
    
    .phone-stack {
        width: 150px;
        height: 200px;
        margin: 0 auto;
    }
    
    .phone {
        width: 60px;
        height: 120px;
    }
    
    .phone-1 {
        top: 10px;
        left: 10px;
    }
    
    .phone-2 {
        bottom: 10px;
        right: 10px;
        transform: rotate(10deg);
    }
    
    .laptop-showcase {
        width: 100%;
        max-width: 280px;
        height: 180px;
        margin: 0 auto;
    }
    
    .laptop {
        width: 100%;
        height: 100%;
    }
    
    .browser-header {
        padding: 0.4rem 0.8rem;
    }
    
    .browser-url {
        font-size: 0.7rem;
    }
    
    .iframe-placeholder {
        min-height: 300px;
    }
    
    .iframe-loading {
        font-size: 0.8rem;
    }
    
    .iframe-loading i {
        font-size: 1.5rem;
    }
    
    .portfolio-filter {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
        min-height: 44px; /* Touch-friendly size */
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .card-content h3 {
        font-size: 1.3rem;
    }
    
    .card-content p {
        font-size: 0.95rem;
    }
    
    .card-tech {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .view-project-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        min-height: 44px; /* Touch-friendly size */
        -webkit-tap-highlight-color: transparent;
    }
    
    .contact-content {
        gap: 2rem;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 100%;
        padding: 1rem 2rem;
    }
    
    .footer-main {
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .profile-link {
        width: 100%;
        max-width: 100%;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .scroll-text {
        font-size: 0.8rem;
    }
    
    .scroll-arrow {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
        --container-padding: 0 0.75rem;
    }
    
    .nav-container {
        padding: 0 0.75rem;
        height: 70px;
    }
    
    .logo-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .hero-container {
        padding: 3rem 0.75rem 0 0.75rem;
    }
    
    .hero-title .title-line {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .stat {
        width: 100%;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .hero-buttons .btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-badge {
        padding: 0.4rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        padding: 0;
    }
    
    .portfolio-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
    
    .portfolio-grid {
        gap: 1.25rem;
    }
    
    .card-image {
        height: 220px;
        min-height: 220px;
    }
    
    .phone-stack {
        width: 120px;
        height: 160px;
    }
    
    .phone {
        width: 50px;
        height: 100px;
    }
    
    .laptop-showcase {
        max-width: 100%;
        height: 150px;
    }
    
    .browser-header {
        padding: 0.3rem 0.6rem;
    }
    
    .browser-controls span {
        width: 6px;
        height: 6px;
    }
    
    .browser-url {
        font-size: 0.65rem;
    }
    
    .iframe-placeholder {
        min-height: 250px;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .card-content h3 {
        font-size: 1.2rem;
    }
    
    .card-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .view-project-btn {
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }
    
    .contact-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .form-actions .btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-logo img {
        width: 40px;
        height: 40px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section ul {
        align-items: center;
    }
    
    .profile-link {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .about-illustration {
        min-height: 250px;
    }
    
    .profile-card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }
    
    .card-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ===== TOUCH-FRIENDLY IMPROVEMENTS ===== */
.btn,
.filter-btn,
.view-project-btn,
.nav-link,
.overlay-link {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden { display: none; }
.visible { display: block; }

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

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

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--accent-color);
    color: var(--primary-color);
}

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