/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size for rem calculations */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Responsive Images and Media */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

video {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 50%, #0066cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #00d4ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #00d4ff, #0066cc);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.bar {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 204, 0.1) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cccccc;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0066cc);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00d4ff;
    color: #00d4ff;
}

.hero-image {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #999999;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #00d4ff;
}

.about-text p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #00d4ff;
}

.stat-label {
    color: #999999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 102, 204, 0.2));
    border-radius: 15px;
}

/* Skills Section */
.skills {
    background: #000000;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

.skill-category h3 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #cccccc;
    font-weight: 500;
}

.skill-item i {
    color: #00d4ff;
    font-size: 1.2rem;
    width: 24px;
}

/* Projects Section */
.projects {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #00d4ff 0%, #0066cc 100%);
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: #ffffff;
    font-size: 1.5rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #00d4ff;
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.project-content p {
    color: #cccccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Certifications Section */
.certifications {
    background: #000000;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
}

.cert-icon {
    background: linear-gradient(135deg, #00d4ff, #0066cc);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #ffffff;
}

.cert-card h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.cert-card p {
    color: #cccccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.cert-status {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: #cccccc;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #cccccc;
}

.contact-item i {
    color: #00d4ff;
    font-size: 1.2rem;
    width: 24px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: #cccccc;
    font-size: 1.5rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.contact-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #999999;
    font-size: 1rem;
    transition: all 0.3s ease;
    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;
    left: 10px;
    font-size: 0.85rem;
    color: #00d4ff;
    background: #1a1a1a;
    padding: 0 5px;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-status {
    margin-top: 1rem;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.form-status.success {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
    opacity: 1;
}

.form-status.error {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
    opacity: 1;
}

.form-status.loading {
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
}

/* Footer */
.footer {
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.footer-content {
    text-align: center;
    color: #999999;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content i {
    color: #ff4757;
}

/* Responsive Design */

/* Tablet Landscape (1024px and down) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3.8rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Tablet Portrait (768px and down) */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(30px);
        width: 100%;
        text-align: center;
        transition: all 0.3s ease;
        padding: 2rem 0;
        gap: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 50px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-title {
        font-size: 3.2rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-image {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .stats {
        justify-content: center;
        gap: 2rem;
    }

    .projects-grid,
    .skills-grid,
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }

    .floating-card {
        transform: scale(0.8);
    }
    
    .skill-category h3 {
        font-size: 1.3rem;
    }
    
    .contact-details {
        justify-content: center;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Large (480px and down) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
        height: 60px;
    }
    
    .nav-logo a {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        top: 60px;
        padding: 1.5rem 0;
    }

    .hero {
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
    }

    section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }

    .floating-card {
        display: none;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 200px;
        margin: 2rem auto;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .skill-items {
        gap: 0.8rem;
    }
    
    .skill-item {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .skill-item i {
        font-size: 1rem;
    }
    
    .project-card,
    .cert-card {
        padding: 1.5rem;
    }
    
    .project-content h3,
    .cert-card h3 {
        font-size: 1.2rem;
    }
    
    .project-content p,
    .cert-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .contact-item {
        font-size: 0.9rem;
        justify-content: center;
        text-align: center;
    }
    
    .contact-item i {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
}

/* Mobile Small (360px and down) */
@media screen and (max-width: 360px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .skill-item {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .project-card,
    .cert-card {
        padding: 1rem;
    }
}

/* Loading Animation - Only for hero buttons */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for mobile */
    .nav-link {
        padding: 0.8rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
        padding: 14px 28px;
    }
    
    .social-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .project-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .project-card:hover {
        transform: none;
    }
    
    .nav-link:hover::after {
        width: 0;
    }
    
    .btn:hover {
        transform: none;
    }
}
