/* ===== Base Styles ===== */
:root {
    /* Light Theme (default) */
    --primary-color: #0d9488; /* Teal-600 */
    --primary-light: #f0fdfa; /* Teal-50 */
    --primary-dark: #0f766e; /* Teal-700 */
    --secondary-color: #14b8a6; /* Teal-500 */
    --accent-color: #00bcd4;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --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);
    --transition: all 0.3s ease;
    --border-radius: 10px;
    --header-height: 80px;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #2dd4bf; /* Teal-400 */
    --primary-light: #0f766e; /* Teal-700 */
    --primary-dark: #0d9488; /* Teal-600 */
    --secondary-color: #0d9488; /* Teal-600 */
    --accent-color: #22d3ee; /* Cyan-400 */
    --text-color: #f8fafc; /* Slate-50 */
    --text-light: #94a3b8; /* Slate-400 */
    --bg-color: #0f172a; /* Slate-900 */
    --bg-secondary: #1e293b; /* Slate-800 */
    --bg-tertiary: #334155; /* Slate-700 */
    --border-color: #334155; /* Slate-700 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --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);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h1 .highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

h1 .highlight::after {
    display: none;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-color);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    width: 100%;
}

section {
    padding: 6rem 0;
}

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

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

.section-title h2::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--dark-gray);
}

/* Header & Navigation */
:root {
    --primary-color: #0d9486; /* teal-600 */
    --primary-light: #ccfbf1; /* teal-50 */
    --primary-dark: #0f766e; /* teal-700 */
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc; /* slate-50 */
    --text-color: #1e293b; /* slate-800 */
    --text-light: #64748b; /* slate-500 */
    --border-color: #e2e8f0; /* slate-200 */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    position: relative;
    height: var(--header-height);
    width: 100%;
}

@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px 30px;
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        margin: 0;
        list-style: none;
    }
    
    .nav-links.active {
        transform: translateX(-280px);
    }
    
    .nav-links li {
        width: 100%;
        margin: 0;
    }
    
    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
        color: #333;
        text-decoration: none;
        transition: all 0.2s ease;
        width: 100%;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        color: #0d9486;
    }
    
    .logo {
        font-size: 1.4rem;
        z-index: 1001;
        position: relative;
    }
    
    .nav-actions {
        z-index: 1001;
        position: relative;
    }
    
    /* Overlay when menu is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: var(--bg-secondary);
    margin-left: 1rem;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

.theme-toggle:active {
    transform: translateY(0);
}

/* Navigation Actions Container */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Menu Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.logo span {
    color: var(--primary-color);
}

/* Navigation */
nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-left: auto;
    margin-right: 1rem;
}

