/* ======== Base Styles ======== */
:root {
    /* Primary Colors */
    --primary-color: #dc7a5d;
    --primary-light: #f2a795;
    --primary-dark: #c25b40;

    /* Neutral Colors */
    --bg-dark: #141414;
    --bg-dark-2: #1c1c1c;
    --bg-dark-3: #2a2a2a;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
    --text-dark: #333333;

    /* Accent Colors */
    --accent-blue: #527094;
    --accent-blue-dark: #263257;

    /* Light Theme Colors (will be used when light mode is active) */
    --bg-light: #f5f5f5;
    --bg-light-2: #ffffff;
    --bg-light-3: #e5e5e5;
    --text-light-mode: #333333;
    --text-muted-light: #666666;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;

    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-round: 50%;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Box Shadow */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Light Mode Theme */
body.light-mode {
    --bg-dark: var(--bg-light);
    --bg-dark-2: var(--bg-light-2);
    --bg-dark-3: var(--bg-light-3);
    --text-light: var(--text-light-mode);
    --text-muted: var(--text-muted-light);
    color: var(--text-light-mode);
}

/* Dark Mode Theme - Default */
body.dark-mode {
    --bg-dark: #141414;
    --bg-dark-2: #1c1c1c;
    --bg-dark-3: #2a2a2a;
    --text-light: #ffffff;
    --text-muted: #b0b0b0;
}

/* ======== Reset & General Styles ======== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    /* 1rem = 10px */
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-dark-2);
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

body.loaded .page-loader {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

.loader-text {
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ======== Basic Typography and Elements ======== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
    transition: color var(--transition-normal);
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

h5 {
    font-size: 1.8rem;
}

p {
    margin-bottom: var(--spacing-md);
    font-size: 1.6rem;
    transition: color var(--transition-normal);
}

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

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

ul,
ol {
    list-style-type: none;
}

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

.container {
    width: 100%;
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-line {
    width: 6rem;
    height: 0.3rem;
    background-color: var(--primary-color);
    margin: 0 auto;
}

section {
    padding: var(--spacing-xxl) 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.4rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    border: none;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

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

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

.primary-btn:hover {
    background-color: var(--primary-dark);
    color: var(--text-light);
    transform: translateY(-2px);
}

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

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Status classes for buttons */
.btn-success {
    background-color: #28a745 !important;
    color: white !important;
}

.btn-fail {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Spinner animation for loading */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

/* ======== Custom Cursor ======== */
.cursor-dot,
.cursor-dot-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease-in-out, transform 0.3s ease-in-out;
    z-index: 999;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
}

.cursor-dot-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background-color: transparent;
}

/* ======== Header Styles ======== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    background-color: transparent;
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: 1.5rem 0;
    background-color: rgba(var(--bg-dark), 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.light-mode .header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
}

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

.logo a {
    font-family: 'Inter', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.logo a .dot {
    color: var(--primary-color);
    font-size: 2.8rem;
    font-weight: 900;
}

.logo a:hover {
    color: var(--text-light);
}

.nav-list {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
    font-size: 1.6rem;
}

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

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

/* Header Controls (Theme Toggle & Hamburger) */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: var(--border-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-light);
    background-color: var(--bg-dark-3);
    transition: all var(--transition-normal);
}

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

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-round);
    background-color: var(--bg-dark-3);
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 110;
    transition: background-color var(--transition-normal);
}

