/* Professional Portfolio Styles - Keita Yamada Inspired */

/* Variables */
:root {
    /* Vibrant Blue Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --text-muted: #495670;
    --accent: #0ea5e9;
    --accent-light: #38bdf8;
    --accent-dark: #0284c7;
    --accent-purple: #8b5cf6;
    --gradient-1: #0ea5e9;
    --gradient-2: #3b82f6;
    --gradient-3: #8b5cf6;
    --border-color: rgba(14, 165, 233, 0.1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    --spacing-2xl: 8rem;

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

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Animated Gradient Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        125deg,
        #0a0a0a 0%,
        rgba(14, 165, 233, 0.08) 20%,
        rgba(59, 130, 246, 0.06) 40%,
        #0a0a0a 60%,
        rgba(139, 92, 246, 0.05) 80%,
        #0a0a0a 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

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

/* Mouse Glow Effect - Blue Focused */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(14, 165, 233, 0.15),
        rgba(59, 130, 246, 0.1) 40%,
        transparent 70%
    );
    z-index: 1;
    filter: blur(40px);
    mix-blend-mode: screen;
}

/* Hide custom cursor elements */
.cursor,
.cursor-follower {
    display: none;
}

/* Loading Screen */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

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

.loader-line {
    width: 60px;
    height: 2px;
    background: var(--text-secondary);
    margin: 0 auto 20px;
    animation: loader-line 1.5s infinite ease-in-out;
}

@keyframes loader-line {
    0%, 100% {
        transform: scaleX(0);
    }
    50% {
        transform: scaleX(1);
    }
}

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

/* Main Container */
.main-container {
    position: relative;
    min-height: 100vh;
}

/* KOmbo Logo */
.kombo-logo {
    position: fixed;
    top: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition);
}

.kombo-text {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    position: relative;
    white-space: nowrap;
}

.kombo-base {
    transition: var(--transition);
}

.kombo-expand {
    display: inline-flex;
    align-items: center;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0;
}

.linkedin-icon {
    width: 20px;
    height: 20px;
    margin: 0 6px;
    display: inline-block;
    vertical-align: middle;
}

.kombo-logo:hover .kombo-text {
    color: var(--accent);
}

.kombo-logo:hover .kombo-expand {
    max-width: 40px;
    opacity: 1;
}

/* Side Navigation */
.side-nav {
    position: fixed;
    left: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.nav-dot {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

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

.nav-dot.active .dot,
.nav-dot:hover .dot {
    background: var(--accent);
    transform: scale(1.5);
    box-shadow: 0 0 20px var(--accent);
}

.dot-label {
    position: absolute;
    left: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-dot:hover .dot-label {
    opacity: 1;
    left: 30px;
}

/* Show label temporarily when section becomes active */
.nav-dot.active.show-label .dot-label {
    opacity: 1;
    left: 30px;
    color: var(--accent);
    animation: labelFadeInOut 3s ease-out forwards;
}

@keyframes labelFadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    20% {
        opacity: 1;
        transform: translateX(0);
    }
    80% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-10px);
    }
}

.nav-links {
    position: fixed;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.nav-link {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

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

/* Sections */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-2xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 2; /* Above the glow effect */
}

.section.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero-section {
    justify-content: center;
}

.hero-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Orbitron', 'Exo 2', var(--font-primary);
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

/* Page-wide Animated Background - Modern Geometric */
.page-animated-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Grid pattern overlay */
.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    animation: gridFade 10s ease-in-out infinite;
}

@keyframes gridFade {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.1;
    }
}

