/* ==========================================================================
   SHAMS TAREK GOUDA PORTFOLIO - STYLING
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Reset and Core Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

/* Theme variables */
:root {
    /* Color Palette - Default Dark Mode */
    --primary: #2563EB;
    --primary-rgb: 37, 99, 235;
    --accent: #60A5FA;
    --bg-main: #020617;
    --bg-secondary: #0F172A;
    --bg-card: #111827;
    --bg-card-hover: #1F2937;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-inverse: #0F172A;
    --border-color: rgba(148, 163, 184, 0.15);
    --border-hover: rgba(96, 165, 250, 0.4);
    
    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
    --shadow-glow-accent: 0 0 25px rgba(96, 165, 250, 0.2);
    
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Layout */
    --header-height: 80px;
    --container-width: 1200px;
}

/* Light Theme Variables */
body[data-theme="light"] {
    --bg-main: #F8FAFC;
    --bg-secondary: #EFF6FF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-inverse: #F8FAFC;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(37, 99, 235, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(37, 99, 235, 0.08), 0 8px 10px -6px rgba(37, 99, 235, 0.05);
    --shadow-glow: 0 10px 30px rgba(37, 99, 235, 0.06);
    --shadow-glow-accent: 0 10px 30px rgba(37, 99, 235, 0.1);
}

/* Base Elements */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

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

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

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

ul {
    list-style: none;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border: 2px solid var(--bg-main);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   LAYOUT & UTILITIES
   ========================================================================== */

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

.section {
    padding: 8rem 0 4rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.section-title span {
    background: linear-gradient(135deg, var(--text-main) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Gradients and Blobs Background */
.glow-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.glow-blob-1 {
    top: 10%;
    right: -10%;
}

.glow-blob-2 {
    bottom: 20%;
    left: -10%;
}

/* Common Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* ==========================================================================
   NAVIGATION / HEADER
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color var(--transition-normal), border-color var(--transition-normal), height var(--transition-normal);
}

body[data-theme="light"] .header {
    background-color: rgba(248, 250, 252, 0.75);
}

.header.scrolled {
    height: 70px;
    background-color: rgba(2, 6, 23, 0.9);
    box-shadow: var(--shadow-sm);
}

body[data-theme="light"] .header.scrolled {
    background-color: rgba(248, 250, 252, 0.9);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #FFFFFF 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
}

body[data-theme="light"] .logo {
    background: linear-gradient(135deg, var(--primary) 30%, var(--text-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 2.25rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Hide theme icons depending on selected mode */
body[data-theme="light"] .theme-toggle .moon-icon {
    display: block;
}
body[data-theme="light"] .theme-toggle .sun-icon {
    display: none;
}
body:not([data-theme="light"]) .theme-toggle .moon-icon {
    display: none;
}
body:not([data-theme="light"]) .theme-toggle .sun-icon {
    display: block;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    cursor: pointer;
    z-index: 1010;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: all var(--transition-normal);
}

/* Mobile Menu Open State */
.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -8px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-welcome {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-welcome::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-name span {
    background: linear-gradient(135deg, var(--text-main) 20%, var(--accent) 70%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hero-subtitle span {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Hero Art - Graphic Illustration */
.hero-art-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-art-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, rgba(96, 165, 250, 0.05) 50%, rgba(0,0,0,0) 80%);
    filter: blur(20px);
    z-index: -1;
    animation: pulse 8s infinite alternate;
}

.hero-art-mesh {
    width: 320px;
    height: 320px;
    border: 2px dashed var(--border-color);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 15s infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.05), rgba(96, 165, 250, 0.05));
    position: relative;
}

.hero-art-inner {
    width: 220px;
    height: 220px;
    border: 2px solid var(--border-hover);
    border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(2, 6, 23, 0.8) 100%);
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    animation: morphing-inner 12s infinite alternate;
    color: var(--accent);
}

body[data-theme="light"] .hero-art-inner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(239, 246, 255, 0.8) 100%);
    box-shadow: var(--shadow-md);
}

.hero-art-inner svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    margin-bottom: 0.75rem;
}

.hero-art-inner span {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-art-floating-card {
    position: absolute;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: float 4s ease-in-out infinite;
}

body[data-theme="light"] .hero-art-floating-card {
    background: rgba(255, 255, 255, 0.9);
}

.hero-art-floating-card.card-1 {
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.hero-art-floating-card.card-2 {
    bottom: 10%;
    right: -5%;
    animation-delay: 2s;
}

.hero-art-floating-card svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.hero-art-floating-card span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Animations Keyframes */
@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes morphing-inner {
    0% { border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 30% 60% 50%; }
    100% { border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ==========================================================================
   ABOUT ME SECTION
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 5rem;
    align-items: center;
}

.about-photo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-photo-card {
    position: relative;
    border-radius: 20px;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4) 0%, rgba(96, 165, 250, 0.2) 100%);
    box-shadow: var(--shadow-glow-accent);
    max-width: 380px;
    width: 100%;
}

.about-photo-card img {
    border-radius: 16px;
    width: 100%;
    height: 480px;
    object-fit: cover;
    filter: grayscale(10%) contrast(105%);
    transition: filter var(--transition-normal);
}

.about-photo-card:hover img {
    filter: grayscale(0%) contrast(105%);
}

.about-photo-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 220px;
}

body[data-theme="light"] .about-photo-badge {
    background: var(--bg-card);
}

.about-photo-badge .badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo-badge .badge-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.about-photo-badge .badge-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.about-photo-badge .badge-text p {
    font-size: 0.8rem;
}

/* About Content */
.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-content h3 span {
    color: var(--accent);
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

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

/* Highlights Grid */
.about-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.highlight-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all var(--transition-normal);
}

