/* ===================================
   LEON MAREE - Dark Monochrome Portfolio
   =================================== */

/* Root Variables */
:root {
    --black: #000000;
    --white: #ffffff;
    --dark-gray: #0a0a0a;
    --medium-gray: #1a1a1a;
    --light-gray: #2a2a2a;
    --text-gray: #888888;
    --border-gray: #333333;
    
    --font-primary: 'Space Grotesk', monospace;
    --font-secondary: 'Poppins', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.8);
}

/* ===================================
   Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,.03) 2px, rgba(255,255,255,.03) 4px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.section-padding {
    padding: 120px 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* ===================================
   Glitch Effect
   =================================== */

.glitch {
    position: relative;
    color: var(--white);
    letter-spacing: 3px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch:hover::before {
    animation: glitch-1 0.3s ease-in-out 2;
    color: var(--white);
    z-index: -1;
}

.glitch:hover::after {
    animation: glitch-2 0.3s ease-in-out 2;
    color: var(--text-gray);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% {
        clip: rect(0, 900px, 0, 0);
        opacity: 0;
    }
    10% {
        clip: rect(30px, 900px, 40px, 0);
        transform: translate(-1px, 0);
        opacity: 0.7;
    }
    50% {
        clip: rect(80px, 900px, 90px, 0);
        transform: translate(1px, 0);
        opacity: 0.5;
    }
}

@keyframes glitch-2 {
    0%, 100% {
        clip: rect(0, 900px, 0, 0);
        opacity: 0;
    }
    20% {
        clip: rect(50px, 900px, 60px, 0);
        transform: translate(1px, 0);
        opacity: 0.5;
    }
    60% {
        clip: rect(20px, 900px, 30px, 0);
        transform: translate(-1px, 0);
        opacity: 0.3;
    }
}

/* ===================================
   Preloader - Nier Automata Inspired
   =================================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s, visibility 0.8s;
    overflow: hidden;
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Grid Lines Background */
.preloader-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.grid-line {
    position: absolute;
    background: #ffffff;
}

.grid-line-h {
    width: 100%;
    height: 1px;
}

.grid-line-h:nth-child(1) { top: 25%; }
.grid-line-h:nth-child(2) { top: 50%; }
.grid-line-h:nth-child(3) { top: 75%; }

.grid-line-v {
    width: 1px;
    height: 100%;
}

.grid-line-v:nth-child(4) { left: 25%; }
.grid-line-v:nth-child(5) { left: 50%; }
.grid-line-v:nth-child(6) { left: 75%; }

/* Hexagon Loader */
.preloader-center {
    position: relative;
    z-index: 2;
}

.hexagon-loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
}

.hex-piece {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffffff;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.hex-1 { top: 0; left: 50%; transform: translateX(-50%); animation: hex-pulse 1.5s ease-in-out infinite; }
.hex-2 { top: 25%; right: 10%; animation: hex-pulse 1.5s ease-in-out infinite 0.2s; }
.hex-3 { bottom: 25%; right: 10%; animation: hex-pulse 1.5s ease-in-out infinite 0.4s; }
.hex-4 { bottom: 0; left: 50%; transform: translateX(-50%); animation: hex-pulse 1.5s ease-in-out infinite 0.6s; }
.hex-5 { bottom: 25%; left: 10%; animation: hex-pulse 1.5s ease-in-out infinite 0.8s; }
.hex-6 { top: 25%; left: 10%; animation: hex-pulse 1.5s ease-in-out infinite 1s; }

@keyframes hex-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Loading Text */
.loading-text {
    text-align: center;
}

.glitch-text {
    position: relative;
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #ffffff;
    text-transform: uppercase;
    display: inline-block;
    animation: text-flicker 2s linear infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    animation: glitch-1-preloader 0.3s infinite;
    color: #00ffff;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2-preloader 0.3s infinite;
    color: #ff00ff;
    z-index: -2;
}

@keyframes text-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes glitch-1-preloader {
    0%, 100% { clip: rect(0, 900px, 0, 0); transform: translate(0); }
    20% { clip: rect(10px, 900px, 20px, 0); transform: translate(-2px, -1px); }
    40% { clip: rect(25px, 900px, 35px, 0); transform: translate(2px, 1px); }
    60% { clip: rect(5px, 900px, 15px, 0); transform: translate(-1px, 2px); }
    80% { clip: rect(30px, 900px, 40px, 0); transform: translate(1px, -2px); }
}

@keyframes glitch-2-preloader {
    0%, 100% { clip: rect(0, 900px, 0, 0); transform: translate(0); }
    20% { clip: rect(15px, 900px, 25px, 0); transform: translate(2px, 1px); }
    40% { clip: rect(8px, 900px, 18px, 0); transform: translate(-2px, -1px); }
    60% { clip: rect(20px, 900px, 30px, 0); transform: translate(1px, -2px); }
    80% { clip: rect(12px, 900px, 22px, 0); transform: translate(-1px, 2px); }
}

/* Loading Bar */
.loading-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px auto 10px;
    position: relative;
    overflow: hidden;
}

