:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #DEB887;
    --background-color: #0a0a0a;
    --text-color: #ffffff;
    --overlay-color: rgba(0, 0, 0, 0.8);
    --modal-bg: #1a1a1a;
    --body-font: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--background-color);
}

.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(10, 10, 10, 0.7),
        rgba(10, 10, 10, 0.8)
    );
    pointer-events: none;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    animation: fadeIn 1s ease-in;
}

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

.logo {
    width: 180px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

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

.logo:hover {
    transform: scale(1.05);
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin: 2rem auto;
    display: block;
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.3);
    transition: all 0.3s ease;
    min-width: 120px;
    min-height: 120px;
}

.profile-image:hover {
    transform: scale(1.05);
    border-color: var(--secondary-color);
    box-shadow: 0 0 30px rgba(139, 69, 19, 0.5);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    font-size: 3.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
    background: linear-gradient(45deg, var(--accent-color), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

h1:hover {
    transform: scale(1.01);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

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

.skill-button {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.skill-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 69, 19, 0.2),
        transparent
    );
    transition: 0.5s;
}

.skill-button:hover::before {
    left: 100%;
}

.skill-button:hover {
    background: rgba(139, 69, 19, 0.15);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.3),
                0 0 20px rgba(139, 69, 19, 0.2);
}

.skill-button i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-button:hover i {
    transform: rotateY(360deg);
    color: var(--secondary-color);
}

.skill-button span {
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
}

.skill-button span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.skill-button:hover span::after {
    width: 100%;
}

/* Modal Base Styling */
.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal-content {
    background: var(--modal-bg);
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    padding: 60px 20px 20px 20px;
}

.close-modal {
    position: fixed;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: var(--accent-color);
    background: var(--modal-bg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    border: 1px solid rgba(139, 69, 19, 0.2);
}

#modalTitle {
    margin-bottom: 20px;
}

@media (min-width: 769px) {
    .modal-content {
        width: 90%;
        max-width: 800px;
        height: auto;
        margin: 20px auto;
        border-radius: 15px;
        padding: 40px;
    }
}

/* Service Modal Content Styling */
.service-content, .qr-content {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.service-content .service-intro, .qr-content .qr-intro {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    line-height: 1.8;
    font-weight: 300;
}

.service-content h3, .qr-content h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.3em;
    font-weight: 500;
}

.service-content ul, .qr-content ul {
    margin-left: 1.2rem;
    margin-bottom: 1.5rem;
}

.service-content ul li, .qr-content ul li {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
    position: relative;
    font-weight: 300;
}

.service-content ul li::before, .qr-content ul li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: -1.2rem;
    font-size: 1.2em;
}

.service-highlight {
    background: rgba(139, 69, 19, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tech-grid span {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    background: rgba(139, 69, 19, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tech-grid span:hover {
    background: rgba(139, 69, 19, 0.3);
    transform: translateY(-2px);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.feature-list div {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    background: rgba(139, 69, 19, 0.2);
    padding: 0.8rem;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.feature-list div:hover {
    background: rgba(139, 69, 19, 0.3);
    transform: translateY(-2px);
}

.service-vision, .qr-vision {
    font-family: 'Poppins', sans-serif;
    font-style: italic;
    color: var(--accent-color);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 69, 19, 0.3);
    font-weight: 300;
}

.qr-license {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.qr-license strong {
    font-weight: 500;
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.5em;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
        padding: 1rem;
    }
}

@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    h1 {
        font-size: 2.8rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .qr-content .qr-intro {
        font-size: 1em;
    }

    .qr-license {
        padding: 1rem;
    }

    .service-content .service-intro {
        font-size: 1em;
    }

    .service-highlight {
        padding: 1rem;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2.5rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
        margin: 1rem auto;
    }

    .skill-button {
        padding: 1.5rem;
    }

    .skill-button i {
        font-size: 2rem;
    }

    .skill-button span {
        font-size: 1rem;
    }

    .logo {
        width: 150px;
    }

    .modal-content {
        margin: 20px;
        padding: 1.5rem;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        margin: 1rem auto;
        min-width: 120px;
        min-height: 120px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .container {
        padding: 0.5rem;
    }

    .logo {
        width: 130px;
    }

    .modal-content {
        margin: 10px;
        padding: 1.2rem;
        max-height: 80vh;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .skill-button:hover {
        transform: none;
    }

    .skill-button:active {
        transform: scale(0.98);
        background: rgba(139, 69, 19, 0.15);
    }
}

/* Ensure content is readable on very tall screens */
@media (min-height: 1000px) {
    .container {
        padding-top: 3rem;
    }
}

/* Handle ultra-wide screens */
@media (min-width: 2000px) {
    .container {
        max-width: 1400px;
    }

    h1 {
        font-size: 3.5rem;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    75% { transform: translateY(10px) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 69, 19, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(139, 69, 19, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 69, 19, 0); }
}

@keyframes pulseWhatsApp {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

@keyframes floatWhatsApp {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
    100% { transform: translateX(-50%) translateY(0); }
}

@keyframes nameGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(222, 184, 135, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(222, 184, 135, 0.5));
    }
}

.audio-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.audio-control button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-control button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.whatsapp-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(210, 105, 30, 0.3);
    animation: floatWhatsApp 3s ease-in-out infinite;
}

.whatsapp-button i {
    font-size: 24px;
    transition: transform 0.5s ease;
}

.whatsapp-button span {
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    animation: none;
}

.whatsapp-button:hover i {
    transform: rotate(-10deg);
}

.whatsapp-button:active {
    transform: translateX(-50%) translateY(-2px);
}
