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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --shadow-primary: 0 25px 50px -12px rgba(99, 102, 241, 0.25);
    --shadow-secondary: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography scale */
    --fs-hero: clamp(3rem, 7vw, 5rem);
    --fs-display: clamp(2rem, 5vw, 3rem);
    --fs-h2: 1.5rem;    /* 24px */
    --fs-h3: 1.25rem;   /* 20px */
    --fs-body-lg: 1.125rem; /* 18px */
    --fs-body: 1rem;    /* 16px */
    --fs-small: 0.9rem; /* 14-15px */
    --fs-stat: 2rem;    /* 32px */
    --lh-tight: 1.1;
    --lh-normal: 1.6;
    --lh-relaxed: 1.8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: var(--lh-normal);
    overflow-x: hidden;
    cursor: none;
}

/* Custom Cursor */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
    mix-blend-mode: difference;
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.05s ease-out;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loading-logo {
    margin-bottom: 2rem;
}

.loading-text {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2em;
    animation: pulse 2s ease-in-out infinite;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

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

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: loading-progress 2s ease-in-out infinite;
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav.scrolled {
    padding: 0.5rem 0;
    background: rgba(10, 10, 10, 0.95);
}

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

.nav-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

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

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

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

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

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

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

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

#hero-canvas {
    width: 100%;
    height: 100%;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: 900;
    line-height: var(--lh-tight);
    margin-bottom: 2rem;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.title-line {
    display: block;
    overflow: hidden;
    will-change: transform, opacity;
    transform: translateZ(0);
}

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

.hero-subtitle {
    font-size: var(--fs-body-lg);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 520px;
    will-change: transform, opacity;
    transform: translateZ(0);
}

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

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: var(--fs-stat);
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: var(--fs-small);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Make CTA buttons clickable across their area on mobile */
.hero-cta .btn-primary,
.hero-cta .btn-secondary {
    pointer-events: auto;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 35px 60px -12px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover .btn-bg {
    left: 100%;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 400px;
}

.element {
    position: absolute;
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.8;
}

.element-1 { top: 10%; left: 20%; animation-delay: 0s; }
.element-2 { top: 30%; right: 10%; animation-delay: 1s; }
.element-3 { bottom: 40%; left: 10%; animation-delay: 2s; }
.element-4 { top: 60%; right: 30%; animation-delay: 3s; }
.element-5 { bottom: 10%; left: 50%; animation-delay: 4s; }

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

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

.scroll-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--gradient-primary);
    margin: 0 auto;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 8px solid var(--primary-color);
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Styles */
section {
    padding: 8rem 0;
    position: relative;
}

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

.section-title {
    font-size: var(--fs-display);
    font-weight: 900;
    position: relative;
    display: inline-block;
}

.title-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    z-index: -1;
    white-space: nowrap;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

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

.about-intro {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.skills-grid {
    display: grid;
    gap: 2rem;
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.skill:hover {
    background: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.code-preview {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-secondary);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

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

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28ca42; }

.code-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.code-content {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.code-keyword { color: #ff79c6; }
.code-variable { color: #8be9fd; }
.code-function { color: #50fa7b; }
.code-string { color: #f1fa8c; }
.code-indent { color: transparent; }

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    box-shadow: var(--shadow-primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-title {
    font-size: var(--fs-h2);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-features span {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Portfolio Section */
.portfolio {
    background: var(--bg-secondary);
}

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

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-color: transparent;
}

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

.portfolio-item {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-primary);
    border-color: rgba(99, 102, 241, 0.35);
}

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

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

/* Maintain consistent logo box */
.portfolio-placeholder::before { content: none; }

/* Portfolio logos */
.portfolio-placeholder.has-logo {
    background: var(--bg-tertiary);
}

.portfolio-placeholder .portfolio-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1) contrast(1.05);
    display: block;
}

/* Allow per-item control: contain with padding for wide/tall logos */
.portfolio-placeholder.logo-contain .portfolio-logo { object-fit: contain; padding: 10%; }

.portfolio-placeholder.has-logo .placeholder-icon,
.portfolio-placeholder.has-logo .placeholder-text {
    display: none;
}

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

.placeholder-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.portfolio-overlay {
    display: none;
}

.portfolio-item:hover .portfolio-overlay { display: none; }

.portfolio-btn {
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.portfolio-btn:hover {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: var(--fs-body);
}

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

.portfolio-tech span {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(10px);
}

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

.contact-details h3 {
    font-size: var(--fs-h3);
    margin-bottom: 0.5rem;
}

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

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-color);
    border-bottom-color: transparent;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition);
}

.form-input::placeholder {
    color: transparent;
    transition: var(--transition);
}

.form-input:focus::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    background: var(--bg-primary);
    padding: 0 0.5rem;
    color: var(--primary-color);
}

/* Float label for selects on focus or once a non-empty value is chosen */
.form-select:focus + .form-label,
.form-select:valid + .form-label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.8rem;
    background: var(--bg-primary);
    padding: 0 0.5rem;
    color: var(--primary-color);
}

/* Better native select appearance on mobile */
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.6) 50%),
                      linear-gradient(135deg, rgba(255,255,255,0.6) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 15px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
}

@media (max-width: 768px) {
    .form-input, .form-select {
        font-size: 16px; /* prevent iOS zoom on focus */
        padding: 0.9rem 1rem;
    }
}

.form-submit {
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
}

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

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

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        /* Mobile typography scale */
        --fs-hero: clamp(2.2rem, 8vw, 3rem);
        --fs-display: clamp(1.6rem, 7vw, 2.2rem);
        --fs-h2: 1.25rem;     /* 20px */
        --fs-h3: 1.1rem;      /* 17-18px */
        --fs-body-lg: 1rem;   /* 16px */
        --fs-body: 0.95rem;   /* 15px */
        --fs-small: 0.85rem;  /* 13-14px */
        --fs-stat: 1.6rem;    /* 26px */
    }

    /* Hide custom cursor on mobile and restore native cursor */
    body { cursor: auto; }
    .cursor-follower, .cursor-dot { display: none !important; }

    /* Stabilize hero height to avoid jumps on mobile UI chrome changes */
    .hero { min-height: 100svh; }

    /* Avoid text width jumps for numbers */
    .stat-number { font-variant-numeric: tabular-nums; }
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Show mobile menu when toggled */
    .nav.menu-open .nav-menu {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        background: rgba(10, 10, 10, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 2rem;
        backdrop-filter: blur(12px);
    }
    
    /* Hide floating emojis on mobile */
    .floating-elements { display: none; }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        margin-left: auto;
        margin-right: auto;
        justify-items: center;
        align-items: center;
        /* Ensure grid tracks are centered on Android */
        justify-content: center;
        align-content: center;
    }

    .hero-text { margin-left: auto; margin-right: auto; }
    .hero-visual { margin-left: auto; margin-right: auto; }
    
    .hero-stats {
        justify-content: center;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content { 
        justify-items: center; 
        /* Additional centering for Android */
        justify-content: center;
        align-content: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
    .contact-form, .contact-info { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
} 