/* ============================================
   PORTFOLIO WEBSITE - STYLESHEET
   ============================================
   A modern, responsive portfolio with dark/light mode
   ============================================ */

/* ============================================
   CSS VARIABLES (THEME CONFIGURATION)
   ============================================ */
:root {
    /* Light Mode Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    
    --navbar-height: 70px;
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-lg: 20px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --text-color: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --card-bg: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    
    --border-color: #334155;
    --border-light: #1e293b;
    
    --glow-color: rgba(59, 130, 246, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Selection Color */
::selection {
    background-color: var(--primary-color);
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.highlight {
    color: var(--primary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ============================================
   LOADER ANIMATION
   ============================================ */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   NAVBAR STYLES
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 8px 0;
}

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

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

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

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

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

.theme-toggle .fas {
    font-size: 1.1rem;
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--navbar-height);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
}

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

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

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-color);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
    justify-content: center;
}

@media (max-width: 700px) {
    .hero-buttons {
        flex-wrap: wrap;
    }
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease;
}

.profile-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.profile-ring {
    position: absolute;
    top: -15px;
    left: -15px;
    width: calc(100% + 30px);
    height: calc(100% + 30px);
    border-radius: 50%;
    /* soft glow halo instead of a hard blue border */
    box-shadow: 0 0 0 6px rgba(37,99,235,0.28);
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
}

/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--primary-color);
    font-size: 1.5rem;
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    /* no blue border anymore; hover glow is added on the image itself */
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Soft fade-style border effect around the image (behind the image) */
.about-image::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(59,130,246,0.25) 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-image:hover::after {
    opacity: 1;
}

/* Hover glow on the actual image */
.about-img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.8);
}

.about-info {
    padding: 20px 0;
}

.about-heading {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.personal-details {
    margin: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item i {
    color: var(--primary-color);
    width: 20px;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-color);
    font-weight: 600;
}

/* Social Links */
.about-social {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

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

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

/* ============================================
   QUALIFICATIONS (TIMELINE)
   ============================================ */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 30px);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    z-index: 1;
}

.timeline-date {
    position: absolute;
    left: calc(50% + 40px);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-item:nth-child(even) .timeline-date {
    left: auto;
    right: calc(50% + 40px);
}

.timeline-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    max-width: 400px;
    transition: var(--transition);
}

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

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-institution {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   ACHIEVEMENTS SECTION
   ============================================ */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Projects section grid (same styling as achievements) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Center the 4th project on a second row when there are 4 items */
    .projects-grid > .project-card:nth-child(4) {
        grid-column: 2;
    }
}

.project-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-light);
}

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

.achievement-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-light);
}

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

[data-theme="dark"] .achievement-card:hover {
    box-shadow: 0 0 30px var(--glow-color);
}

.card-icon {
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: white;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.card-subtitle {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

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

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.skills-category {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.25s ease;
}

/* Hover on the entire skills category container to glow its border-like outline without changing layout */
.skills-category:hover {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), var(--card-shadow);
}

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

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

.skill-item {
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 8px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-item:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.skill-item:last-child {
    margin-bottom: 0;
}

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

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

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

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

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 1s ease;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
    justify-items: center;
}

/* Make Get In Touch spacing balanced and the form container proportionate */
#contact.section {
    padding-top: 80px;
    padding-bottom: 60px;
}

.contact-info {
    padding: 20px 0;
}

.contact-heading {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.7;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

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

.contact-item-info {
    display: flex;
    flex-direction: column;
}

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

.contact-value {
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

a.contact-value:hover {
    color: var(--primary-color);
}

.social-heading {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

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

/* Contact Form */
.contact-form-wrapper {
    background: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-input {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

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

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    min-height: 20px;
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 12px 0;
    font-size: 1.1rem;
}

.form-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 30px 0 5px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
        display: grid;
        grid-template-columns: 1fr 0.5fr 1fr; /* Brand, Connect,Copyright */
        gap: 50px;
        margin-bottom: 15px;
        align-items: center;
    }
.footer-left {
        display: grid;
        grid-auto-rows: auto;
        gap: 20px;
    }
.footer-right {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
}

/* Revert: center column content is handled by natural flow */
.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.footer-brand {
    text-align: left;
}

/* Ensure better mobile stacking */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: left;
    }
    .footer-right {
        justify-content: center;
    }
}
.footer-logo {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.footer-tagline {
    color: var(--text-secondary);
}

.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-list a {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

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

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

/* Tablet */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .profile-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .hero-description {
        margin: 0 auto 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .personal-details {
        justify-content: center;
    }
    
    .about-social {
        justify-content: center;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social-icons {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Mobile Navigation */
    .mobile-toggle {
        display: block;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-color);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        padding: 80px 30px 30px;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .theme-toggle {
        position: absolute;
        top: 15px;
        right: 70px;
    }
    
    /* Timeline Mobile */
    .timeline::before {
        left: 0;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 40px;
        padding-right: 0;
        justify-content: flex-start;
    }
    
    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 0;
        right: auto;
    }
    
    .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        left: 40px;
        right: auto;
        position: relative;
        margin-bottom: 10px;
    }
    
    /* Skills Mobile */
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    /* Achievements Mobile */
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    /* Personal Details Mobile */
    .personal-details {
        grid-template-columns: 1fr;
    }
    
    /* Contact Form Mobile */
    .contact-form-wrapper {
        padding: 25px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .profile-wrapper {
        height: 250px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    .footer-bottom {
        padding-left: 0; /* reset left padding on tiny screens */
    }
}