/* ===========================
   Font Configuration
   =========================== 
   
   This site uses Roslindale and Graphik fonts.
   
   ROSLINDALE: Premium serif font by DJR (David Jonathan Ross)
   - Available at: https://djr.com/roslindale or Adobe Fonts
   - Used for: Headings (elegant, distinctive serif)
   
   GRAPHIK: Premium sans-serif font by Commercial Type
   - Available at: https://commercialtype.com/catalog/graphik or Adobe Fonts  
   - Used for: Body text and UI elements (clean, modern sans-serif)
   
   Current setup uses Inter and Crimson Pro from Google Fonts as high-quality alternatives.
   To use the actual fonts, you need to:
   1. Purchase licenses or subscribe to Adobe Fonts
   2. Add font files to a /fonts directory
   3. Uncomment the @font-face declarations below
   4. Update the CSS variables to use 'Roslindale' and 'Graphik'
*/

/* Uncomment these when you have the actual font files:

@font-face {
    font-family: 'Roslindale';
    src: url('fonts/Roslindale-Regular.woff2') format('woff2'),
         url('fonts/Roslindale-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roslindale';
    src: url('fonts/Roslindale-Bold.woff2') format('woff2'),
         url('fonts/Roslindale-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik';
    src: url('fonts/Graphik-Regular.woff2') format('woff2'),
         url('fonts/Graphik-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik';
    src: url('fonts/Graphik-Medium.woff2') format('woff2'),
         url('fonts/Graphik-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik';
    src: url('fonts/Graphik-Semibold.woff2') format('woff2'),
         url('fonts/Graphik-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Graphik';
    src: url('fonts/Graphik-Bold.woff2') format('woff2'),
         url('fonts/Graphik-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
*/

/* ===========================
   Global Styles & Reset
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Sophisticated & Elegant Palette */
    --primary-color: #9A515C;
    --primary-dark: #AD4877;
    --primary-light: #D46A7A;
    --secondary-color: #2A8C9D;
    --accent-color: #B1A2B9;
    --success-color: #81C5BB;
    
    /* Hero Gradient Colors */
    --hero-gradient-1: #B1A2B9;
    --hero-gradient-2: #9A515C;
    --hero-gradient-3: #E6A8B1;
    
    --text-primary: #9A515C;
    --text-secondary: #AD4877;
    --text-light: #B1A2B9;
    --bg-primary: #ffffff;
    --bg-secondary: #AEDAD3;
    --bg-accent: #E6A8B1;
    --border-color: #B1A2B9;
    --shadow-sm: 0 1px 2px 0 rgba(154, 81, 92, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(154, 81, 92, 0.1), 0 2px 4px -1px rgba(154, 81, 92, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(154, 81, 92, 0.1), 0 4px 6px -2px rgba(154, 81, 92, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(154, 81, 92, 0.1), 0 10px 10px -5px rgba(154, 81, 92, 0.04);
    --shadow-glow: 0 0 20px rgba(154, 81, 92, 0.3);
    
    /* Typography - Using Roslindale and Graphik style fonts */
    /* Graphik (or Inter as alternative) for body - clean, modern sans-serif */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* Roslindale (or Crimson Pro as alternative) for headings - elegant serif */
    --font-family-heading: 'Crimson Pro', Georgia, serif;
    /* Graphik for monospace alternative */
    --font-family-mono: 'Inter', 'Courier New', monospace;
    --font-size-base: 16px;
    --line-height-base: 1.7;
    
    /* Spacing - Enhanced */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3.5rem;
    --spacing-2xl: 5rem;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    /* Subtle gradient background for seamless, cohesive design */
    background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 50%, #F8F9FA 100%);
    background-attachment: fixed; /* Note: May impact mobile scroll performance */
    line-height: var(--line-height-base);
    overflow-x: hidden;
}

/* ===========================
   Loading Screen
   =========================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hero-gradient-1) 0%, var(--hero-gradient-2) 50%, var(--hero-gradient-3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.loader-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-circle:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ===========================
   Particles Background
   =========================== */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--drift)) scale(0);
        opacity: 0;
    }
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.75rem;
    font-weight: 700;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-base);
}

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