.hamburger i {
    font-size: 1.8rem;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

.hamburger:hover {
    background-color: var(--primary-color);
}

.hamburger:hover i {
    color: #ffffff;
}

/* ======== Mobile Menu (Sidebar) ======== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-dark-2);
    z-index: 99;
    transition: right 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--primary-color);
}

.light-mode .mobile-menu {
    background-color: var(--bg-light-2);
    border-left-color: var(--primary-color);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.08);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    padding: calc(var(--spacing-xxl) + 2rem) var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
    height: 100%;
    justify-content: space-between;
}

.profile-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-dark-3);
}

.light-mode .profile-section {
    border-bottom-color: var(--bg-light-3);
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius-round);
    overflow: hidden;
    margin: 0 auto var(--spacing-md);
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(220, 122, 93, 0.3);
    transition: transform var(--transition-normal);
}

.profile-image:hover {
    transform: scale(1.05);
}

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

.profile-section h3 {
    font-size: 1.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-light);
    font-weight: 600;
}

.profile-section p {
    color: var(--text-muted);
    font-size: 1.4rem;
    margin-bottom: 0;
    font-weight: 500;
}

.mobile-nav {
    margin-bottom: var(--spacing-lg);
    flex: 1;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 1.6rem;
    font-weight: 500;
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    border-left: 3px solid transparent;
    border-radius: var(--border-radius-sm);
}

.mobile-nav-link i {
    width: 24px;
    font-size: 1.7rem;
    text-align: center;
    color: var(--primary-color);
    transition: transform var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background-color: rgba(220, 122, 93, 0.08);
    transform: translateX(5px);
}

.mobile-nav-link:hover i {
    transform: scale(1.15);
}

.mobile-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--bg-dark-3);
}

.light-mode .mobile-social {
    border-top-color: var(--bg-light-3);
}

.mobile-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-dark-3);
    transition: all var(--transition-normal);
}

.light-mode .mobile-social a {
    background-color: var(--bg-light-3);
}

.mobile-social a i {
    font-size: 2rem;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

.mobile-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(220, 122, 93, 0.3);
}

.mobile-social a:hover i {
    color: white;
}

/* ======== Hero Section ======== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 9rem;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-blue-dark) 0%, transparent 70%);
    opacity: 0.2;
    z-index: 0;
}

.light-mode .hero::before {
    background: radial-gradient(ellipse at 70% 30%, rgba(242, 167, 149, 0.04) 0%, rgba(242, 167, 149, 0.02) 40%, rgba(245, 245, 245, 0.3) 70%, transparent 100%);
    opacity: 1;
    filter: blur(2px);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.loaded .hero-content {
    opacity: 1;
    visibility: visible;
}

.hero-text {
    max-width: 55rem;
}

.hero-title {
    margin-bottom: var(--spacing-md);
}

.hero-title .greeting {
    display: block;
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.hero-title .name {
    display: block;
    font-size: 5.6rem;
    background: linear-gradient(90deg, var(--text-light) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    max-width: 50rem;
    text-align: center;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-container {
    position: relative;
    width: 32rem;
    height: 32rem;
    border-radius: var(--border-radius-round);
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    /* Flash fix - 'both' ensures hidden before animation starts */
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.5s ease-out both;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.profile-img:hover {
    transform: scale(1.05);
}

.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background-color: var(--bg-dark-2);
    border: 1px solid var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    z-index: 3;
    /* Flash fix - 'both' keeps hidden until animation */
    opacity: 0;
    animation: fadeIn 0.5s ease-out both, float 3s ease-in-out infinite;
}

.light-mode .floating-badge {
    background-color: var(--bg-light-2);
    box-shadow: var(--shadow-light);
}

.floating-badge i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.floating-badge span {
    font-weight: 500;
    font-size: 1.4rem;
}

.floating-badge.top {
    top: 2rem;
    left: 0;
    animation-delay: 0.2s, 0.2s;
}

.floating-badge.bottom {
    bottom: 2rem;
    right: 0;
    animation-delay: 0.3s, 0.3s;
}

.scroll-indicator {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.mouse {
    width: 3rem;
    height: 5rem;
    border: 2px solid var(--text-light);
    border-radius: 2rem;
    display: flex;
    justify-content: center;
    padding-top: 0.8rem;
    margin-bottom: 0.8rem;
}

.wheel {
    width: 0.4rem;
    height: 0.8rem;
    background-color: var(--text-light);
    border-radius: 0.2rem;
    animation: scroll 1.5s ease-in-out infinite;
}

.arrow {
    position: relative;
    width: 2rem;
    height: 2rem;
}

.arrow span {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1.2rem;
    height: 1.2rem;
    border-bottom: 2px solid var(--text-light);
    border-right: 2px solid var(--text-light);
    transform: translate(-50%, 0) rotate(45deg);
    animation: arrowDown 1.5s ease-in-out infinite;
}

.arrow span:nth-child(2) {
    animation-delay: 0.2s;
    opacity: 0.6;
}

.arrow span:nth-child(3) {
    animation-delay: 0.4s;
    opacity: 0.3;
}

/* ======== About Section ======== */
.about {
    background-color: var(--bg-dark-2);
    position: relative;
    overflow: hidden;
}

.light-mode .about {
    background-color: var(--bg-light-2);
}

.about::before {
    content: '';
    position: absolute;
    left: -10%;
    top: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.05;
    z-index: 0;
}

.about-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.about-text {
    max-width: 80rem;
    text-align: center;
}

.about-text p {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xl);
}