/* Floating particle field */
.particle-field {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle-orb {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(14, 165, 233, 0.6);
    border-radius: 50%;
    filter: blur(0.5px);
}

.particle-1 {
    top: 20%;
    left: 10%;
    animation: particleFloat1 15s infinite ease-in-out;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.8), rgba(14, 165, 233, 0.4));
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.particle-2 {
    top: 60%;
    right: 15%;
    animation: particleFloat2 18s infinite ease-in-out;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8), rgba(139, 92, 246, 0.4));
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.particle-3 {
    bottom: 25%;
    left: 30%;
    animation: particleFloat3 20s infinite ease-in-out;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.8), rgba(16, 185, 129, 0.4));
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.particle-4 {
    top: 40%;
    right: 35%;
    animation: particleFloat1 22s infinite ease-in-out;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.8), rgba(245, 158, 11, 0.4));
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.particle-5 {
    bottom: 35%;
    right: 10%;
    animation: particleFloat2 17s infinite ease-in-out;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.8), rgba(239, 68, 68, 0.4));
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.particle-6 {
    top: 15%;
    right: 40%;
    animation: particleFloat3 19s infinite ease-in-out;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 0.4));
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.particle-7 {
    bottom: 45%;
    left: 15%;
    animation: particleFloat1 16s infinite ease-in-out;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.8), rgba(168, 85, 247, 0.4));
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.particle-8 {
    top: 70%;
    left: 45%;
    animation: particleFloat2 21s infinite ease-in-out;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.8), rgba(6, 182, 212, 0.4));
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.particle-9 {
    top: 30%;
    left: 60%;
    animation: particleFloat3 14s infinite ease-in-out;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.8), rgba(14, 165, 233, 0.4));
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.particle-10 {
    bottom: 20%;
    right: 30%;
    animation: particleFloat1 23s infinite ease-in-out;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.8), rgba(139, 92, 246, 0.4));
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

@keyframes particleFloat1 {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    33% {
        transform: translate(50px, -30px);
        opacity: 0.6;
    }
    66% {
        transform: translate(-30px, 20px);
        opacity: 0.4;
    }
}

@keyframes particleFloat2 {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }
    50% {
        transform: translate(-40px, 40px);
        opacity: 0.7;
    }
}

@keyframes particleFloat3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, 30px) scale(1.5);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -20px) scale(1);
        opacity: 0.6;
    }
    75% {
        transform: translate(40px, -10px) scale(0.8);
        opacity: 0.4;
    }
}

/* Removed geometric shapes - keeping only particles and grid */

/* Work Showcase Section with 3D iPhone */
.work-showcase-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-2xl);
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.showcase-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.showcase-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    justify-items: center;
}

.showcase-text {
    padding-right: var(--spacing-xl);
}

.showcase-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.showcase-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-weight: 300;
}

.showcase-subdescription {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
}

/* 3D iPhone Container - Three.js Implementation */
.phone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* Three.js iframe styles */
.iphone-3d-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
    background: transparent;
    overflow: hidden;
}

.iphone-3d-wrapper {
    width: 280px;
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3DPhone 20s infinite linear;
}

.iphone-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-10deg);
}

/* iPhone Frame Styles with Enhanced 3D Depth */
.iphone-frame {
    position: absolute;
    width: 300px;
    height: 600px;
    background:
        linear-gradient(145deg, #3a3a3a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-radius: 40px;
    padding: 10px;
    /* Multi-layered shadows and highlights for depth */
    box-shadow:
        /* Outer metallic rim */
        0 0 0 0.5px rgba(255, 255, 255, 0.3),
        0 0 0 1.5px #555,
        0 0 0 2px #333,
        0 0 0 3px #111,
        /* Progressive depth shadows */
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.25),
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 48px 96px rgba(0, 0, 0, 0.4),
        /* Inner bevels */
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        inset 2px 0 4px rgba(255, 255, 255, 0.1),
        inset -2px 0 4px rgba(0, 0, 0, 0.3),
        /* Top highlight */
        inset 0 10px 20px -10px rgba(255, 255, 255, 0.15),
        /* Bottom shadow */
        inset 0 -10px 20px -10px rgba(0, 0, 0, 0.5);
    transform: translateZ(20px);
    backface-visibility: hidden;
    position: relative;
    overflow: hidden;
}

/* Metallic shine effect */
.iphone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 100%
    );
    animation: metalShine 4s ease-in-out infinite;
    pointer-events: none;
}

/* Side edge bevel effect */
.iphone-frame::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 35px;
    border: 1px solid;
    border-color:
        rgba(255, 255, 255, 0.1)
        rgba(0, 0, 0, 0.2)
        rgba(0, 0, 0, 0.3)
        rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

@keyframes metalShine {
    0% {
        left: -100%;
    }
    50% {
        left: 200%;
    }
    100% {
        left: -100%;
    }
}

/* iPhone Front Face */
.iphone-front {
    transform: translateZ(10px);
}