/* ===========================
   Utility Classes
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section:not(.hero) {
    position: relative;
    transition: all var(--transition-base);
}

.section:not(.hero)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(154, 81, 92, 0.1), transparent);
    opacity: 0.5;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    font-size: 3.25rem;
    position: relative;
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.section-title .no-underline {
    text-decoration: none;
    background: var(--text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--text-primary);
    background-clip: text;
    opacity: 0.5;
    font-weight: 400;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-full);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* ===========================
   Navigation Bar
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color var(--transition-base);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: translateX(-50%);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(230, 168, 177, 0.15);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(230, 168, 177, 0.15);
    font-weight: 700;
}

.nav-link.active::after {
    width: 80%;
}

.nav-social-icons {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.nav-icon {
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon:hover {
    color: var(--primary-color);
    background-color: var(--bg-accent);
    transform: translateY(-2px);
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hero-gradient-1) 0%, var(--hero-gradient-2) 50%, var(--hero-gradient-3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
    will-change: background-position;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4.25rem;
    margin-bottom: var(--spacing-md);
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: nowrap;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
    margin-bottom: var(--spacing-lg);
}

/* Hero Social Icons */
.hero-social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.hero-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: white;
    transition: all var(--transition-base);
}

/* Modern browsers with backdrop-filter support */
@supports (backdrop-filter: blur(10px)) {
    .hero-social-icon {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
    }
}

.hero-social-icon:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-social-icon svg {
    width: 24px;
    height: 24px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===========================
   About Section
   =========================== */
.about {
    background-color: transparent;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-profile {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    margin-bottom: var(--spacing-2xl);
}

.profile-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
}

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

.profile-image svg {
    width: 80px;
    height: 80px;
}

.about-text {
    flex: 1;
}

.about-intro {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

/* Statistics Counter */
.stats-container {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding: var(--spacing-md) 0;
    flex-wrap: nowrap;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-sm);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 35px;
    height: 35px;
    margin: 0 auto var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-sm);
    color: white;
    animation: float 3s ease-in-out infinite;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-family-heading);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .about-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .profile-image svg {
        width: 60px;
        height: 60px;
    }
    
    .stats-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        flex: 1 1 calc(50% - var(--spacing-sm));
        min-width: 120px;
    }
}

/* ===========================
   Experience Section - Improved Layout
   =========================== */
.experience {
    background-color: transparent;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
}

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

.timeline-dot {
    position: absolute;
    left: -9px;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--bg-primary);
    z-index: 1;
}

.timeline-content {
    background-color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border-left: 4px solid var(--primary-color);
}

.timeline-content:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-color);
}

.timeline-title {
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: 1.5rem;
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.timeline-date {
    color: var(--text-light);
    font-size: 0.875rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #F5F5F5;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
}

.timeline-description {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    font-size: 1rem;
}

.timeline-highlights {
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: var(--spacing-sm);
}

.timeline-highlights li {
    padding-left: var(--spacing-md);
    margin-bottom: 0;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-highlights li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 25px;
    }
    
    .timeline-item {
        padding-left: var(--spacing-md);
    }
    
    .timeline-dot {
        left: -7px;
        width: 14px;
        height: 14px;
    }
}

/* ===========================
   Projects Section
   =========================== */
.projects {
    background-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.project-card {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-slow), 
                box-shadow var(--transition-slow),
                border-color var(--transition-slow);
    border: 1px solid var(--border-color);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s;
    pointer-events: none;
}

.project-card:hover::after {
    left: 100%;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg) scale(1.03);
    box-shadow: var(--shadow-xl), var(--shadow-glow), 
                0 30px 60px -12px rgba(99, 102, 241, 0.25);
    border-color: var(--primary-light);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 50%, var(--accent-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-slow);
}

.project-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.05) 10px, rgba(255, 255, 255, 0.05) 20px);
}

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