/* Skill bars and animations */
.skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.skill-category h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 3rem;
    height: 2px;
    background-color: var(--primary-color);
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.skill-bar {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 500;
}

.skill-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-dark-3);
    border-radius: 4px;
    overflow: hidden;
}

.light-mode .skill-bar-container {
    background-color: var(--bg-light-3);
}

.skill-progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-blue) 100%);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.2, 1);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill-list li {
    list-style: none;
    margin-bottom: var(--spacing-sm);
}

@media screen and (min-width: 769px) {
    .skill-list li {
        margin-right: var(--spacing-sm);
    }
}

.skill-list li span {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-sm);
    font-size: 1.4rem;
    transition: all var(--transition-fast);
    border-left: 3px solid var(--primary-color);
}

.light-mode .skill-list li span {
    background-color: var(--bg-light-3);
}

.skill-list li span:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 122, 93, 0.3);
    background-color: var(--primary-color);
    color: white;
    border-left-color: var(--primary-dark);
}

/* ======== Animations ======== */
@keyframes float {

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

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

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(1.5rem);
        opacity: 0;
    }
}

@keyframes arrowDown {
    0% {
        opacity: 0;
        transform: translate(-50%, -20px) rotate(45deg);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 20px) rotate(45deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-in {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideIn 0.6s ease-out forwards;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.6s ease-out forwards;
}

.visible {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
}

/* Delay animations for better flow */
.hero-text.fade-in {
    animation-delay: 0.1s;
}

.hero-image.scale-in {
    animation-delay: 0.2s;
}

.about-text.fade-in {
    animation-delay: 0.1s;
}

.skill-category.slide-in:first-child {
    animation-delay: 0.2s;
}

.skill-category.slide-in:last-child {
    animation-delay: 0.3s;
}

.portfolio-item.fade-in:nth-child(1) {
    animation-delay: 0.2s;
}

.portfolio-item.fade-in:nth-child(2) {
    animation-delay: 0.4s;
}

.portfolio-item.fade-in:nth-child(3) {
    animation-delay: 0.6s;
}

.timeline-item.slide-in:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item.slide-in:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item.slide-in:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item.slide-in:nth-child(4) {
    animation-delay: 0.4s;
}

/* Professional fade-up animation */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item.slide-in {
    animation: fadeUp 0.6s ease-out forwards;
}

.contact-item.slide-in:nth-child(1) {
    animation-delay: 0.1s;
}

.contact-item.slide-in:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-item.slide-in:nth-child(3) {
    animation-delay: 0.3s;
}

/* Better slide animation for contact items */
@keyframes contactSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-item.slide-in {
    animation: contactSlideIn 0.7s ease-out forwards;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-dark-3);
    border-radius: 5px;
}

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

.light-mode::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.light-mode::-webkit-scrollbar-thumb {
    background: var(--bg-light-3);
}

/* ======== Achievements Section ======== */
.achievements-section {
    margin-top: var(--spacing-xxl);
    padding: var(--spacing-lg) 0;
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.achievement-item {
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.light-mode .achievement-item {
    background-color: var(--bg-light-3);
}

.achievement-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.achievement-icon {
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-icon i {
    font-size: 2rem;
    color: white;
}

.achievement-content {
    flex: 1;
}

.achievement-number {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.achievement-label {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .achievements-list {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .achievement-item {
        padding: var(--spacing-md);
    }

    .achievement-number {
        font-size: 2.2rem;
    }

    .achievement-icon {
        width: 4rem;
        height: 4rem;
    }

    .achievement-icon i {
        font-size: 1.8rem;
    }
}

/* ======== Services Section ======== */
.services {
    background-color: var(--bg-dark-2);
    position: relative;
    overflow: hidden;
}

.light-mode .services {
    background-color: var(--bg-light-2);
}

.section-description {
    font-size: 1.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--spacing-md);
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.service-row {
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-xl);
    align-items: center;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Desktop: Number left, Icon right */
@media screen and (min-width: 769px) {
    .service-row {
        grid-template-columns: auto 1fr auto;
    }

    .service-number {
        order: 1;
    }

    .service-content {
        order: 2;
    }

    .service-icon {
        order: 3;
    }
}

.light-mode .service-row {
    background-color: var(--bg-light-3);
    box-shadow: var(--shadow-light);
}

.service-row:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.service-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-blue) 100%);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.service-row:hover::before {
    transform: scaleY(1);
}

.service-number {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    opacity: 0.8;
}

.service-content {
    flex: 1;
}

.service-content h3 {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.service-content p {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.service-tags span {
    padding: 0.4rem 1rem;
    background-color: var(--bg-dark);
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
}

.light-mode .service-tags span {
    background-color: var(--bg-light);
}

.service-icon {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-blue) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal);
}

.service-row:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon i {
    font-size: 2.4rem;
    color: white;
}

/* ======== Portfolio Filter ======== */
.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 1rem 2rem;
    background-color: transparent;
    border: 2px solid var(--bg-dark-3);
    border-radius: var(--border-radius-md);
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.light-mode .filter-btn {
    border-color: var(--bg-light-3);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ======== Mobile Responsive Design ======== */
@media screen and (max-width: 768px) {

    /* Services Mobile - Card Style matching Projects */
    .services-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .service-row {
        display: flex !important;
        flex-direction: column !important;
        padding: var(--spacing-lg);
        text-align: left;
        gap: var(--spacing-md);
        align-items: stretch;
        grid-template-columns: none !important;
        position: relative;
    }

    .service-row:hover {
        transform: translateY(-5px);
        border-color: var(--primary-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    /* Top gradient accent line - Always visible like a 'top border' */
    .service-row::before {
        display: block;
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        /* Slightly thicker */
        background: linear-gradient(90deg, var(--primary-color), var(--accent-blue));
    }

    .service-number {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        font-size: 3rem !important;
        /* Smaller, cleaner */
        font-weight: 700 !important;
        color: var(--primary-color) !important;
        font-family: 'Poppins', sans-serif !important;
        opacity: 0.8 !important;
        z-index: 0;
    }

    .light-mode .service-number {
        color: var(--primary-color) !important;
        /* Consistent color */
    }

    /* HIDDEN ICONS as requested */
    .service-icon {
        display: none !important;
    }

    .service-content {
        position: relative;
        z-index: 1;
        padding-top: var(--spacing-xs);
        /* Less padding needing since icon is gone */
    }

    .service-content h3 {
        font-size: 2rem !important;
        margin-bottom: var(--spacing-sm);
    }

    .service-content p {
        font-size: 1.5rem !important;
        line-height: 1.5;
        margin-bottom: var(--spacing-md);
    }

    .service-tags span {
        font-size: 1.2rem !important;
        padding: 0.5rem 1rem;
    }

    .service-tags {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    /* Projects Mobile - Card Style */
    .projects-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .project-card {
        display: flex !important;
        flex-direction: column !important;
        padding: var(--spacing-md);
        background-color: var(--bg-dark-2);
        border-radius: var(--border-radius-lg);
        border: 1px solid transparent;
        position: relative;
        gap: var(--spacing-sm);
    }

    .light-mode .project-card {
        background-color: var(--bg-light-2);
    }

    .project-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-blue) 100%);
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }

    .project-number {
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--primary-color);
        opacity: 0.7;
    }

    .project-info {
        padding-top: var(--spacing-sm);
    }

    .project-meta {
        display: flex;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        flex-wrap: wrap;
    }

    .project-type {
        background-color: var(--primary-color);
        color: white;
        padding: 0.4rem 1rem;
        border-radius: var(--border-radius-sm);
        font-size: 1.2rem;
        font-weight: 600;
    }

    .project-year {
        background-color: var(--bg-dark-3);
        color: var(--text-muted);
        padding: 0.4rem 1rem;
        border-radius: var(--border-radius-sm);
        font-size: 1.2rem;
    }

    .light-mode .project-year {
        background-color: var(--bg-light-3);
    }

    .project-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
        color: var(--text-light);
    }

    .project-description {
        font-size: 1.5rem;
        color: var(--text-muted);
        line-height: 1.5;
        margin-bottom: 0 !important;
        /* Button ke uper ka gap remove */
    }

    .project-tech {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
        margin-bottom: 0 !important;
        /* Button ke uper ka gap remove */
    }

    .project-tech span {
        padding: 0.5rem 1rem;
        background-color: var(--bg-dark-3);
        border-radius: var(--border-radius-sm);
        font-size: 1.2rem;
        color: var(--text-muted);
        border: 1px solid transparent;
    }

    .light-mode .project-tech span {
        background-color: var(--bg-light-3);
    }

    .project-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: var(--spacing-sm);
        margin-top: 0 !important;
        /* Button ke uper ka gap remove */
        justify-content: center;
        align-items: center;
        width: 100%;
        order: 999;
    }

    .project-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        padding: 1.2rem;
        border-radius: var(--border-radius-md);
        font-size: 1.4rem;
        font-weight: 500;
        text-decoration: none;
        transition: all var(--transition-fast);
        border: 2px solid transparent;
    }

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

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

    .project-btn.secondary {
        background-color: transparent;
        color: var(--text-light);
        border-color: var(--bg-dark-3);
    }

    .light-mode .project-btn.secondary {
        border-color: var(--bg-light-3);
    }

    .project-btn.secondary:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        transform: translateY(-2px);
    }
}