/* iPhone Back (Camera Side) with Enhanced Depth */
.iphone-back {
    transform: rotateY(180deg) translateZ(10px);
    background:
        linear-gradient(145deg, #3a3a3a 0%, #1a1a1a 50%, #0a0a0a 100%);
    /* Match front frame styling for consistency */
    box-shadow:
        /* Outer metallic rim */
        0 0 0 0.5px rgba(255, 255, 255, 0.3),
        0 0 0 1.5px #555,
        0 0 0 2px #333,
        0 0 0 3px #111,
        /* Progressive depth shadows */
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.25),
        0 32px 64px rgba(0, 0, 0, 0.35),
        /* Inner bevels */
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        inset 2px 0 4px rgba(255, 255, 255, 0.1),
        inset -2px 0 4px rgba(0, 0, 0, 0.3);
}

/* iPhone Notch */
.iphone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 25px;
    background: #000;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

/* iPhone Screen with Glass Effect */
.iphone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0f1b 0%, #1a1f2e 100%);
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Inner depth for screen recess */
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3),
        inset 2px 0 5px rgba(0, 0, 0, 0.4),
        inset -2px 0 5px rgba(0, 0, 0, 0.4),
        /* Glass reflection effect */
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glass screen overlay for extra realism */
.iphone-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-radius: 30px;
    pointer-events: none;
    z-index: 1;
}

/* App Content Inside Phone */
.app-content {
    padding: 40px 20px;
    text-align: center;
    color: white;
    width: 100%;
}

.app-header {
    position: relative;
    margin-bottom: 40px;
}

