/* ===========================
   PORTFOLIO WEBSITE CSS
   Modern, Tech-Oriented Design
   =========================== */

/* Custom Properties (CSS Variables) */
:root {
    /* Colors - Tech-inspired palette */
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #17a2b8;
    --accent-color: #fd7e14;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    /* Grayscale */
    --dark: #212529;
    --light: #f8f9fa;
    --muted: #6c757d;
    
    /* Enhanced Light Mode Theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;  /* Darker for better contrast */
    --text-secondary: #495057;  /* Improved contrast */
    --text-muted: #6c757d;
    
    /* Alert colors */
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --danger-bg: #f8d7da;
    --danger-border: #f5c6cb;
    --warning-bg: #fff3cd;
    --warning-border: #ffeaa7;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Border radius */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    
    /* Enhanced Fonts with better fallbacks */
    --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #e9ecef;
    --text-muted: #adb5bd;
    --dark: #ffffff;
    --light: #1a1a1a;
    
    /* Alert colors for dark mode */
    --success-bg: #142d1a;
    --success-border: #204c28;
    --danger-bg: #2d1414;
    --danger-border: #4c2020;
    --warning-bg: #2d2a14;
    --warning-border: #4c4520;
    
    /* Enhanced dark mode shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

/* Dark mode specific enhancements */
[data-theme="dark"] body {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-theme="dark"] .section {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .card {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 123, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

h1 { 
    font-size: 2.75rem; 
    font-weight: 700;
    line-height: 1.2;
}
h2 { 
    font-size: 2.25rem; 
    font-weight: 600;
}
h3 { 
    font-size: 1.875rem; 
    font-weight: 600;
}
h4 { 
    font-size: 1.5rem; 
    font-weight: 500;
}
h5 { 
    font-size: 1.25rem; 
    font-weight: 500;
}
h6 { 
    font-size: 1rem; 
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
}

/* Enhanced link styling */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Text utilities for better readability */
.text-primary {
    color: var(--text-primary) !important;
    font-weight: 600;
}

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

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

.text-bold {
    font-weight: 600;
}

.text-semibold {
    font-weight: 500;
}

.text-light {
    font-weight: 300;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

/* Add responsive styles for row and col */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        margin: 0;
        margin-bottom: 1rem;
    }
    
    .col {
        flex: none;
        width: 100%;
        padding: 0;
        margin-bottom: 2rem;
    }
    
    .col:last-child {
        margin-bottom: 0;
    }
}

/* Enhanced Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 26, 26, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.navbar-brand {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navbar-nav li {
    margin: 0 1rem;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

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

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

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Enhanced Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 2rem 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    min-height: 44px;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.25);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    min-height: 48px;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    min-height: 36px;
}

/* Button icon spacing */
.btn i {
    font-size: 0.9em;
}

/* Dark mode button adjustments */
[data-theme="dark"] .btn-primary {
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.4);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5);
}

[data-theme="dark"] .btn-outline:hover {
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 3rem;;
}

/* Enhanced Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .card {
    background: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

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

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
}

[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition-fast);
    text-decoration: none;
}

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

.social-link i {
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Additional Components for Templates */

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* About Page Styles */
.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .profile-img {
    border-color: #00ff7f;
    box-shadow: 0 8px 25px rgba(0, 255, 127, 0.3);
}

.about-image {
    position: relative;
    text-align: center;
    margin-bottom: 2rem;
}

.about-image-overlay {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-width: 280px;
    width: max-content;
}

[data-theme="dark"] .about-image-overlay {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.2);
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-item {
    background: var(--primary-color);
    color: black;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 500;
}

