/* ====================================
   CSS RESET & BASE STYLES
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Glassmorphism Color Palette */
    --primary-purple: #8b5cf6;
    --secondary-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --dark-bg: #0f172a;
    --text-light: #f1f5f9;
    --text-muted: #cbd5e1;
    
    /* Glass Effect Variables */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets for touch devices */
    .btn, button, a, input, textarea {
        min-height: 44px;
    }
    
    .nav-links a {
        padding: 1rem 0;
        min-height: 48px;
    }
    
    .glass-card:hover {
        transform: none;
    }
    
    .glass-card:active {
        transform: scale(0.98);
    }
    
    .glass-btn:hover {
        transform: none;
    }
    
    .glass-btn:active {
        transform: scale(0.95);
    }
}

/* ====================================
   ANIMATED GRADIENT BACKGROUND
   ==================================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.7;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-purple) 0%, transparent 70%);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary-cyan) 0%, transparent 70%);
    top: 50%;
    right: -200px;
    animation-delay: -7s;
}

.blob-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
    bottom: -225px;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ====================================
   GLASS NAVIGATION
   ==================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

.glass-nav {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

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

.logo {
    text-decoration: none;
    color: var(--text-light);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-cyan));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-cyan);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-light);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition-smooth);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* ====================================
   GLASS CARD EFFECT
   ==================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(139, 92, 246, 0.3);
}

/* ====================================
   GLASS BUTTONS
   ==================================== */
.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 2rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-btn::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 ease;
}

.glass-btn:hover::before {
    left: 100%;
}

.glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    border-color: var(--primary-purple);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-cyan));
    border: none;
}

.btn-secondary {
    background: var(--glass-bg);
}

/* ====================================
   CONTAINER & SECTIONS
   ==================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====================================
   HERO SECTION
   ==================================== */
.hero-section {
    min-height: 100vh;
    padding-top: 8rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s backwards;
}

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

/* ====================================
   ABOUT SECTION
   ==================================== */
.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-smooth);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--secondary-cyan);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ====================================
   SKILLS SECTION
   ==================================== */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.skill-card {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 2rem 1rem;
    transition: var(--transition-smooth);
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.05);
}

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

.skill-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.skill-level {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ====================================
   PROJECTS SECTION
   ==================================== */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.project-card {
    flex: 1;
    min-width: 320px;
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--secondary-cyan);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: var(--secondary-cyan);
}

/* ====================================
   CONTACT SECTION
   ==================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--secondary-cyan);
}

.contact-info p {
    color: var(--text-muted);
    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: var(--text-muted);
}

.contact-item .icon {
    width: 24px;
    height: 24px;
    color: var(--primary-purple);
}

.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-item a:hover {
    color: var(--secondary-cyan);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.social-link svg {
    width: 24px;
    height: 24px;
}

/* ====================================
   CONTACT FORM
   ==================================== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-weight: 600;
    color: var(--text-light);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.05);
}

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

.contact-form button {
    width: 100%;
    cursor: pointer;
    border: none;
}

/* ====================================
   FOOTER
   ==================================== */
.footer {
    padding: 3rem 0 2rem 0;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    padding: 1.5rem;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Large Tablets & Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Tablets (968px and below) */
@media (max-width: 968px) {
    .hero-section {
        padding-top: 6rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-image {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .about-text {
        text-align: left;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Landscape & Small Tablets (768px and below) */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0.75rem 1.5rem;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        height: calc(100vh - 70px);
        padding: 3rem 2rem;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        padding: 0.5rem 0;
    }

    .mobile-menu-toggle {
        display: block;
        z-index: 1000;
    }
    
    section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

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

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .skill-card {
        padding: 1.5rem 1rem;
    }
    
    .skill-icon {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-tags {
        gap: 0.4rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    
    .contact-details {
        margin-bottom: 1.5rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .footer {
        margin-top: 2rem;
        padding: 2rem 0 1.5rem 0;
    }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    section {
        padding: 2.5rem 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .glass-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .glass-card {
        padding: 1.25rem;
        border-radius: 15px;
    }
    
    .about-image {
        max-width: 200px;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .skill-card {
        padding: 1.25rem 0.75rem;
    }
    
    .skill-icon {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }
    
    .skill-name {
        font-size: 1rem;
    }
    
    .skill-level {
        font-size: 0.85rem;
    }
    
    .projects-grid {
        gap: 1.25rem;
    }
    
    .project-image {
        height: 160px;
        border-radius: 12px;
    }
    
    .project-title {
        font-size: 1.3rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .project-link {
        display: flex;
        justify-content: center;
        padding: 0.5rem;
        background: var(--glass-bg);
        border-radius: 8px;
    }
    
    .contact-info h3,
    .about-text h3 {
        font-size: 1.4rem;
    }
    
    .contact-info p {
        font-size: 0.9rem;
    }
    
    .contact-item {
        font-size: 0.85rem;
    }
    
    .contact-item .icon {
        width: 20px;
        height: 20px;
    }
    
    .social-link {
        width: 42px;
        height: 42px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.6rem 0.85rem;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .footer p {
        font-size: 0.85rem;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        gap: 0.75rem;
    }
    
    .glass-card {
        padding: 1rem;
    }
    
    .nav-container {
        padding: 0.75rem;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 4rem 0 2rem 0;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .nav-links {
        padding: 1rem 2rem;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-description {
        margin-bottom: 1rem;
    }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* ====================================
   SCROLLBAR STYLING
   ==================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-cyan));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-cyan), var(--accent-pink));
}

/* ====================================
   LOADING & ANIMATION CLASSES
   ==================================== */
.fade-in {
    animation: fadeInUp 0.6s ease;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

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

/* ====================================
   ACCESSIBILITY
   ==================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--secondary-cyan);
    outline-offset: 2px;
}
