/* ===================================
   CSS Variables & Theme Configuration
   =================================== */

:root {
    /* Color Palette - Dark Theme */
    --primary-color: #0ea5e9;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-elevated: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);
    
    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'Consolas', 'SFMono-Regular', 'Menlo', monospace;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-dark: #ffffff;
    --bg-darker: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .name-highlight {
    color: #0f172a;
    text-shadow: 
        0 0 20px rgba(14, 165, 233, 0.6),
        0 0 40px rgba(14, 165, 233, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        1px 1px 0 rgba(14, 165, 233, 0.3),
        -1px -1px 0 rgba(14, 165, 233, 0.3);
}

/* ===================================
   Base Styles & Reset
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { 
    font-size: clamp(2.5rem, 5vw, 4rem);
}
h2 { 
    font-size: clamp(2rem, 4vw, 3rem); 
}
h3 { 
    font-size: clamp(1.5rem, 3vw, 2rem); 
}
h4 { 
    font-size: clamp(1.25rem, 2.5vw, 1.5rem); 
}

p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-color);
}

/* ===================================
   Navigation Bar
   =================================== */

.navbar {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all var(--transition-base);
    z-index: 1000;
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.brand-initials {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 10px;
    background-color: rgba(14, 165, 233, 0.08);
}

.brand-name {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(14, 165, 233, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 1rem;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

/* Mobile Navigation */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(241, 245, 249, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15, 23, 42, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===================================
   Hero Section
   =================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    position: relative;
    color: var(--text-primary);
}

.name-highlight {
    display: block;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 
        0 0 20px rgba(14, 165, 233, 0.8),
        0 0 40px rgba(14, 165, 233, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3),
        2px 2px 0 rgba(14, 165, 233, 0.4),
        -2px -2px 0 rgba(14, 165, 233, 0.4);
    font-weight: 900;
    position: relative;
}

/* Fallback for browsers that don't support text-shadow well */
@supports (-webkit-text-stroke: 1px) {
    .name-highlight {
        -webkit-text-stroke: 1px rgba(14, 165, 233, 0.5);
    }
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 60px;
    font-weight: 600;
}

.typing-text {
    color: var(--primary-color);
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-color);
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-cta {
    margin-bottom: 2rem;
}

.cta-link {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.cta-link:hover {
    transform: translateX(5px);
}

.hero-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.3rem;
    transition: all var(--transition-base);
}

.social-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Hero Image */
.hero-image-container {
    position: relative;
    z-index: 1;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1;
}

.image-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2), transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-xl);
    display: none;
}

.hero-image.loaded {
    display: block;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 3px solid var(--primary-color);
    font-size: 8rem;
    color: var(--primary-color);
}

.image-placeholder p {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1rem;
    color: var(--primary-color);
}

.floating-tech {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    animation: float-tech 6s ease-in-out infinite;
}

.tech-1 { top: 10%; right: 0; animation-delay: 0s; }
.tech-2 { bottom: 30%; left: -10%; animation-delay: 1s; }
.tech-3 { top: 50%; right: -5%; animation-delay: 2s; }
.tech-4 { bottom: 10%; right: 20%; animation-delay: 3s; }

@keyframes float-tech {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===================================
   Buttons
   =================================== */

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-light {
    background: white;
    color: var(--bg-dark);
}

.btn-light:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--bg-dark);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ===================================
   Sections
   =================================== */

.section-padding {
    padding: var(--section-padding);
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ===================================
   About Section
   =================================== */

.about-section {
    background: var(--bg-darker);
}

/* About Image Container */
.about-image-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 0 2rem auto;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(14, 165, 233, 0.4);
    background: rgba(15, 23, 42, 0.9);
}

.about-image-wrapper .image-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2), transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    animation: pulse 3s ease-in-out infinite;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 3px solid rgba(14, 165, 233, 0.8);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.about-image-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 3px solid var(--primary-color);
    font-size: 8rem;
    color: var(--primary-color);
}

.about-image-placeholder p {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1rem;
    color: var(--primary-color);
}

.about-image-container .floating-tech {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    animation: float-tech 6s ease-in-out infinite;
}

.about-image-container .tech-1 { top: 10%; right: 0; animation-delay: 0s; }
.about-image-container .tech-2 { bottom: 30%; left: -10%; animation-delay: 1s; }
.about-image-container .tech-3 { top: 50%; right: -5%; animation-delay: 2s; }
.about-image-container .tech-4 { bottom: 10%; right: 20%; animation-delay: 3s; }

.about-content {
    padding: 2rem 0;
}