@media screen and (max-width: 480px) {

    /* Extra Small Mobile */
    .service-row {
        padding: var(--spacing-sm);
    }

    .service-number {
        font-size: 1.8rem;
    }

    .service-content h3 {
        font-size: 1.6rem;
    }

    .service-tags span {
        font-size: 1.1rem;
        padding: 0.3rem 0.8rem;
    }

    .project-card {
        padding: var(--spacing-sm);
    }

    .project-number {
        font-size: 1.8rem;
    }

    .project-title {
        font-size: 1.6rem;
    }

    .project-description {
        font-size: 1.3rem;
    }

    .project-tech span {
        font-size: 1.1rem;
        padding: 0.3rem 0.8rem;
    }

    .project-btn {
        padding: 0.8rem;
        font-size: 1.2rem;
        max-width: 120px;
    }

    .more-projects-note {
        padding: var(--spacing-sm);
        font-size: 1.4rem;
    }
}

/* ======== Testimonials Section ======== */
.testimonials {
    background-color: var(--bg-dark-2);
    position: relative;
    overflow: hidden;
}

.light-mode .testimonials {
    background-color: var(--bg-light-2);
}

.testimonials-slider {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
    z-index: 1;
}

.testimonial-item {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.testimonial-item.active {
    display: block;
    opacity: 1;
}

.testimonial-content {
    background-color: var(--bg-dark-3);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-md);
}

