/* CSS Variables and Base Styles */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --primary-gradient: linear-gradient(45deg, #2196F3, #00BCD4);
    --secondary-gradient: linear-gradient(45deg, #00BCD4, #1976D2);
    --navbar-height: 80px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --shadow-normal: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Theme Modes */
body.light-mode {
    --bg-color: #ffffff;
    --text-color: #000000;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px; /* Reduced from 1920px for better readability */
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-name {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.navbar-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.navbar-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Section Styles */
.section {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--navbar-height) + 2rem) 0;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
    max-width: 100%;
    overflow-x: hidden;
}

/* Section Headers */
.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

/* Content Spacing Adjustments */
.section .container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-content,
.projects-grid,
.skills-container,
.contact-grid {
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
                url('https://picsum.photos/1920/1080') no-repeat center center;
    background-size: cover;
}

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

.hero-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1s;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-normal);
    transition: var(--transition-smooth);
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-item i {
    font-size: 1.5rem;
    color: #2196F3;
}

/* Projects Section - Desktop */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.project {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
}

.project-image {
    width: 100%;
    height: 220px;
}

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

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tech {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

/* Projects Section - Mobile */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .project {
        margin-bottom: 1rem;
    }
    
    .project-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        padding: 0.5rem;
    }

    .project-info {
        padding: 1rem;
    }

    .project-tech {
        gap: 0.5rem;
    }

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

/* Mobile Project Cards */
@media (max-width: 768px) {
    .projects-grid {
        gap: 1rem;
        padding: 0.5rem;
    }

    .project {
        display: grid;
        grid-template-columns: 120px 1fr;
        height: auto;
        gap: 0;
        margin-bottom: 1rem;
    }

    .project-image {
        height: 100%;
        min-height: 120px;
    }

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

    .project-info {
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
    }

    .project h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .project p {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
        opacity: 0.8;
    }

    .project-tech {
        display: none;
    }

    .project-links {
        margin-top: auto;
        display: flex;
        gap: 0.5rem;
    }

    .project-links a {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.875rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .project {
        grid-template-columns: 100px 1fr;
    }

    .project-image {
        min-height: 100px;
    }

    .project-info {
        padding: 0.5rem;
    }
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-category h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-bar p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-gradient);
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.contact-methods {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.contact-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.contact-icon {
    font-size: 1.5rem;
    color: #2196F3;
}

.contact-detail h4 {
    margin-bottom: 0.5rem;
}

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

.icon-link {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: var(--transition-smooth);
}

.icon-link:hover {
    color: #2196F3;
    transform: translateY(-3px);
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--text-color);
    animation: bounce 2s infinite;
    cursor: pointer;
}

/* Footer */
.footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

body.light-mode .footer {
    background: var(--bg-color);
    color: var(--text-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* Media Queries */
@media (max-width: 1200px) {
    .container {
        max-width: 90%;
    }

    .about-content,
    .contact-grid {
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    :root {
        --navbar-height: 70px;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .skill-category {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }

    .navbar-links {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .navbar-links.show {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .navbar-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar-links li {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h2 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .project {
        border-radius: 8px;
        margin-bottom: 0;
    }

    .project-image {
        height: 180px;
    }

    .project-info {
        padding: 1rem;
    }

    .project-tech {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }

    .project-tech span {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }

    .project-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .project-links a {
        padding: 0.75rem;
        font-size: 0.9rem;
        text-align: center;
    }

    .project p {
        font-size: 0.9rem;
        margin: 0.5rem 0;
    }

    .project h3 {
        font-size: 1.2rem;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }

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

    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: calc(var(--navbar-height) + 1.5rem) 0;
    }

    .projects-grid {
        padding: 1rem;
    }

    .section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .section .container {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .skill-bars {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .footer {
        padding: 1rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .section .container {
        gap: 1rem;
    }

    .projects-grid {
        padding: 0.5rem;
        gap: 1rem;
    }

    .project {
        box-shadow: var(--shadow-normal);
    }

    .project-image {
        height: 160px;
    }

    .project-links {
        grid-template-columns: 1fr;
    }

    .project-tech {
        gap: 0.5rem;
    }

    .projects-grid {
        padding: 0;
    }

    .project {
        margin-bottom: 1.5rem;
    }

    .project-info {
        padding: 1.25rem;
    }

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

/* Enhanced Button Styles */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Remove margin-left from nav-button as we're using gap in nav-right */
.nav-button:not(:first-child) {
    margin-left: 0;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nav-button .nav-icon {
    font-size: 1.2rem;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.menu-toggle.active .nav-icon {
    transform: rotate(180deg);
}

#theme-toggle {
    position: relative;
    overflow: hidden;
}

#theme-toggle .nav-icon {
    position: absolute;
    transition: all 0.3s ease;
}

#theme-toggle .fa-sun {
    transform: translateY(0);
}

#theme-toggle .fa-moon {
    transform: translateY(100%);
}

body.light-mode #theme-toggle .fa-sun {
    transform: translateY(-100%);
}

body.light-mode #theme-toggle .fa-moon {
    transform: translateY(0);
}

#theme-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

#theme-toggle .fa-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    position: absolute;
}

body.light-mode #theme-toggle .fa-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

body.light-mode #theme-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Media query adjustments */
@media (max-width: 768px) {
    .nav-right {
        gap: 0.25rem;
    }
    
    .nav-button {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .skill-bars {
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .footer {
        padding: 1rem 0;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Dark Mode Enhancements */
body.dark-mode {
    --bg-color: #121212;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Light Mode Styles */
body.light-mode {
    --bg-color: #ffffff;
    --text-color: #121212;
    --card-bg: rgba(0, 0, 0, 0.02);
    --border-color: rgba(0, 0, 0, 0.1);
}

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

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.blur-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Print Styles */
@media print {
    .navbar,
    .scroll-indicator,
    .theme-toggle,
    .menu-toggle {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .section {
        page-break-inside: avoid;
        min-height: auto;
        padding: 2rem 0;
    }

    .hero {
        height: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-gradient: none;
    }

    .project,
    .contact-form,
    .contact-item {
        border: 2px solid var(--text-color);
    }

    .progress {
        background: var(--text-color) !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .scroll-indicator {
        display: none !important;
    }
}

/* RTL Support */
[dir="rtl"] {
    .navbar-links {
        flex-direction: row-reverse;
    }

    .contact-icon {
        margin-right: 0;
        margin-left: 1rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

/* Tooltip Styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Selection Style */
::selection {
    background: rgba(33, 150, 243, 0.3);
    color: var(--text-color);
}

/* Error States */
.form-group.error input,
.form-group.error textarea {
    border-color: #ff4444;
}

.error-message {
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Success States */
.form-group.success input,
.form-group.success textarea {
    border-color: #00C851;
}

/* Animations for Scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Media Queries */
@media (max-width: 768px) {
    .navbar-links {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    .navbar-links.active {
        transform: translateX(0);
    }

    .navbar-links li {
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    }

    .navbar-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .navbar-links li:nth-child(1) { transition-delay: 0.1s; }
    .navbar-links li:nth-child(2) { transition-delay: 0.2s; }
    .navbar-links li:nth-child(3) { transition-delay: 0.3s; }
    .navbar-links li:nth-child(4) { transition-delay: 0.4s; }
    .navbar-links li:nth-child(5) { transition-delay: 0.5s; }

    .navbar-links a {
        font-size: 1.5rem;
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
        transition: color 0.3s ease;
    }

    .navbar-links a:hover {
        color: #2196F3;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle i {
        font-size: 1.5rem;
        transition: transform 0.3s ease;
    }

    .menu-toggle.active i {
        transform: rotate(90deg);
    }

    /* Section Adjustments for Mobile */
    .section {
        padding: calc(var(--navbar-height) + 1rem) 1rem 2rem;
        height: 100vh;
        overflow-y: auto;
        scroll-snap-align: start;
    }

    /* Hero Section Mobile */
    .hero-content {
        padding: 0 1rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    /* About Section Mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        max-height: 300px;
        object-fit: cover;
    }

    /* Projects Section Mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .project {
        margin-bottom: 2rem;
    }

    .project-info {
        padding: 1.5rem;
    }

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

    /* Skills Section Mobile */
    .skills-container {
        padding: 1rem;
    }

    .skill-category {
        margin-bottom: 2rem;
    }

    .skill-bars {
        gap: 1.5rem;
    }

    /* Contact Section Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-methods {
        gap: 1.5rem;
    }

    .social-links {
        justify-content: center;
        gap: 1.5rem;
    }

    /* Footer Mobile */
    .footer {
        padding: 1rem;
        text-align: center;
    }

    /* Scroll Indicator Mobile */
    .scroll-indicator {
        bottom: 1rem;
        width: 40px;
        height: 40px;
    }

    /* Form Adjustments */
    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .submit-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Mobile menu text color fix for light mode */
@media screen and (max-width: 768px) {
    body:not(.dark-mode) .navbar-links {
        color: white;
    }
    body:not(.dark-mode) .navbar-links a {
        color: white;
    }
}

/* Smaller Mobile Devices */
@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section {
        padding: calc(var(--navbar-height) + 0.5rem) 0.5rem 1.5rem;
    }

    .about-image img {
        max-height: 250px;
    }

    .contact-item {
        padding: 1rem;
    }

    .social-links {
        gap: 1rem;
    }

    .nav-name {
        font-size: 1.2rem;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .section {
        min-height: 120vh;
    }

    .hero-content {
        padding: 2rem 0;
    }

    .navbar-links {
        padding: 1rem 0;
    }

    .about-image img {
        max-height: 200px;
    }
}

/* Media Queries */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}