.about-heading {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.highlight-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.highlight-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.highlight-item p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.about-card:hover .card-glow {
    opacity: 1;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.strength-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.strength-item {
    text-align: center;
}

.strength-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: transform var(--transition-base);
}

.strength-item:hover .strength-icon {
    transform: scale(1.1) rotate(5deg);
}

.strength-item h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.strength-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===================================
   Skills Section
   =================================== */

.skills-section {
    background: var(--bg-dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition-base);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.category-header h3 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-primary);
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.skill-badge:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.skill-badge i {
    font-size: 1.2rem;
}

/* ===================================
   Services Section
   =================================== */

.services-section {
    background: var(--bg-darker);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    height: 100%;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-features i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===================================
   Projects Section
   =================================== */

.projects-section {
    background: var(--bg-dark);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: var(--bg-elevated);
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===================================
   Education Section
   =================================== */

.education-section {
    background: var(--bg-darker);
}

.education-intro {
    max-width: 700px;
    margin: 1rem auto 0;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.education-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--border-color) 100%);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    border: 4px solid var(--bg-darker);
    z-index: 1;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

/* Different icon styles for different education levels */
.timeline-icon.bachelor {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.timeline-icon.diploma {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
}

.timeline-icon.certificate {
    background: linear-gradient(135deg, #10b981, #059669);
}

.timeline-icon.training {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.timeline-icon.secondary {
    background: linear-gradient(135deg, #ec4899, #d946ef);
}

.timeline-icon.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.timeline-card:hover::before {
    transform: scaleX(1);
}

.timeline-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

/* Featured card (current degree) */
.timeline-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(14, 165, 233, 0.05) 100%);
}

.timeline-card.featured::before {
    height: 5px;
    transform: scaleX(1);
}

.timeline-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-status.current {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    animation: pulse-glow 2s ease-in-out infinite;
}

.timeline-status.completed {
    background: linear-gradient(135deg, #10b981, #059669);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.8); }
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.timeline-institution {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.timeline-institution.editable {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 500;
}

.timeline-period {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.timeline-period i {
    color: var(--primary-color);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.timeline-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.timeline-highlights span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.timeline-highlights span:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.timeline-highlights i {
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

.timeline-highlights span:hover i {
    color: white;
}

/* ===================================
   CTA Section
   =================================== */

.cta-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
}

.cta-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cta-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.cta-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===================================
   Contact Section
   =================================== */

.contact-section {
    background: var(--bg-dark);
}

.contact-info {
    padding: 2rem;
}

.contact-info-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-text p,
.contact-text a {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-text a:hover {
    color: var(--primary-color);
}

.contact-social h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.contact-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-status {
    min-height: 1.5rem;
    margin-top: 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-status.success {
    color: #22c55e;
}

.form-status.error {
    color: #ef4444;
}

.form-notice i {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--bg-darker);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social .social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-credit {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===================================
   Back to Top Button
   =================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.back-to-top.show {
    display: flex;
}

/* ===================================
   Modal
   =================================== */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    color: var(--text-primary);
}

.btn-close {
    filter: invert(1);
    opacity: 0.7;
}

[data-theme="light"] .btn-close {
    filter: invert(0);
}

.modal-body {
    padding: 2rem 1.5rem;
}

.modal-project-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-section p,
.modal-section ul {
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-section ul {
    padding-left: 1.5rem;
}

.modal-section ul li {
    margin-bottom: 0.5rem;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 991px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .hero-section {
        padding: 120px 0 60px;
    }
    
    .hero-image-container {
        margin-top: 3rem;
    }
    
    .floating-tech {
        display: none;
    }
    
    .about-image-container {
        margin-bottom: 3rem;
    }
    
    .about-image-container .floating-tech {
        display: none;
    }
    
    .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }
    
    .theme-toggle {
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .strength-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .education-timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-width: 3px;
    }
    
    .timeline-card {
        padding: 1.5rem;
    }
    
    .timeline-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        gap: 0.5rem;
    }

    .brand-name {
        font-size: 0.62rem;
        letter-spacing: 0.05em;
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-lg {
        width: 100%;
        justify-content: center;
    }
    
    .hero-social {
        justify-content: center;
    }
    
    .hero-name {
        font-size: clamp(2rem, 8vw, 3rem);
        text-align: center;
    }
    
    .name-highlight {
        line-height: 1.2;
    }
    
    .about-image-wrapper {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 575px) {
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .about-highlights,
    .contact-details {
        gap: 1.25rem;
    }
    
    .service-card,
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .hero-image-wrapper,
    .about-image-wrapper {
        max-width: 280px;
    }
    
    .timeline-highlights {
        flex-direction: column;
    }
    
    .timeline-highlights span {
        justify-content: flex-start;
    }
}

/* ===================================
   Animations & Effects
   =================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* AOS-like animations */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .floating-tech,
    .theme-toggle {
        display: none !important;
    }
    
    .section-padding {
        padding: 20px 0;
    }
}