.loading-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #ffffff;
    animation: loading-progress 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes loading-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loading-percent {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* Corner Brackets */
.preloader-corners {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.corner-tl {
    top: 30px;
    left: 30px;
    border-right: none;
    border-bottom: none;
    animation: corner-pulse 2s ease-in-out infinite;
}

.corner-tr {
    top: 30px;
    right: 30px;
    border-left: none;
    border-bottom: none;
    animation: corner-pulse 2s ease-in-out infinite 0.5s;
}

.corner-bl {
    bottom: 30px;
    left: 30px;
    border-right: none;
    border-top: none;
    animation: corner-pulse 2s ease-in-out infinite 1s;
}

.corner-br {
    bottom: 30px;
    right: 30px;
    border-left: none;
    border-top: none;
    animation: corner-pulse 2s ease-in-out infinite 1.5s;
}

@keyframes corner-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Scan Line */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

@media (max-width: 768px) {
    .corner { display: none; }
    .hexagon-loader { width: 80px; height: 80px; }
    .loading-bar { width: 150px; }
}

/* ===================================
   Custom Cursor
   =================================== */

.cursor,
.cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    will-change: transform;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--white);
    transform: translate(-50%, -50%);
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--white);
    transform: translate(-50%, -50%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease;
    opacity: 0.6;
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(1.8);
}

.cursor-follower.hover {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
}

/* Cursor Trail Effect - Smooth and Aesthetic */
.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--white);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    z-index: 9997;
    mix-blend-mode: screen;
    will-change: opacity, transform;
}

.cursor-trail.active {
    animation: trail-fade-smooth 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes trail-fade-smooth {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0px);
        box-shadow: 0 0 8px rgba(255,255,255,0.6);
    }
    20% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 12px rgba(255,255,255,0.4);
    }
    40% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.5);
        filter: blur(1px);
    }
    70% {
        opacity: 0.15;
        transform: translate(-50%, -50%) scale(1.8);
        filter: blur(2px);
        box-shadow: 0 0 6px rgba(255,255,255,0.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
        filter: blur(3px);
        box-shadow: 0 0 0px rgba(255,255,255,0);
    }
}

/* Variety for trail particles */
.cursor-trail:nth-child(3n) {
    animation-duration: 1.4s;
    width: 3px;
    height: 3px;
}

.cursor-trail:nth-child(3n+1) {
    animation-duration: 1s;
    width: 5px;
    height: 5px;
}

.cursor-trail:nth-child(3n+2) {
    animation-duration: 1.1s;
}

@media (hover: none) {
    .cursor,
    .cursor-follower {
        display: none;
    }
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--border-gray);
}

.navbar.scrolled {
    padding: 15px 0;
    background: var(--black);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    filter: invert(1);
    border-radius: 5px;
}

/* Hide broken images */
.logo-img:not([src]),
.logo-img[src=""] {
    display: none;
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
}

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

.nav-link {
    position: relative;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-gray);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 0;
    transition: color var(--transition-normal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width var(--transition-normal);
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition-normal);
}

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

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

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

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: var(--black);
}

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