.light-mode .testimonial-content {
    background-color: var(--bg-light-3);
    box-shadow: var(--shadow-light);
}

.testimonial-text {
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.testimonial-text i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.testimonial-text p {
    font-size: 1.8rem;
    line-height: 1.8;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.author-image {
    width: 6rem;
    height: 6rem;
    border-radius: var(--border-radius-round);
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

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

.author-info {
    text-align: left;
}

.author-info h4 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.author-info p {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.rating {
    display: flex;
    gap: 0.3rem;
}

.rating i {
    color: #ffd700;
    font-size: 1.4rem;
}

.testimonial-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.testimonial-prev,
.testimonial-next {
    width: 4rem;
    height: 4rem;
    border-radius: var(--border-radius-round);
    background-color: var(--bg-dark-3);
    border: none;
    color: var(--text-light);
    font-size: 1.6rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.light-mode .testimonial-prev,
.light-mode .testimonial-next {
    background-color: var(--bg-light-3);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.testimonial-dots {
    display: flex;
    gap: var(--spacing-sm);
}

.testimonial-dot {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: var(--border-radius-round);
    background-color: var(--bg-dark-3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.light-mode .testimonial-dot {
    background-color: var(--bg-light-3);
}

.testimonial-dot.active,
.testimonial-dot:hover {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* ======== Portfolio Section ======== */
.portfolio {
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.light-mode .portfolio {
    background-color: var(--bg-light);
}

.portfolio::after {
    content: '';
    position: absolute;
    right: -10%;
    bottom: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    opacity: 0.05;
    z-index: 0;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.project-card {
    background-color: var(--bg-dark-2);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.light-mode .project-card {
    background-color: var(--bg-light-2);
    box-shadow: var(--shadow-light);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-blue) 100%);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.project-number {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    opacity: 0.8;
}

.project-info {
    flex: 1;
}

.project-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.project-type {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: var(--border-radius-md);
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-year {
    background-color: var(--bg-dark-3);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: var(--border-radius-md);
    font-size: 1.3rem;
    font-weight: 500;
}

.light-mode .project-year {
    background-color: var(--bg-light-3);
}

.project-title {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.project-description {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.project-tech span {
    padding: 0.4rem 1rem;
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
}

.light-mode .project-tech span {
    background-color: var(--bg-light-3);
}

.project-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.project-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-size: 1.4rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    min-width: 120px;
    justify-content: center;
}

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

.project-btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 122, 93, 0.3);
}

.project-btn.secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--bg-dark-3);
}

.light-mode .project-btn.secondary {
    border-color: var(--bg-light-3);
}

.project-btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.more-projects-note {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary-color);
}

.light-mode .more-projects-note {
    background-color: var(--bg-light-3);
}

.more-projects-note p {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin: 0;
}

.contact-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.portfolio-item h3 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.portfolio-item p {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.portfolio-tech span {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    color: var(--text-muted);
}

.light-mode .portfolio-tech span {
    background-color: var(--bg-light-3);
}

.portfolio-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: auto;
}



.add-project {
    border: 2px dashed var(--bg-dark-3);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.light-mode .add-project {
    border: 2px dashed var(--bg-light-3);
}

.add-project .add-icon {
    margin-bottom: var(--spacing-md);
}

.add-project .add-icon i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.add-project h3 {
    font-size: 2rem;
    color: var(--text-muted);
}

.add-project p {
    color: var(--text-muted);
}

/* ======== Resume Section ======== */
.resume {
    background-color: var(--bg-dark-2);
    position: relative;
    overflow: hidden;
}

.light-mode .resume {
    background-color: var(--bg-light-2);
}

.resume-content {
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.light-mode .resume-content {
    background-color: var(--bg-light-3);
    box-shadow: var(--shadow-light);
}

.resume-header {
    text-align: center;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-dark);
    margin-bottom: var(--spacing-xl);
}

.light-mode .resume-header {
    border-bottom-color: var(--bg-light);
}

.resume-header h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.job-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.resume-contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

@media screen and (max-width: 768px) {
    .resume-contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* Mobile-specific: Big text size for better readability */
    .resume-contact-grid .contact-item {
        padding: var(--spacing-md) !important;
        min-height: 50px;
    }

    .resume-contact-grid .contact-item i {
        font-size: 2rem !important;
        /* Icon bada */
        width: 24px !important;
    }

    .resume-contact-grid .contact-item a,
    .resume-contact-grid .contact-item span {
        font-size: 1.5rem !important;
        /* Text bada */
        line-height: 1.4;
    }
}

.resume-contact-grid .contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs);
    background-color: var(--bg-dark);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    min-height: 40px;
}

.light-mode .resume-contact-grid .contact-item {
    background-color: var(--bg-light);
}

.resume-contact-grid .contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 122, 93, 0.15);
}

.resume-contact-grid .contact-item i {
    color: var(--primary-color);
    font-size: 1.6rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.resume-contact-grid .contact-item a,
.resume-contact-grid .contact-item span {
    font-size: 1.4rem;
    /* Increased from 1.2rem */
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resume-contact-grid .contact-item a:hover {
    color: var(--primary-color);
}

.resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
}

.resume-contact p {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: 0;
    font-size: 1.4rem;
}

.resume-contact p i {
    color: var(--primary-color);
}

.resume-section {
    margin-bottom: var(--spacing-xl);
}

.resume-section-header {
    margin-bottom: var(--spacing-md);
}

.resume-section-header h4 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.resume-section-header h4 i {
    color: var(--primary-color);
}

.resume-section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 2px;
    height: calc(100% - 10px);
    background-color: var(--primary-color);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    padding-left: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-date {
    margin-bottom: var(--spacing-xs);
}

.timeline-date span {
    font-size: 1.3rem;
    color: var(--text-muted);
    background-color: var(--bg-dark);
    padding: 0.4rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.light-mode .timeline-date span {
    background-color: var(--bg-light);
}

.timeline-content h5 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
}

.timeline-content p {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.resume-download {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.resume-note {
    margin-top: var(--spacing-sm);
    font-size: 1.4rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ======== Contact Section ======== */
.contact {
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.light-mode .contact {
    background-color: var(--bg-light);
}

.contact::before {
    content: '';
    position: absolute;
    left: -10%;
    top: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.03;
    z-index: 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    position: relative;
    z-index: 1;
    align-items: start;
}

@media screen and (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

.contact-info {
    background-color: var(--bg-dark-2);
    padding: var(--spacing-xxl);
    border-radius: var(--border-radius-xl);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--bg-dark-3);
}

.light-mode .contact-info {
    background-color: var(--bg-light-2);
    box-shadow: var(--shadow-light);
}

.contact-info h3 {
    font-size: 2.8rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
    position: relative;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 4rem;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.contact-info p {
    font-size: 1.6rem;
    color: var(--text-muted);
}

.contact-details {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.contact-icon {
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.light-mode .contact-icon {
    background-color: var(--bg-light-3);
}

.contact-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-item:hover .contact-icon {
    background-color: var(--primary-color);
}

.contact-item:hover .contact-icon i {
    color: var(--text-light);
}

.contact-text h4 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.contact-text a,
.contact-text p {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: auto;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--bg-dark-3);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.light-mode .social-links a {
    background-color: var(--bg-light-3);
}

.social-links a i {
    font-size: 2rem;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

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

.social-links a:hover i {
    color: white;
}

.contact-form-container {
    background-color: var(--bg-dark-2);
    padding: var(--spacing-xxl);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--bg-dark-3);
}

.light-mode .contact-form-container {
    background-color: var(--bg-light-2);
    box-shadow: var(--shadow-light);
}

.form-header {
    text-align: left;
    /* Changed from center to left */
    margin-bottom: var(--spacing-xl);
}

.form-header h3 {
    font-size: 2.8rem;
    /* Increased from 2.4rem */
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
    position: relative;
    display: inline-block;
    /* Needed for ::after positioning relative to text width if we wanted, but here block is fine */
}

.form-header h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 4rem;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.6rem;
    margin-bottom: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

@media screen and (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.form-group:has(.file-input-wrapper) {
    margin-bottom: 0;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 1.4rem;
    width: 16px;
    text-align: center;
}

.optional {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.4rem 1.6rem;
    background-color: var(--bg-dark-3);
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.light-mode .form-group input,
.light-mode .form-group textarea {
    background-color: var(--bg-light-3);
    border-color: var(--bg-light-3);
    color: var(--text-light-mode);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 122, 93, 0.15), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    background-color: var(--bg-dark-2);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    /* Isse wo flow se bahar ho jayega */
    height: 1px;
    width: 1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 1rem 1.6rem;
    background-color: var(--bg-dark-3);
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    color: var(--text-light);
}

.light-mode .file-input-label {
    background-color: var(--bg-light-3);
}

.file-input-label i {
    color: var(--primary-color);
    transition: all var(--transition-normal);
}

.file-input-label:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 122, 93, 0.3);
    background-color: var(--bg-dark-3);
}

.light-mode .file-input-label:hover {
    background-color: var(--bg-light-3);
}

.file-input-label:hover i {
    transform: scale(1.1);
    color: var(--primary-color);
}

.file-list {
    margin-top: 0.5rem;
    font-size: 1.4rem;
    color: var(--text-muted);
}

.file-list ul {
    margin-top: 0.5rem;
    padding-left: 2rem;
}

.file-list li {
    margin-bottom: 0.3rem;
}

.submit-btn {
    margin-top: var(--spacing-sm);
    padding: 1.8rem 3rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1.6rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    width: 100%;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.submit-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 122, 93, 0.3);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
    visibility: visible;
}

.submit-btn.btn-success {
    background-color: #28a745;
}

.submit-btn.btn-fail {
    background-color: #dc3545;
}

/* ======== Footer ======== */
.footer {
    background-color: var(--bg-dark-3);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

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

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-logo a {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
}

.footer-logo a .dot {
    color: var(--primary-color);
    font-size: 2.6rem;
    font-weight: 900;
}

.footer-text {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--bg-dark);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.light-mode .footer-social a {
    background-color: var(--bg-light);
}

.footer-social a i {
    font-size: 2rem;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

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

.footer-social a:hover i {
    color: white;
}

/* ======== Modal Styles ======== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-dark-2);
    margin: 10% auto;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--bg-dark-3);
    animation: modalSlideIn 0.3s ease-out;
}

.light-mode .modal-content {
    background-color: var(--bg-light-2);
    border-color: var(--bg-light-3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 2.4rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close:hover {
    color: var(--primary-color);
}

.modal-content h3 {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    font-size: 2.4rem;
}

.modal-message {
    background-color: var(--bg-dark-3);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin: var(--spacing-md) 0;
    border-left: 4px solid var(--primary-color);
}

.light-mode .modal-message {
    background-color: var(--bg-light-3);
}

.modal-message p {
    margin: 0;
    font-size: 1.6rem;
    color: var(--text-light);
    line-height: 1.5;
}

#projectNameSpan {
    color: var(--primary-color);
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    justify-content: center;
}

.modal-buttons .btn {
    min-width: 140px;
}

/* ======== Back to Top Button ======== */
.back-to-top {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

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

.back-to-top.hidden-by-menu {
    opacity: 0 !important;
    visibility: hidden !important;
}

.back-to-top i {
    font-size: 2rem;
    color: var(--text-light);
}

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

/* ======== Media Queries ======== */
@media screen and (max-width: 1200px) {
    .hero-content {
        gap: var(--spacing-lg);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    html {
        font-size: 56.25%;
        /* 1rem = 9px */
    }

    .container {
        padding: 0 var(--spacing-lg);
    }

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

    .hero-text {
        max-width: 100%;
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: var(--spacing-xl);
    }

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

    .hero-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .resume-section-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .skills {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .skill-category h3 {
        text-align: left;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 50%;
        /* 1rem = 8px */
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .profile-img-container {
        width: 25rem;
        height: 25rem;
    }

    .floating-badge.top {
        top: 0;
        left: 0;
    }

    .floating-badge.bottom {
        bottom: 0;
        right: 0;
    }

    .scroll-indicator {
        display: none;
    }

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

    .about-text p {
        text-align: left;
    }

    /* Services and Projects specific mobile fixes */
    .services-list,
    .projects-container {
        gap: var(--spacing-sm);
    }
}

@media screen and (max-width: 576px) {
    section {
        padding: var(--spacing-xl) 0;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .hero-title .name {
        font-size: 4.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 25rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .resume-content {
        padding: var(--spacing-lg);
    }

    .resume-contact {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .timeline-item {
        padding-left: var(--spacing-lg);
    }

    .contact-info,
    .contact-form-container {
        padding: var(--spacing-lg);
    }

    .back-to-top {
        bottom: 2rem;
        right: 2rem;
        width: 4rem;
        height: 4rem;
    }

    .file-list ul {
        padding-left: 1rem;
    }
}

/* Semantic HTML Updates - Replaced Headings */
.profile-section .profile-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
}

.resume-header .resume-name {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.timeline-content .timeline-title {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
}

.contact-text .contact-label {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    font-family: 'Poppins', sans-serif;
}