/* ================================
   MAIN STYLES
   ================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0a0e1a;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

/* Responsive utility classes */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

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

.w-full {
    width: 100%;
}

.max-w-full {
    max-width: 100%;
}

/* Ensure images and media are responsive */
img,
video,
iframe,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================================
   HEADER & NAVIGATION
   ================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    transform: translateY(-100%);
    animation: slideDown 1s ease-out 0.5s forwards;
}

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

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d4aa, #00a0ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    animation: pulse 2s ease-in-out infinite alternate;
    flex-shrink: 0;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    flex-shrink: 0;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 8px 0;
    display: block;
}

.nav-menu li a:hover {
    color: #00d4aa;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4aa, #00a0ff);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    background: none;
    border: none;
    position: relative;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 100px 30px 30px;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav ul li {
    margin: 25px 0;
}

.mobile-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.mobile-nav ul li a:hover {
    color: #00d4aa;
    transform: translateX(10px);
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    opacity: 1;
    transform: translateY(0);
}

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

.hero-text {
    animation: slideInLeft 1s ease-out;
    max-width: 100%;
}

.hero-text h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.hero-text .highlight {
    display: block;
    font-weight: 700;
    background: linear-gradient(45deg, #00d4aa, #00a0ff, #ff6b6b);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: colorShift 3s ease-in-out infinite;
}

.hero-text .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #a0a9c0;
    margin-bottom: 40px;
    font-weight: 400;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
    line-height: 1.6;
}

.work-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideUp 1s ease-out 1s forwards;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    white-space: nowrap;
}

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

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

.work-button:hover {
    border-color: #00d4aa;
    background: rgba(0, 212, 170, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 1s ease-out 0.3s both;
    overflow: hidden;
}

.geometric-shape {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcf7f, #4ecdc4, #45b7d1);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: rotate 20s linear infinite, float 3s ease-in-out infinite alternate;
    max-width: 100%;
    max-height: 100%;
}

/* ================================
   ABOUT SECTION
   ================================ */

.about {
    padding: 120px 0;
    background: #0f1425;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(0, 212, 170, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

.about.animate h2 {
    opacity: 1;
    transform: translateX(0);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #a0a9c0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.2s;
    max-width: 100%;
    word-wrap: break-word;
}

.about.animate .about-text {
    opacity: 1;
    transform: translateY(0);
}

.about-image {
    width: 300px;
    height: 400px;
    background: url('https://media.giphy.com/media/xT9IgzoKnwFNmISR8I/giphy.gif') no-repeat center center;
    background-size: cover;
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out 0.4s;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 212, 170, 0.1), rgba(0, 160, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-image:hover::before {
    opacity: 1;
}

/* ================================
   CREDENTIALS SECTION
   ================================ */

.credentials {
    padding: 120px 0;
    background: #0a0e1a;
    position: relative;
}

.credentials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(0, 160, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.credentials h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.8s ease-out;
}

.credentials.animate h2 {
    opacity: 1;
    transform: translateY(0);
}

.credentials-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

.credential-item {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
    width: 100%;
    overflow: hidden;
}

.credentials.animate .credential-item:nth-child(1) { transition-delay: 0.1s; }
.credentials.animate .credential-item:nth-child(2) { transition-delay: 0.2s; }
.credentials.animate .credential-item:nth-child(3) { transition-delay: 0.3s; }

.credentials.animate .credential-item {
    opacity: 1;
    transform: translateX(0);
}

.credential-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00d4aa;
    margin-bottom: 10px;
}

.credential-value {
    font-size: 1rem;
    color: #a0a9c0;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.credential-list {
    list-style: none;
    padding: 0;
}

.credential-list li {
    margin-bottom: 20px;
    color: #a0a9c0;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.credential-list li strong {
    color: #fff;
    font-weight: 500;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.skill-tag {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 170, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ================================
   PROJECTS SECTION
   ================================ */

.projects {
    padding: 120px 0;
    background: #0a0e1a;
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 107, 107, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.projects h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.8s ease-out;
}

.projects.animate h2 {
    opacity: 1;
    transform: translateY(0);
}

.projects-grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #00d4aa rgba(255, 255, 255, 0.1);
}

.projects-grid::-webkit-scrollbar {
    height: 8px;
}

.projects-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #00d4aa, #00a0ff);
    border-radius: 4px;
}

.projects-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #00a0ff, #00d4aa);
}

.project-card {
    background: #1a1f35;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.6s ease-out;
    width: 350px;
    min-width: 350px;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
}

.projects.animate .project-card:nth-child(1) { transition-delay: 0.1s; }
.projects.animate .project-card:nth-child(2) { transition-delay: 0.2s; }
.projects.animate .project-card:nth-child(3) { transition-delay: 0.3s; }
.projects.animate .project-card:nth-child(4) { transition-delay: 0.4s; }
.projects.animate .project-card:nth-child(5) { transition-delay: 0.5s; }
.projects.animate .project-card:nth-child(6) { transition-delay: 0.6s; }

.projects.animate .project-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    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;
}

.project-card:hover .project-image::before {
    left: 100%;
}

.project-info {
    padding: 30px;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    word-wrap: break-word;
}

.project-description {
    font-size: 0.9rem;
    color: #a0a9c0;
    line-height: 1.6;
    word-wrap: break-word;
}

/* ================================
   CONTACT SECTION
   ================================ */

.contact {
    padding: 120px 0;
    background: #0f1425;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 212, 170, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.contact h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.8s ease-out;
}

.contact.animate h2 {
    opacity: 1;
    transform: translateY(0);
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease-out 0.2s;
    flex-wrap: wrap;
}

.contact.animate .contact-info {
    opacity: 1;
    transform: translateX(0);
}

.contact-email {
    font-size: 1.2rem;
    color: #00d4aa;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    word-break: break-all;
    flex-shrink: 0;
}

.contact-email::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00d4aa, #00a0ff);
    transition: left 0.3s;
}

.contact-email:hover::before {
    left: 0;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.4s;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.contact.animate .social-links {
    opacity: 1;
    transform: translateY(0);
}

.social-link {
    width: 45px;
    height: 45px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #00d4aa, #00a0ff);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 212, 170, 0.3);
}

.social-link img {
    z-index: 1;
    position: relative;
}

/* ================================
   SCROLL PROGRESS
   ================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #00d4aa, #00a0ff);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ================================
   SECTION ANIMATIONS
   ================================ */

section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-in-out;
}

section.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}