.hero-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-shape {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

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

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

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

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

.hero-tag {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--border-gray);
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.title-line {
    display: block;
}

.stroke-text {
    color: var(--white);
    opacity: 0.3;
    font-weight: 900;
}

@supports (-webkit-text-stroke: 1px white) {
    .stroke-text {
        -webkit-text-stroke: 1px var(--white);
        -webkit-text-fill-color: transparent;
        opacity: 1;
    }
}

.hero-description {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.8;
    font-family: var(--font-secondary);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    font-family: var(--font-primary);
    -webkit-appearance: none;
    touch-action: manipulation;
}

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

.btn-primary:hover {
    background: var(--text-gray);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border-gray);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.hero-visual {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
}

.profile-image {
    width: 100%;
    max-width: 500px;
    height: 600px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    border: 1px solid var(--border-gray);
    background: var(--dark-gray);
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

.hero-stats {
    position: absolute;
    bottom: -30px;
    right: -30px;
    display: flex;
    gap: 20px;
}

.stat-card {
    background: var(--black);
    border: 1px solid var(--border-gray);
    padding: 20px 30px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

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

.scroll-indicator span {
    display: block;
    font-size: 11px;
    color: var(--text-gray);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--border-gray);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* ===================================
   Section Headers
   =================================== */

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

.section-tag {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--border-gray);
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
    letter-spacing: 1px;
}

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

/* ===================================
   About Section
   =================================== */

.about {
    background: var(--black);
    border-top: 1px solid var(--border-gray);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text h3 {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--text-gray);
    font-weight: 400;
    letter-spacing: 1px;
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.8;
    font-family: var(--font-secondary);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-gray);
}

.feature-item i {
    color: var(--white);
    font-size: 16px;
}

.feature-item span {
    color: var(--text-gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skills-card {
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    padding: 40px;
}

.skills-card h4 {
    color: var(--white);
    margin-bottom: 30px;
    font-size: 16px;
    letter-spacing: 2px;
}

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

.skills-list li {
    color: var(--text-gray);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.experience-badge {
    position: absolute;
    top: -20px;
    right: -20px;
    background: var(--black);
    border: 1px solid var(--border-gray);
    padding: 30px;
    text-align: center;
}

.experience-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
}

.experience-text {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   Services Section
   =================================== */

.services {
    background: var(--dark-gray);
    border-top: 1px solid var(--border-gray);
}

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

.service-card {
    background: var(--black);
    border: 1px solid var(--border-gray);
    padding: 40px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
    transition: width var(--transition-normal);
}

.service-card:hover::before {
    width: 100%;
}

.service-card:hover {
    border-color: var(--white);
    transform: translateY(-5px);
}

.service-card.featured {
    border-color: var(--white);
}

.service-icon {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--white);
}

.service-card h3 {
    font-size: 16px;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.service-card p {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
    font-family: var(--font-secondary);
}

.service-list {
    list-style: none;
    margin-bottom: 20px;
}

.service-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-gray);
    font-size: 14px;
}

.service-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--border-gray);
}

/* ===================================
   Clients Section
   =================================== */

.clients {
    background: linear-gradient(180deg, var(--black) 0%, var(--dark-gray) 50%, var(--black) 100%);
    border-top: 1px solid var(--border-gray);
    position: relative;
    overflow: hidden;
}

.clients::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.02) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.clients-typography {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 50px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

.client-name {
    position: relative;
    display: inline-block;
    padding: 15px 30px;
    overflow: hidden;
}

.client-name span {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--white);
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-block;
    position: relative;
    z-index: 2;
}

.client-name::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.client-name:hover span {
    opacity: 1;
    letter-spacing: 0.2em;
    transform: translateY(-2px);
}