[data-theme="dark"] .tech-item {
    background: #00ff7f;
    color: #1a1a1a;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

[data-theme="dark"] .timeline::before {
    background: #00ff7f;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

[data-theme="dark"] .timeline-item::before {
    background: #00ff7f;
    border-color: #1a1a1a;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .timeline-content {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

[data-theme="dark"] .timeline-date {
    color: #00ff7f;
}

.timeline-skills {
    margin-top: 1rem;
}

.skill-tag {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    margin: 0.25rem 0.5rem 0.25rem 0;
}

[data-theme="dark"] .skill-tag {
    background: #00bfff;
}

/* Contact Page Styles */
.contact-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: start;
}

.contact-form-container {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .contact-form-container {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

[data-theme="dark"] .form-control {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

[data-theme="dark"] .form-control:focus {
    border-color: #00ff7f;
    box-shadow: 0 0 0 3px rgba(0, 255, 127, 0.1);
}

.contact-info {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

[data-theme="dark"] .contact-info {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

[data-theme="dark"] .contact-icon {
    background: #00ff7f;
    color: #1a1a1a;
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

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

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

[data-theme="dark"] .contact-details a {
    color: #00ff7f;
}

.social-contact {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

[data-theme="dark"] .social-contact {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

.social-contact .social-links {
    flex-direction: column;
    gap: 0.75rem;
}

.social-contact .social-link {
    justify-content: flex-start;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    width: auto;
    height: auto;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .social-contact .social-link {
    border-color: #00ff7f;
    color: #00ff7f;
}

.social-contact .social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

[data-theme="dark"] .social-contact .social-link:hover {
    background: #00ff7f;
    color: #1a1a1a;
}

.social-contact .social-link span {
    margin-left: 0.75rem;
    font-weight: 500;
}

/* FAQ Styles */
.faq-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

[data-theme="dark"] .faq-item {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

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

.faq-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

[data-theme="dark"] .faq-item h4 {
    color: #00ff7f;
}

/* Resume Page Styles */
.resume-header {
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.resume-intro {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .resume-intro {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

.resume-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .resume-title {
    color: #00ff7f;
}

.resume-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.resume-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skills-categories {
    display: grid;
    gap: 3rem;
}

.skill-category {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .skill-category {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-theme="dark"] .skill-category h3 {
    color: #00ff7f;
}

.skills-list {
    display: grid;
    gap: 1rem;
}

.skill-item {
    display: grid;
    grid-template-columns: 200px 1fr 100px;
    align-items: center;
    gap: 1rem;
}

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

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

[data-theme="dark"] .skill-bar {
    background: rgba(255, 255, 255, 0.1);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    width: 0;
    transition: width 2s ease;
}

[data-theme="dark"] .skill-progress {
    background: linear-gradient(90deg, #00ff7f, #00bfff);
}

.skill-level {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

[data-theme="dark"] .tech-badge {
    background: #00ff7f;
    color: #1a1a1a;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Enhanced Responsive Typography */
@media (max-width: 768px) {
    /* Typography scaling for tablets */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 2.75rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    body {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .navbar-nav a {
        font-size: 1rem;
        padding: 0.75rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .contact-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .skill-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .resume-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .about-image-overlay {
        position: static;
        transform: none;
        left: auto;
        bottom: auto;
        margin: 1rem auto 0;
        max-width: 100%;
    }
    
    /* Center social links on smaller screens */
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* Typography scaling for mobile */
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    body {
        font-size: 14px;
        line-height: 1.65;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.875rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav a {
        font-size: 0.95rem;
        padding: 1rem 0;
    }
    
    .profile-img {
        width: 200px;
        height: 200px;
    }
    
    /* Improved button spacing on mobile */
    .cta-actions,
    .project-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Add margin-bottom for better spacing on small screens */
    .row {
        margin-bottom: 1rem;
    }
}

/* Add responsive styles for mobile menu */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: var(--transition);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    [data-theme="dark"] .navbar-nav {
        background: #1a1a1a;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-nav.active {
        left: 0;
    }
    
    .navbar-nav li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }
    
    .navbar-nav a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }
    
    .navbar-nav a::after {
        display: none;
    }
}

/* Enhanced focus states for accessibility */
.btn:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improved text contrast in light mode */
.text-contrast {
    color: var(--text-primary);
    font-weight: 600;
}

/* Better readability for small text */
.small-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Enhanced link hover states */
a:not(.btn):hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}