nav a {
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

nav a:hover,
nav a.active {
    color: #0d9486; /* teal-600 */
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    z-index: 1001;
}

/* Hero Section */
.hero {
    padding: calc(var(--header-height) + 4rem) 0 6rem;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    opacity: 0.1;
    z-index: 0;
    border-bottom-left-radius: 100px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .hero::before {
    opacity: 0.07;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.hero-text {
    padding-right: 3rem;
    max-width: 90%;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 1.5rem 0 2rem;
    max-width: 90%;
}

.hero-text h1 {
    font-size: 3.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.2;
}

.hero-text .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-text .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(37, 102, 246, 0.2);
    z-index: -1;
    border-radius: 3px;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.typing {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    min-width: 200px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin: 2.5rem 0;
}

.btn-about {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.2), 0 2px 4px -1px rgba(13, 148, 136, 0.1);
    border: 2px solid transparent;
}

.btn-about i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-about:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(13, 148, 136, 0.3), 0 4px 6px -2px rgba(13, 148, 136, 0.15);
}

.btn-about:active {
    transform: translateY(0);
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 2rem;
}

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

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

.hero-image {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 2rem;
}

.avatar-container {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--white);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .avatar-container {
        width: 340px;
        height: 340px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero {
        padding: calc(var(--header-height) + 3rem) 0 4rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 3rem;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    

    
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    nav a {
        font-size: 1.1rem;
        padding: 0.8rem 0;
        color: #333;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    nav a:hover,
    nav a.active {
        color: #0d9486;
        background-color: #f0fdfa;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: calc(var(--header-height) + 2rem) 0 3rem;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .hero-text .subtitle {
        font-size: 1.3rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .avatar-container {
        width: 300px;
        height: 300px;
    }
    
    .hero::before {
        width: 100%;
        height: 70%;
        top: auto;
        bottom: 0;
        border-radius: 50px 50px 0 0;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2.3rem;
    }
    
    .hero-text .subtitle {
        font-size: 1.1rem;
    }
    
    .avatar-container {
        width: 195px;
        height: 195px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .section-title h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 102, 246, 0.4);
}

.btn:hover::before {
    width: 100%;
}

.btn i {
    margin-right: 8px;
    font-size: 1.1em;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline::before {
    background: var(--primary);
}

.btn-outline:hover {
    color: white;
    border-color: transparent;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* About Section */
.about {
    background-color: var(--light-gray);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%232566F6" fill-opacity="0.05" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat;
    background-size: cover;
    z-index: 0;
}

.about-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    text-align: center;
}

.about-image.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.skills {
    margin-top: 2rem;
}

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

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

.skill-name {
    font-weight: 600;
    color: var(--dark);
}

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

.skill-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Contact Page Styles */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

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

.contact-text h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-social {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* Form Messages */
.form-message {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem auto;
    max-width: 800px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.form-message i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.form-message p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
}

.success-message {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.success-message i {
    color: #22c55e;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.error-message i {
    color: #ef4444;
}

/* Map Section */
.map-container {
    background: var(--bg-secondary);
    padding: 4rem 0;
    margin-top: 4rem;
}

.map-embed {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-embed:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

.btn-block {
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-icon {
        margin-bottom: 1rem;
    }
}

.section-title {
    display: flex;
    align-items: center;
    margin: 3rem 0 1.5rem;
    color: var(--text-color);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
    margin-left: 1rem;
}

/* Experience & Education */
.experience, .education {
    margin-bottom: 2rem;
}

.job, .degree {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

.job-header, .degree-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-title, .degree-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.company, .school {
    font-weight: 500;
    color: var(--primary-color);
}

.duration {
    color: var(--light-text);
    font-size: 0.9rem;
}

.job-description {
    margin-top: 1rem;
}

.job-description ul {
    list-style-position: inside;
    margin-left: 0;
    padding-left: 0;
}

.job-description li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.job-description li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Skills */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.skill-category {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.skill-category h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: white;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

/* Certifications */
.certifications {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.certification {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.certification h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.issuer {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.date {
    color: var(--light-text);
    font-size: 0.85rem;
}

/* ===== Projects ===== */
.projects {
    padding: 8rem 0 6rem; /* Increased top padding */
    background-color: #f8fafc;
    position: relative;
    overflow: visible;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem 2rem; /* Increased gap between rows */
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-icon {
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0 0 0.5rem;
    text-align: center;
    font-weight: 600;
}

.project-card h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0 0 1.25rem 0;
    text-align: center;
    font-weight: 500;
}

.project-card p {
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    flex-grow: 1;
}

.project-impact {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.project-impact span {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-impact i {
    color: var(--primary-color);
    font-size: 1rem;
}

.project-card h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-weight: 500;
}

.project-card p {
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
    margin: 0;
    flex-grow: 1;
    line-height: 1.7;
}

.project-impact {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.project-impact span {
    display: flex;
    align-items: center;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.project-impact i {
    color: #10b981;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.project-impact span:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .projects {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .project-card {
        max-width: 100%;
    }
}

/* ===== Footer ===== */
footer {
    background: #f3f4f6;
    color: #1f2937;
    padding: 4rem 0 0;
    position: relative;
    overflow: hidden;
    margin-top: 6rem;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-logo .logo {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-logo p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4,
.footer-social h4 {
    color: #111827;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-links h4::after,
.footer-contact h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #4b5563;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-contact p {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    line-height: 1.7;
    color: #4b5563;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    margin-top: 4px;
}

.footer-social .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social .social-link {
    width: 40px;
    height: 40px;
    background: #1f2937;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-legal a {
    color: #4b5563;
    font-size: 0.8rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-legal span {
    color: #374151;
}

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

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

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

/* ===== Responsive Design ===== */
/* Large devices (desktops, 1200px and up) */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-text {
        margin-top: 3rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .resume-container {
        grid-template-columns: 1fr;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-logo {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-links,
    .footer-contact,
    .footer-social {
        text-align: center;
    }
    
    .footer-links h4::after,
    .footer-contact h4::after,
    .footer-social h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social .social-links {
        justify-content: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .footer-logo {
        grid-column: 1 / -1;
    }
    
    .footer-legal {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Small devices (landscape phones, 768px and down) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .avatar-container {
        width: 300px;
        height: 300px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .about-image {
        margin-bottom: 2rem;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    
    .footer-logo {
        margin-bottom: 1.5rem;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        bottom: 20px;
        right: 20px;
    }

/* Extra small devices (portrait phones, 576px and down) */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
    }
    
    .avatar-container {
        width: 165px;  /* Reduced by 25% from 220px */
        height: 165px;  /* Reduced by 25% from 220px */
    }
    
    /* Footer adjustments */
    .footer-content {
        padding: 0 1.5rem;
    }
    
    .footer-logo .logo {
        font-size: 1.6rem;
    }
    
    .footer-links h4,
    .footer-contact h4,
    .footer-social h4 {
        font-size: 1.1rem;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .resume-item {
        padding: 1.5rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Print Styles */
@media print {
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .container {
        padding: 0;
        max-width: 100%;
    }
    
    header, footer, .btn {
        display: none !important;
    }
    
    .resume-section {
        padding: 0;
    }
    
    .job, .degree, .certification, .skill-category {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: none;
        color: inherit;
    }
}