.client-name:hover::before {
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Client Typography Animations */
.client-name:nth-child(1),
.client-name:nth-child(5) {
    animation: client-fade 3s ease-in-out infinite;
    animation-delay: 0s;
}

.client-name:nth-child(2),
.client-name:nth-child(6) {
    animation: client-fade 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.client-name:nth-child(3),
.client-name:nth-child(7) {
    animation: client-fade 3s ease-in-out infinite;
    animation-delay: 1s;
}

.client-name:nth-child(4),
.client-name:nth-child(8) {
    animation: client-fade 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes client-fade {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.7;
    }
}

/* Responsive adjustments for clients typography */
@media (max-width: 768px) {
    .clients-typography {
        gap: 20px 30px;
        padding: 40px 15px;
    }
    
    .client-name span {
        font-size: 16px;
        letter-spacing: 0.12em;
    }
    
    .client-name {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .clients-typography {
        gap: 15px 20px;
        padding: 30px 10px;
    }
    
    .client-name span {
        font-size: 14px;
        letter-spacing: 0.1em;
    }
    
    .client-name {
        padding: 10px 15px;
    }
    
    .client-name:hover span {
        letter-spacing: 0.15em;
    }
}

/* ===================================
   Portfolio Section
   =================================== */

.portfolio {
    background: var(--black);
    border-top: 1px solid var(--border-gray);
}

/* Video Showcase */
.video-showcase {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-gray);
}

.showcase-title {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
    color: var(--white);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    align-items: start;
}

.video-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-item.portrait {
    max-width: 360px;
    margin: 0 auto;
}

.video-player {
    width: 100%;
    height: auto;
    max-height: 600px;
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
}

.video-item.portrait .video-player {
    max-width: 360px;
}

.video-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    min-height: 200px;
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-title {
    margin-top: 15px;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-gray);
    text-transform: uppercase;
    text-align: center;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--border-gray);
    color: var(--text-gray);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    border-color: var(--white);
    color: var(--white);
}

.filter-btn.active {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-gray);
    transition: all var(--transition-normal);
}

.portfolio-item:hover {
    border-color: var(--white);
}

.portfolio-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: all var(--transition-normal);
    background: var(--dark-gray);
    display: block;
}

.portfolio-item:hover .portfolio-img {
    filter: grayscale(50%) contrast(1.2);
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-normal);
}

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

.overlay-content {
    text-align: center;
    color: var(--white);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.portfolio-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.overlay-content p {
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--white);
    color: var(--white);
    font-size: 18px;
    transition: all var(--transition-normal);
    touch-action: manipulation;
}

.portfolio-link:hover {
    background: var(--white);
    color: var(--black);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.image-placeholder i {
    color: var(--text-gray);
}

.image-placeholder span {
    color: var(--text-gray);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===================================
   Experience Section (Timeline)
   =================================== */

.experience {
    background: var(--dark-gray);
    border-top: 1px solid var(--border-gray);
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-gray);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    padding: 40px;
    width: 50%;
    margin-bottom: 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 60px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--black);
    border: 2px solid var(--white);
    top: 50px;
}

.timeline-item:nth-child(odd)::before {
    right: -8px;
}

.timeline-item:nth-child(even)::before {
    left: -8px;
}

.timeline-date {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.timeline-content {
    background: var(--black);
    border: 1px solid var(--border-gray);
    padding: 30px;
}

.timeline-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.timeline-content h4 {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 400;
    margin-bottom: 20px;
}

.timeline-content p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    font-family: var(--font-secondary);
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-skills span {
    padding: 5px 15px;
    border: 1px solid var(--border-gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray);
}

.timeline-item.education .timeline-content {
    border-color: var(--white);
}

.traits-section {
    margin-top: 80px;
    text-align: center;
}

.traits-section h3 {
    margin-bottom: 40px;
    font-size: 24px;
    letter-spacing: 3px;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.trait-item {
    padding: 30px;
    border: 1px solid var(--border-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all var(--transition-normal);
}

.trait-item:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.02);
}

.trait-item i {
    font-size: 24px;
    color: var(--white);
}

.trait-item span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-gray);
}

/* ===================================
   Contact Section
   =================================== */

