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

:root {
    /* Light Theme Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --secondary-color: #a78bfa;
    --accent-color: #f472b6;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #4b5563;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body.loaded section {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure sections are visible by default */
section {
    opacity: 1;
    transform: translateY(0);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    transition: var(--transition-slow);
    overflow-x: hidden;
}

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

.section-padding {
    padding: 80px 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.dot {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

.resume-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resume-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.close-menu {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    gap: 24px;
    overflow-y: auto;
}

.mobile-nav-link {
    font-size: 1.25rem;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-footer {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--border-color);
}

.mobile-theme-toggle {
    width: 100%;
    height: 48px;
    border-radius: var(--border-radius);
    justify-content: center;
    gap: 12px;
}

.mobile-resume-btn {
    width: 100%;
    height: 48px;
    justify-content: center;
}

/*===================== Hero Section=============== */
.hero {
    padding: 160px 0 80px;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-secondary);
    min-height: 36px;
}

.typed-text {
    color: var(--primary-color);
    font-weight: 600;
}

.cursor {
    display: inline-block;
    width: 3px;
    margin-left: 2px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-social {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Hero Image */
.hero-image {
    position: relative;
}

.image-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 10px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--bg-primary);
}

.hero-badge {
    position: absolute;
    bottom: 20px;
    right: 0;
    background-color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-text {
    font-weight: 600;
    color: var(--primary-color);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.fe1 {
    top: 20%;
    left: -5px;
    animation-delay: 0s;
}

.fe2 {
    top: 20%;
    right: -20px;
    animation-delay: 1s;
}

.fe3 {
    bottom: 40%;
    left: -20px;
    animation-delay: 2s;
}

.fe4 {
    bottom: 20%;
    right: 5px;
    animation-delay: 3s;
}
.fe5 {
    bottom: 40%;
    right: -5%;
    animation-delay: 4s;
}
.fe6 {
    top:65%;
    left: -10px;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

.section-description {
    max-width: 600px;
    margin: 20px auto 0;
}

/* ==================About Section =====================*/
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.about-profile-image {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius-xl);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 15px;
}

.about-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 8px solid var(--bg-primary);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--bg-primary);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.about-badge i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.about-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-description {
    margin-bottom: 30px;
    font-size: 1.125rem;
}

.about-details {
    margin-bottom: 30px;
}

.detail {
    display: flex;
    margin-bottom: 12px;
}

.detail-label {
    font-weight: 600;
    width: 120px;
    color: var(--text-primary);
}

.detail-value {
    color: var(--text-secondary);
}

.available {
    color: #10b981;
    font-weight: 600;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/*======================= Skills Section =====================*/
.skills-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.skills-category {
    margin-bottom: 40px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.category-title i {
    color: var(--primary-color);
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skill {
    margin-bottom: 20px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-name {
    font-weight: 500;
    color: var(--text-primary);
}

.skill-percent {
    font-weight: 600;
    color: var(--primary-color);
}

.skill-bar {
    height: 10px;
    background-color: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease;
}

.technologies {
    margin-top: 60px;
}

.technologies-title {
    text-align: center;
    margin-bottom: 40px;
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 30px;
}

.tech-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.tech-icon:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: var(--primary-color);
    color: white;
}

.tech-icon i {
    font-size: 2.5rem;
}

.tech-icon span {
    font-size: 0.875rem;
    font-weight: 500;
}

/*==================== Projects Section ===================*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.project-link:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.project-content {
    padding: 24px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tag {
    padding: 6px 12px;
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.project-description {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-btn {
    padding: 8px 20px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.project-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

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

/*========================== Contact Section======================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

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

.contact-details h4 {
    margin-bottom: 4px;
    font-size: 1.25rem;
}

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

.contact-social {
    margin-top: 20px;
}

.contact-social h4 {
    margin-bottom: 16px;
}

.contact-form {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--border-radius-lg);
}

.form-group {
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

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

.form-group textarea {
    resize: vertical;
}

/*=========================== Footer ==========================*/
.footer {
    background-color: var(--bg-secondary);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo .logo {
    font-size: 2rem;
    margin-bottom: 16px;
}

.footer-description {
    margin-bottom: 0;
}

.footer-links h4 {
    margin-bottom: 24px;
    font-size: 1.25rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 8px;
}

.newsletter-form {
    display: flex;
    margin-top: 16px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.newsletter-form button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 16px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================ */
/* RESPONSIVE DESIGN - MOBILE FIRST APPROACH */
/* ============================================ */

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Large devices (desktops, 992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .image-container {
        width: 350px;
        height: 350px;
    }

    .about-profile-image {
        height: 350px;
    }
}

/* Medium devices (tablets, 768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* Navigation */
    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .resume-btn span {
        display: none;
    }

    .resume-btn {
        padding: 10px 15px;
    }

    /* Hero Section */
    .hero {
        padding: 140px 0 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-text {
        order: 2;
    }

    .image-container {
        order: 1;
        width: 300px;
        height: 300px;
    }

    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    /* Adjust floating elements for tablet */
    .floating-element {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .fe1 {
        top: 5%;
        left: -15px;
    }

    .fe2 {
        top: 15%;
        right: -15px;
    }

    .fe3 {
        bottom: 25%;
        left: -15px;
    }

    .fe4 {
        bottom: 5%;
        right: -15px;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .about-image-container {
        max-width: 300px;
    }

    .about-profile-image {
        height: 300px;
    }

    .about-badge {
        bottom: -15px;
        right: -15px;
        padding: 12px 20px;
    }

    .about-details {
        text-align: left;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .about-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 25px;
    }

    /* Skills Section */
    .skills-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .tech-icons {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 25px;
    }

    /* Projects Section */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .contact-form {
        padding: 30px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-logo {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    /* Section Padding Adjustment */
    .section-padding {
        padding: 70px 0;
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }

    /* Typography */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Hero Section */
    .hero {
        padding: 120px 0 50px;
    }

    .image-container {
        width: 280px;
        height: 280px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Floating elements - adjust for smaller screens */
    .floating-element {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* About Section */
    .about-image-container {
        max-width: 280px;
    }

    .about-profile-image {
        height: 280px;
    }

    .about-profile-image img {
        border-width: 6px;
    }

    .about-badge {
        padding: 10px 16px;
        font-size: 0.875rem;
        bottom: -10px;
        right: -10px;
    }

    /* Skills Section */
    .skill-bar {
        height: 8px;
    }

    .tech-icons {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 20px;
    }

    .tech-icon {
        padding: 15px;
    }

    .tech-icon i {
        font-size: 2rem;
    }

    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-content {
        padding: 20px;
    }

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

    .project-btn {
        width: 100%;
        justify-content: center;
    }

    /* Contact Section */
    .contact-item {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin-bottom: 10px;
    }

    .contact-form {
        padding: 25px 20px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        display: inline-block;
        text-align: center;
    }

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

    .newsletter-form input {
        border-radius: var(--border-radius);
        margin-bottom: 10px;
    }

    .newsletter-form button {
        border-radius: var(--border-radius);
        width: 100%;
    }

    /* Back to top button */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Section Padding */
    .section-padding {
        padding: 60px 0;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Hero Section */
    .hero {
        padding: 100px 0 40px;
    }

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

    .profile-image {
        padding: 8px;
    }

    .profile-image img {
        border-width: 4px;
    }

    .hero-badge {
        padding: 10px 18px;
        font-size: 0.875rem;
        bottom: 15px;
        right: 0;
        left: 0;
        margin: 0 auto;
        width: max-content;
    }

    /* Hide floating elements on very small screens for cleaner look */
    .floating-element {
        display: none;
    }

    /* About Section */
    .about-image-container {
        max-width: 250px;
    }

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

    .about-badge {
        padding: 8px 14px;
        font-size: 0.8rem;
        bottom: -8px;
        right: -8px;
    }

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

    .detail {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .detail-label {
        width: auto;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    /* Skills Section */
    .tech-icons {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 15px;
    }

    .tech-icon {
        padding: 12px 8px;
    }

    .tech-icon i {
        font-size: 1.75rem;
    }

    .tech-icon span {
        font-size: 0.75rem;
    }

    /* Projects Section */
    .project-tags {
        gap: 6px;
    }

    .project-tag {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    /* Contact Section */
    .contact-form {
        padding: 20px 15px;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px;
    }

    /* Navigation */
    .navbar .container {
        padding: 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
    }

    .menu-toggle {
        width: 35px;
        height: 35px;
    }

    /* Mobile menu */
    .mobile-menu-links {
        padding: 30px 20px;
    }

    .mobile-nav-link {
        font-size: 1.1rem;
    }

    /* Section padding */
    .section-padding {
        padding: 50px 0;
    }
}

/* Very small devices (phones in portrait, less than 400px) */
@media (max-width: 400px) {
    h1 {
        font-size: 1.8rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .image-container {
        width: 220px;
        height: 220px;
    }

    .hero-badge {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .about-image-container {
        max-width: 220px;
    }

    .about-profile-image {
        height: 220px;
    }

    .tech-icons {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 12px;
    }

    .tech-icon {
        padding: 10px 6px;
    }

    .tech-icon i {
        font-size: 1.5rem;
    }

    .tech-icon span {
        font-size: 0.7rem;
    }
}

/* Landscape mode for mobile devices */
@media (max-height: 700px) and (orientation: portrait) {
    .hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .mobile-menu-links {
        overflow-y: auto;
        max-height: 60vh;
    }
}

/* Landscape mode for mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 40px;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .hero-text {
        text-align: left;
        order: 1;
    }

    .image-container {
        order: 2;
        width: 250px;
        height: 250px;
    }

    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .btn {
        width: auto;
        max-width: none;
    }

    /* Adjust mobile menu for landscape */
    .mobile-menu-links {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .mobile-menu {
        height: 100vh;
        height: -webkit-fill-available;
    }

    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .nav-link,
    .mobile-nav-link {
        padding: 12px 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .social-link,
    .tech-icon,
    .theme-toggle,
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    .btn,
    .project-btn {
        min-height: 44px;
    }

    /* Reduce hover effects for touch devices */
    .btn:hover,
    .project-card:hover,
    .tech-icon:hover {
        transform: none;
    }

    /* Add active states for touch */
    .btn:active,
    .project-btn:active,
    .theme-toggle:active,
    .menu-toggle:active,
    .social-link:active {
        transform: scale(0.95);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Ensure images are crisp */
    .profile-image img,
    .about-profile-image img,
    .project-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .hero-actions,
    .contact-form,
    .footer,
    .back-to-top,
    .mobile-menu,
    .menu-toggle,
    .theme-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .section-padding {
        padding: 20px 0 !important;
    }

    a {
        color: black !important;
        text-decoration: underline !important;
    }

    .hero {
        padding: 50px 0 30px !important;
        background: white !important;
    }

    .hero-title {
        background: none !important;
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
}