.app-logo {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.app-circles {
    position: relative;
    height: 120px;
}

.app-circle {
    position: absolute;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid white;
}

.circle-1 {
    width: 60px;
    height: 60px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.circle-2 {
    width: 50px;
    height: 50px;
    top: 30px;
    left: 30%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.circle-3 {
    width: 55px;
    height: 55px;
    top: 30px;
    right: 30%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.circle-4 {
    width: 45px;
    height: 45px;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.app-text h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.app-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    line-height: 1.4;
}

.app-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.app-button:hover {
    transform: scale(1.05);
}

/* Camera Module on Back with 3D Depth */
.iphone-camera-module {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #333 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    /* Raised camera bump effect */
    box-shadow:
        /* Outer rim */
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 2px #222,
        /* Elevation shadows */
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.5),
        /* Inner bevel */
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}

.camera-lens {
    width: 35px;
    height: 35px;
    background:
        radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 30%),
        radial-gradient(circle,
            #1a1a1a 0%,
            #2a2a2a 30%,
            #1a1a1a 50%,
            #000 70%);
    border-radius: 50%;
    border: 2px solid;
    border-color: #444 #222 #111 #333;
    /* Deep lens effect */
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.8),
        inset 0 -1px 2px rgba(255, 255, 255, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Lens glass reflection */
.camera-lens::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    border-radius: 50%;
}

.camera-main {
    grid-column: 1;
    grid-row: 1;
}

.camera-ultra {
    grid-column: 2;
    grid-row: 1;
}

.camera-tele {
    grid-column: 1;
    grid-row: 2;
}

.camera-flash {
    grid-column: 2;
    grid-row: 2;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #ffe500 0%, #ffb700 100%);
    border-radius: 50%;
}

/* iPhone 3D Sides - Creating actual device thickness */
.iphone-side {
    position: absolute;
    background: linear-gradient(90deg,
        #5a5a5a 0%,
        #3a3a3a 20%,
        #2a2a2a 50%,
        #3a3a3a 80%,
        #5a5a5a 100%);
    /* Metallic stainless steel finish */
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.15),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Left Side */
.iphone-left {
    width: 20px;
    height: 600px;
    left: -10px;
    top: 0;
    transform: translateX(10px) rotateY(-90deg);
    transform-origin: center;
    border-radius: 0 40px 40px 0;
    background: linear-gradient(180deg,
        #6a6a6a 0%,
        #4a4a4a 5%,
        #3a3a3a 20%,
        #2a2a2a 50%,
        #3a3a3a 80%,
        #4a4a4a 95%,
        #6a6a6a 100%);
}

/* Right Side */
.iphone-right {
    width: 20px;
    height: 600px;
    right: -10px;
    top: 0;
    transform: translateX(-10px) rotateY(90deg);
    transform-origin: center;
    border-radius: 40px 0 0 40px;
    background: linear-gradient(180deg,
        #6a6a6a 0%,
        #4a4a4a 5%,
        #3a3a3a 20%,
        #2a2a2a 50%,
        #3a3a3a 80%,
        #4a4a4a 95%,
        #6a6a6a 100%);
}

/* Top and Bottom Edges */
.iphone-edge {
    position: absolute;
    background: linear-gradient(90deg,
        #6a6a6a 0%,
        #4a4a4a 10%,
        #2a2a2a 50%,
        #4a4a4a 90%,
        #6a6a6a 100%);
    box-shadow:
        inset 0 0 5px rgba(255, 255, 255, 0.2),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Top Edge */
.iphone-top {
    width: 300px;
    height: 20px;
    top: -10px;
    left: 0;
    transform: translateY(10px) rotateX(90deg);
    transform-origin: center;
    border-radius: 40px 40px 0 0;
}

/* Bottom Edge */
.iphone-bottom {
    width: 300px;
    height: 20px;
    bottom: -10px;
    left: 0;
    transform: translateY(-10px) rotateX(-90deg);
    transform-origin: center;
    border-radius: 0 0 40px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* iPhone Side Button Details */

/* Volume Buttons */
.volume-button {
    position: absolute;
    width: 4px;
    height: 40px;
    background: linear-gradient(180deg,
        #888 0%,
        #666 20%,
        #555 50%,
        #666 80%,
        #888 100%);
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%) translateZ(1px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 3px rgba(0, 0, 0, 0.4);
}

.volume-up {
    top: 100px;
}

.volume-down {
    top: 160px;
}

/* Mute Switch */
.mute-switch {
    position: absolute;
    width: 4px;
    height: 25px;
    background: linear-gradient(180deg,
        #ff8c42 0%,
        #ff6b35 30%,
        #ff4500 50%,
        #ff6b35 70%,
        #ff8c42 100%);
    border-radius: 2px;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateZ(1px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Power Button */
.power-button {
    position: absolute;
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg,
        #888 0%,
        #666 20%,
        #555 50%,
        #666 80%,
        #888 100%);
    border-radius: 2px;
    top: 140px;
    left: 50%;
    transform: translateX(-50%) translateZ(1px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 3px rgba(0, 0, 0, 0.4);
}

/* Bottom Port and Speakers */
.charging-port {
    width: 70px;
    height: 10px;
    background: linear-gradient(180deg, #111 0%, #000 50%, #111 100%);
    border-radius: 5px;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.9),
        inset 0 -1px 1px rgba(255, 255, 255, 0.1);
}

.speaker-grill {
    width: 45px;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #333 0px,
        #333 2px,
        #111 2px,
        #111 4px
    );
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* 3D Rotation Animation */
@keyframes rotatePhone {
    0% {
        transform: rotateY(0deg) rotateX(15deg) rotateZ(-3deg);
    }
    25% {
        transform: rotateY(90deg) rotateX(10deg) rotateZ(0deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(15deg) rotateZ(3deg);
    }
    75% {
        transform: rotateY(270deg) rotateX(10deg) rotateZ(0deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(15deg) rotateZ(-3deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .showcase-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .showcase-text {
        padding-right: 0;
        margin-bottom: var(--spacing-xl);
    }

    .phone-container {
        height: 500px;
    }

    .iphone {
        width: 250px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .showcase-title {
        font-size: clamp(2.5rem, 10vw, 5rem);
    }

    .iphone {
        width: 200px;
        height: 400px;
    }

    .phone-container {
        height: 400px;
    }
}

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

.name-line {
    display: block;
    overflow: visible;
    position: relative;
}

.letter {
    display: inline-block;
    opacity: 1;
    transform: none;
}

.hero-subtitle {
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
}

.subtitle-text {
    display: inline-block;
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--text-secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.5s 1.2s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-info {
    position: absolute;
    right: var(--spacing-2xl);
    bottom: var(--spacing-xl);
    max-width: 300px;
    opacity: 0;
    animation: fadeInFromRight 1s 1.2s forwards;
}

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

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

.info-text {
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    opacity: 0;
    animation: fadeIn 1s 1.5s forwards;
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--text-secondary), transparent);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Projects Section */
.projects-section {
    padding: var(--spacing-2xl);
}

.section-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
}

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

.title-text {
    font-weight: 600;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.project-item {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-lg);
    opacity: 0;
    transform: translateY(30px);
    animation: projectFadeIn 0.8s forwards;
    position: relative;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.project-item:nth-child(1) { animation-delay: 0.2s; }
.project-item:nth-child(2) { animation-delay: 0.4s; }
.project-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes projectFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--spacing-sm);
}

.project-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 500;
}

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

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    max-width: 600px;
}

.project-tags {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.project-tags span {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--accent);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(14, 165, 233, 0.1);
    transition: var(--transition);
}

.project-tags span:hover {
    background: rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

.project-media {
    width: 100%;
    max-width: 800px;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.project-media img,
.project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Section */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.info-column {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards;
}

.info-column:nth-child(1) { animation-delay: 0.2s; }
.info-column:nth-child(2) { animation-delay: 0.4s; }
.info-column:nth-child(3) { animation-delay: 0.6s; }

.info-heading {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent);
}

.info-paragraph {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.skill-group h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.skill-group ul {
    list-style: none;
}

.skill-group li {
    padding: 0.25rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.experience-list {
    list-style: none;
}

.experience-list li {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.875rem;
}

.exp-year {
    color: var(--text-secondary);
}

.exp-role {
    color: var(--text-primary);
    display: block;
}

.exp-company {
    color: var(--text-secondary);
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Contact Section */
.contact-content {
    max-width: 800px;
}

.contact-intro {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-link {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.contact-link:hover {
    padding-left: var(--spacing-md);
}

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

.contact-value {
    font-family: var(--font-primary);
}

.contact-footer {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-info {
        position: static;
        transform: none;
        margin-top: var(--spacing-lg);
        animation: fadeInFromRight 1s 0.8s forwards;
        max-width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .side-nav {
        display: none;
    }

    .hero-title {
        font-size: clamp(3rem, 10vw, 6rem);
    }

    .section {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .project-header {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .contact-link {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
}

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===========================
   Skills Grid Section
   =========================== */

.skills-container {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-category {
    margin-bottom: var(--spacing-xl);
    width: 100%;
    max-width: 800px;
}

.skill-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 120px));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    justify-content: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-sm);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.tech-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.tech-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.tech-item:hover img {
    filter: brightness(1.1);
}

.tech-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.tech-item:hover span {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: var(--spacing-sm);
    }

    .tech-item img {
        width: 36px;
        height: 36px;
    }

    .tech-item span {
        font-size: 0.7rem;
    }
}

/* ===========================
   Section Indicator
   =========================== */

.section-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-indicator.show {
    opacity: 1;
}

.section-indicator .indicator-text {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--color-primary);
    text-transform: uppercase;
    display: block;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sectionFadeInOut 2s ease-out forwards;
}

@keyframes sectionFadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
        filter: blur(10px);
        letter-spacing: 0.2em;
    }
    20% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
        letter-spacing: -0.02em;
    }
    80% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
        filter: blur(5px);
    }
}

/* Keep indicator visible on hover */
.section-indicator {
    pointer-events: auto;
}

.section-indicator:hover {
    opacity: 1 !important;
}

.section-indicator:hover .indicator-text {
    animation-play-state: paused;
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
}

/* ===========================
   Enhanced Section Transitions
   =========================== */

/* Improved section transitions with beautiful fade effects */
.section {
    position: relative;
}

.section.transitioning-out > * {
    animation: fadeOutContent 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.section.transitioning-in > * {
    animation: fadeInContent 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Beautiful text disappear effect */
@keyframes fadeOutContent {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-20px) scale(0.98);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
        filter: blur(5px);
        letter-spacing: 0.1em;
    }
}

/* Smooth text appear effect */
@keyframes fadeInContent {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(5px);
        letter-spacing: 0.1em;
    }
    50% {
        opacity: 0.5;
        transform: translateY(20px) scale(0.98);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
        letter-spacing: normal;
    }
}

/* Staggered animations for child elements */
.section.transitioning-in .hero-title,
.section.transitioning-in .section-title,
.section.transitioning-in .showcase-title {
    animation-delay: 0.1s;
}

.section.transitioning-in .hero-subtitle,
.section.transitioning-in .section-description {
    animation-delay: 0.2s;
}

.section.transitioning-in p,
.section.transitioning-in .info-text {
    animation-delay: 0.3s;
}

.section.transitioning-in .project-item {
    animation-delay: 0.4s;
}

/* Character fade effect for hero title */
.hero-title.animate-chars span {
    display: inline-block;
    opacity: 0;
    animation: charFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes charFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(-90deg) scale(0.5);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
        filter: blur(0);
    }
}

/* Parallax scroll fade effect */
.section:not(.active) {
    pointer-events: none;
}

.section.active {
    pointer-events: auto;
}

/* Smooth scroll snap for better transitions */
html {
    scroll-behavior: smooth;
}

/* Optional: Add scroll snap for precise section transitions */
.main-container {
    scroll-snap-type: y proximity;
}

.section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}