.contact {
    background: var(--black);
    border-top: 1px solid var(--border-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-card {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.info-icon {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
}

.info-text h3 {
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.info-text p {
    color: var(--text-gray);
    line-height: 1.6;
    font-family: var(--font-secondary);
}

.social-links {
    margin-top: 40px;
}

.social-links h3 {
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all var(--transition-normal);
}

.social-icons a:hover {
    border-color: var(--white);
    color: var(--white);
}

.contact-form {
    background: var(--dark-gray);
    border: 1px solid var(--border-gray);
    padding: 40px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid var(--border-gray);
    background: transparent;
    font-size: 14px;
    color: var(--white);
    transition: border-color var(--transition-normal);
    font-family: var(--font-primary);
}

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

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-gray);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--transition-normal);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    font-size: 10px;
    color: var(--white);
}

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

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--black);
    color: var(--text-gray);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-gray);
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-main {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo-img {
    width: 30px;
    height: 30px;
    filter: invert(1);
    object-fit: cover;
}

.footer-description {
    font-size: 14px;
    line-height: 1.6;
    font-family: var(--font-secondary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
}

.footer-bottom-links a {
    color: var(--text-gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
}

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

/* ===================================
   Back to Top Button
   =================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--black);
    border: 1px solid var(--border-gray);
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

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

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

/* ===================================
   Scroll Progress
   =================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--white);
    z-index: 10000;
    transition: width 0.2s ease;
}

/* ===================================
   Mobile-First Responsive Design
   =================================== */

/* Tablets and smaller laptops */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .about-grid,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px !important;
        padding-right: 40px !important;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::before {
        left: 12px !important;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        padding: 15px 0;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-img {
        width: 30px;
        height: 30px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--black);
        transition: left var(--transition-normal);
        border-top: 1px solid var(--border-gray);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 40px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 20px;
    }
    
    .title-line {
        display: inline;
    }
    
    .stroke-text {
        display: block;
        margin-top: 10px;
    }
    
    .hero-description {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 30px;
    }
    
    .hero-tag {
        font-size: 10px;
        padding: 8px 15px;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 25px;
        font-size: 13px;
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Profile Image */
    .profile-image {
        height: 400px;
        margin-top: 40px;
    }
    
    .hero-stats {
        position: static;
        margin-top: 20px;
        justify-content: center;
    }
    
    .stat-card {
        padding: 15px 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    /* Sections */
    .section-padding {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .section-tag {
        font-size: 10px;
        padding: 8px 15px;
    }
    
    .section-description {
        font-size: 14px;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 30px 25px;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-filters {
        gap: 10px;
        margin-bottom: 40px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 11px;
        min-width: 80px;
        touch-action: manipulation;
    }
    
    /* Video Grid */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-showcase {
        margin-top: 40px;
        padding-top: 40px;
    }
    
    /* Clients */
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .client-item {
        padding: 25px;
        min-height: 120px;
    }
    
    .client-logo {
        max-width: 70px;
    }
    
    /* Experience Timeline */
    .timeline::before {
        display: none;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding: 20px 0 !important;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .traits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .trait-item {
        padding: 20px;
    }
    
    /* Contact */
    .info-card {
        margin-bottom: 25px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-links {
        gap: 20px;
    }
    
    /* Utilities */
    .scroll-indicator {
        display: none;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Disable complex animations on mobile */
    .parallax-element,
    .parallax-layer {
        transform: none !important;
    }
    
    .floating-shape {
        display: none;
    }
}

/* Mobile Phones - Extreme Optimization */
@media (max-width: 480px) {
    /* Global */
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    /* Navigation */
    .navbar {
        padding: 15px 0;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .nav-toggle {
        width: 44px;
        height: 44px;
        touch-action: manipulation;
    }
    
    .nav-list {
        padding: 30px 20px;
    }
    
    .nav-list li a {
        padding: 12px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Hero */
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: -0.01em;
    }
    
    .hero-tag {
        font-size: 9px;
        padding: 6px 12px;
    }
    
    .hero-description {
        font-size: 13px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 11px;
    }
    
    .profile-image {
        height: 300px;
    }
    
    .hero-stats {
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px 15px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    /* Section Headers */
    .section-title {
        font-size: 1.5rem;
        letter-spacing: 0;
    }
    
    .section-tag {
        font-size: 9px;
        padding: 6px 12px;
    }
    
    .section-description {
        font-size: 13px;
        padding: 0 10px;
    }
    
    /* About */
    .about-text h3 {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .about-text p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }
    
    .feature-item {
        padding: 8px;
        font-size: 12px;
    }
    
    .skills-card {
        padding: 25px 20px;
    }
    
    .skills-card h4 {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .skills-list li {
        font-size: 12px;
        padding: 8px 0;
    }
    
    /* Services */
    .service-card {
        padding: 25px 20px;
    }
    
    .service-card h3 {
        font-size: 14px;
    }
    
    .service-card p {
        font-size: 13px;
    }
    
    .service-list li {
        font-size: 12px;
        padding: 6px 0 6px 15px;
    }
    
    /* Clients */
    .clients-typography {
        gap: 20px 30px;
        padding: 40px 15px;
    }
    
    .client-name span {
        font-size: 16px;
        letter-spacing: 0.1em;
    }
    
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-item {
        padding: 20px;
        min-height: 100px;
    }
    
    .client-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .client-logo {
        max-width: 60px;
    }
    
    /* Adjust borders for mobile grid */
    .client-item:nth-child(even) {
        border-right: none;
    }
    
    .client-item:nth-child(odd) {
        border-left: none;
    }
    
    /* Portfolio */
    .portfolio-filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 9px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .portfolio-image {
        height: 250px;
    }
    
    .overlay-content h3 {
        font-size: 16px;
    }
    
    .overlay-content p {
        font-size: 12px;
    }
    
    /* Video Showcase */
    .showcase-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .video-title {
        font-size: 10px;
        margin-top: 10px;
    }
    
    /* Experience */
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-content h3 {
        font-size: 14px;
    }
    
    .timeline-content h4 {
        font-size: 13px;
    }
    
    .timeline-content p {
        font-size: 12px;
    }
    
    .timeline-skills span {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .timeline-date {
        font-size: 10px;
    }
    
    .traits-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .trait-item {
        padding: 15px;
    }
    
    .trait-item i {
        font-size: 20px;
    }
    
    .trait-item span {
        font-size: 10px;
    }
    
    /* Contact */
    .info-card {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .info-text h3 {
        font-size: 12px;
    }
    
    .info-text p {
        font-size: 13px;
    }
    
    .social-links h3 {
        font-size: 12px;
    }
    
    .social-icons a {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .contact-form {
        padding: 20px 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 13px;
        padding: 10px 0;
    }
    
    .form-group label {
        font-size: 10px;
    }
    
    /* Footer */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-description {
        font-size: 12px;
    }
    
    .footer-bottom p {
        font-size: 10px;
    }
    
    .footer-bottom-links a {
        font-size: 10px;
    }
    
    /* Glitch effect - simplified for mobile */
    .glitch::before,
    .glitch::after {
        display: none;
    }
    
    /* Disable AOS on mobile for performance */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* High DPI screens (like Galaxy S24 Ultra) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-title {
        font-weight: 800;
        -webkit-font-smoothing: subpixel-antialiased;
    }
    
    .section-title {
        font-weight: 800;
        -webkit-font-smoothing: subpixel-antialiased;
    }
    
    /* Sharper borders */
    .btn,
    .service-card,
    .portfolio-item,
    .timeline-content {
        border-width: 0.5px;
    }
    
    /* Better image rendering */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 0 40px;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .profile-image {
        height: 250px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}

/* ===================================
   Mobile-Specific Enhancements
   =================================== */

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    /* All interactive elements should be at least 44x44px */
    button,
    .btn,
    .filter-btn,
    .nav-toggle,
    .back-to-top,
    a.portfolio-link {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Prevent text selection on tap */
    .btn,
    .filter-btn,
    button {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Smoother scrolling on iOS */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    
    /* Better video player on mobile */
    video {
        width: 100%;
        height: auto;
        display: block;
    }
    
    /* Optimize video embed for mobile */
    .video-embed-wrapper {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .video-embed-wrapper iframe {
        border-radius: 8px;
    }
    
    /* Disable hover effects on touch devices */
    @media (hover: none) and (pointer: coarse) {
        .service-card:hover,
        .portfolio-item:hover,
        .client-name:hover {
            transform: none;
        }
        
        /* Keep active/tap states */
        .btn:active {
            transform: scale(0.98);
        }
        
        .filter-btn:active {
            transform: scale(0.95);
        }
    }
    
    /* Improve form inputs on mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 0;
    }
    
    /* Better spacing for mobile readability */
    p {
        margin-bottom: 1.2em;
        line-height: 1.7;
    }
}

/* Prevent body scroll when nav is open */
body.nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS Safari bottom bar */
    .hero {
        min-height: -webkit-fill-available;
    }
    
    /* Better video controls on iOS */
    video::-webkit-media-controls-start-playback-button {
        display: none !important;
        -webkit-appearance: none;
    }
}