.project-image-placeholder {
    color: white;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

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

.project-title {
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

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

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

.tag {
    padding: 0.375rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all var(--transition-base);
    cursor: default;
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.project-links {
    display: flex;
    gap: var(--spacing-md);
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-base);
    position: relative;
    display: inline-block;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width var(--transition-base);
}

.project-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

.project-link:hover::after {
    width: 100%;
}

/* ===========================
   Skills Section - Compact & Unique Design
   =========================== */
.skills {
    background-color: transparent;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border-left: 4px solid var(--primary-color);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent-color);
}

.skill-category-title {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.skill-category-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: inline-block;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.skill-item {
    padding: 0.3rem 0.6rem;
    background-color: #F5F5F5;
    color: var(--text-primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.skill-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ===========================
   Education Section - Timeline Design
   =========================== */
.education {
    background-color: transparent;
}

/* Education uses the same timeline styles as Work Experience section */

/* ===========================
   Certifications & Awards Section
   =========================== */
.certifications {
    background-color: transparent;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.certification-card {
    background-color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid var(--border-color);
    text-align: center;
}

.certification-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

.cert-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.cert-org {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.cert-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 768px) {
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    background-color: transparent;
}

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

.contact-intro {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background-color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    text-align: left;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.contact-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s;
}

.contact-method:hover::before {
    left: 100%;
}

.contact-method:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.contact-method:hover .contact-icon {
    animation: pulse 1s infinite;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-md);
    color: white;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.social-icon svg {
    width: 32px;
    height: 32px;
}

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

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xs);
}

.footer-made {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

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

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

/* Scroll reveal animation - Enhanced */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse animation for icons */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===========================
   Back to Top Button
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.back-to-top:active {
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-xl) 0;
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-base);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
        white-space: normal;
    }
    
    .hero-buttons {
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-social-links {
        margin-top: var(--spacing-md);
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding-left: var(--spacing-md);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .navbar,
    .nav-toggle,
    .footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* ===========================
   Custom Cursor Removed - Using Default Pointer
   =========================== */

/* ===========================
   Ripple Effect
   =========================== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.5);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===========================
   Scroll Progress Bar
   =========================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 10000;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ===========================
   Card Navigation Animation
   =========================== */
.card-nav-container {
  position: absolute;
  top: 2em;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  z-index: 99;
  box-sizing: border-box;
}

.card-nav {
  display: block;
  height: 60px;
  padding: 0;
  background-color: white;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  will-change: height;
}

.card-nav-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.45rem 0.55rem 1.1rem;
  z-index: 2;
}

.hamburger-menu {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 6px;
}

.hamburger-menu:hover .hamburger-line {
  opacity: 0.75;
}

.hamburger-line {
  width: 30px;
  height: 2px;
  background-color: currentColor;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    margin 0.3s ease;
  transform-origin: 50% 50%;
}

.hamburger-menu.open .hamburger-line:first-child {
  transform: translateY(4px) rotate(45deg);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.open .hamburger-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.logo-container {
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.logo {
  height: 28px;
}

.card-nav-cta-button {
  background-color: #111;
  color: white;
  border: none;
  border-radius: calc(0.75rem - 0.35rem);
  padding: 0 1rem;
  height: 100%;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
}

.card-nav-cta-button:hover {
  background-color: #333;
}

.card-nav-content {
  position: absolute;
  left: 0;
  right: 0;
  top: 60px;
  bottom: 0;
  padding: 0.5rem;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.card-nav.open .card-nav-content {
  visibility: visible;
  pointer-events: auto;
}

.nav-card {
  height: 100%;
  flex: 1 1 0;
  min-width: 0;
  border-radius: calc(0.75rem - 0.2rem);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  gap: 8px;
  user-select: none;
}

.nav-card-label {
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.nav-card-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-card-link {
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-card-link:hover {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .card-nav-container {
    width: 90%;
    top: 1.2em;
  }

  .card-nav-top {
    padding: 0.5rem 1rem;
    justify-content: space-between;
  }

  .hamburger-menu {
    order: 2;
  }

  .logo-container {
    position: static;
    transform: none;
    order: 1;
  }

  .card-nav-cta-button {
    display: none;
  }

  .card-nav-content {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0.5rem;
    bottom: 0;
    justify-content: flex-start;
  }

  .nav-card {
    height: auto;
    min-height: 60px;
    flex: 1 1 auto;
    max-height: none;
  }

  .nav-card-label {
    font-size: 18px;
  }

  .nav-card-link {
    font-size: 15px;
  }
}