.highlight-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.highlight-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

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

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.skills-category-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all var(--transition-normal);
}

.skills-category-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.skills-category-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.skills-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-category-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.skills-category-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.skills-category-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.skill-badge {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-normal);
}

.skill-badge:hover {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skill-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.skill-badge span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

/* ==========================================================================
   EXPERIENCE SECTION (TIMELINE)
   ========================================================================== */

.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Timeline Vertical Line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--accent) 50%, var(--border-color) 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 2rem 3rem;
    box-sizing: border-box;
}

/* Alternating Alignment */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Timeline Nodes (Circles) */
.timeline-dot {
    position: absolute;
    top: 2.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    transition: all var(--transition-normal);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent);
    background-color: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transform: scale(1.2);
}

/* Timeline Card */
.timeline-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.timeline-item:hover .timeline-card {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

/* Timeline Card Arrow Indicators */
.timeline-card::before {
    content: '';
    position: absolute;
    top: 2.25rem;
    width: 0;
    height: 0;
    border-style: solid;
}

.timeline-item:nth-child(odd) .timeline-card::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--border-color);
}

.timeline-item:nth-child(even) .timeline-card::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

/* Experience Details */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-block;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.timeline-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.timeline-responsibilities {
    list-style-type: none;
}

.timeline-responsibilities li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.25rem;
}

.timeline-responsibilities li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
}

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

.project-icon-box {
    padding: 2rem 2rem 0;
    color: var(--primary);
}

.project-icon-box svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.project-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    align-self: flex-start;
    transition: color var(--transition-fast);
}

.project-link-btn:hover {
    color: var(--primary);
}

.project-link-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform var(--transition-fast);
}

.project-link-btn:hover svg {
    transform: translateX(3px);
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.05) 0%, rgba(0,0,0,0) 60%);
    z-index: 1;
    pointer-events: none;
}

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
    transform: scale(1.1);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
}

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.service-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ==========================================================================
   EDUCATION & COURSES SECTION
   ========================================================================== */

.edu-courses-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
}

.edu-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    height: fit-content;
    transition: all var(--transition-normal);
}

.edu-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.edu-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.edu-icon-box svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.edu-degree {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.edu-school {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.edu-dept {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.edu-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.08);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Courses Grid */
.courses-container h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.courses-container h3 svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.course-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-normal);
}

.course-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.course-icon {
    color: var(--primary);
}

.course-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.course-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Languages Subsection */
.languages-box {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.languages-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.languages-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.language-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.language-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
}

.language-level {
    color: var(--accent);
}

.language-bar {
    width: 100%;
    height: 6px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.language-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 8px var(--primary);
}

/* ==========================================================================
   CAREER OBJECTIVE SECTION
   ========================================================================== */

.objective-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.objective-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
}

.objective-icon {
    font-size: 3rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.objective-icon svg {
    width: 50px;
    height: 50px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.objective-text {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-main);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

body[data-theme="light"] .objective-text {
    font-weight: 600;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
}

/* Direct Contact Info */
.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-msg {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-normal);
}

.contact-item:hover {
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.contact-text-group p {
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.contact-text-group h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Social Media Handles */
.socials-container h3 {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.social-links-row {
    display: flex;
    gap: 1rem;
}

.social-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.social-circle:hover {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.social-circle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Contact Form */
.contact-form-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-sm);
}

.form-group-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.form-input:focus {
    border-color: var(--accent);
    background-color: var(--bg-card);
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.1);
}

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

.form-submit-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

/* Toast Message Notification styling */
.toast-msg {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--bg-card);
    border-left: 4px solid #10B981;
    color: var(--text-main);
    padding: 1.25rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1100;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-msg.show {
    transform: translateY(0);
}

.toast-icon {
    color: #10B981;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 3rem 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copy {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.scroll-top-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.scroll-top-btn:hover {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.scroll-top-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Delay modifiers for grids and items */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Slide-in horizontal animations for timeline and split screens */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }
    
    .section {
        padding: 6rem 0 3rem;
    }
    
    .hero-name {
        font-size: 3.25rem;
    }
    
    .about-grid, .edu-courses-grid, .contact-grid {
        gap: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    /* Responsive timeline converts to a single left-aligned column */
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 45px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    
    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-card::before,
    .timeline-item:nth-child(even) .timeline-card::before {
        left: -10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--border-color) transparent transparent;
    }
}

@media (max-width: 768px) {
    /* Hide nav menu and display hamburger */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 8rem 2rem 2rem;
        gap: 2rem;
        transition: right var(--transition-normal);
        z-index: 1005;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.15rem;
        width: 100%;
        display: block;
    }
    
    /* Layouts stack vertically */
    .hero-grid, .about-grid, .edu-courses-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .hero {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 4rem;
    }
    
    .hero-grid {
        text-align: center;
    }
    
    .hero-welcome {
        justify-content: center;
    }
    
    .hero-welcome::before {
        display: none;
    }
    
    .hero-subtitle {
        justify-content: center;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-art-container {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .about-photo-wrapper {
        order: -1;
    }
    
    .about-photo-badge {
        right: 0;
        bottom: -15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .about-highlights-grid, .courses-grid, .languages-grid, .form-group-row {
        grid-template-columns: 1fr;
    }
    
    .about-photo-card img {
        height: 380px;
    }
    
    .about-photo-badge {
        position: relative;
        right: 0;
        bottom: 0;
        margin: 1.5rem auto 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .objective-card {
        padding: 2.5rem 1.5rem;
    }
    
    .objective-text {
        font-size: 1.2rem;
    }
    
    .contact-form-card {
        padding: 2rem 1.5rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}
