 :root {
     /* Ethiopian New Year Inspired Color Palette */
     --primary: #FBBF24;
     /* Bright Yellow (Adey Abeba) */
     --secondary: #F59E0B;
     /* Deeper Gold */
     --accent: #34D399;
     /* Fresh Green */
     --dark: #121826;
     --light: #f8f9fa;
     --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
 }

 [data-bs-theme="dark"] {
     --bg-color: #0F172A;
     --text-color: #E0E0E0;
     --card-bg: #1E293B;
     --border-color: #2D3748;
     --section-bg: #121826;
 }

 [data-bs-theme="light"] {
     --bg-color: #F8FAFC;
     --text-color: #2D3748;
     --card-bg: #FFFFFF;
     --border-color: #E2E8F0;
     --section-bg: #F1F5F9;
 }

 body {
     font-family: 'Poppins', sans-serif;
     background-color: var(--bg-color);
     color: var(--text-color);
     overflow-x: hidden;
     transition: background-color 0.4s ease, color 0.4s ease;
     cursor: none;
 }

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

 .preloader.fade-out {
     opacity: 0;
     visibility: hidden;
 }

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

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

 /* Custom Cursor */
 .cursor {
     position: fixed;
     width: 20px;
     height: 20px;
     border: 2px solid var(--primary);
     border-radius: 50%;
     transform: translate(-50%, -50%);
     pointer-events: none;
     z-index: 9999;
     transition: transform 0.1s, width 0.3s, height 0.3s, background-color 0.3s, opacity 0.3s;
     mix-blend-mode: difference;
 }

 .cursor-follower {
     position: fixed;
     width: 8px;
     height: 8px;
     background: var(--primary);
     border-radius: 50%;
     transform: translate(-50%, -50%);
     pointer-events: none;
     z-index: 9998;
     transition: width 0.3s, height 0.3s, opacity 0.3s;
 }

 .cursor.active {
     transform: translate(-50%, -50%) scale(1.5);
     background: var(--primary);
     opacity: 0.5;
 }

 .cursor-follower.active {
     transform: translate(-50%, -50%) scale(3);
     opacity: 0.2;
 }

 .cursor.click {
     transform: translate(-50%, -50%) scale(0.8);
 }

 /* General UI enhancements */
 h1,
 h2,
 h3,
 h4,
 h5 {
     font-family: 'Raleway', sans-serif;
     font-weight: 800;
 }

 /* Navigation */
 .navbar {
     padding: 20px 0;
     transition: all 0.4s ease;
 }

 .navbar-scrolled {
     padding: 10px 0;
     background: rgba(15, 23, 42, 0.7);
     /* Darker semi-transparent bg */
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
 }

 [data-bs-theme="light"] .navbar-scrolled {
     background: rgba(255, 255, 255, 0.7);
 }

 .navbar-brand {
     font-family: 'Raleway', sans-serif;
     font-weight: 800;
     letter-spacing: 1px;
     font-size: 1.8rem;
     color: var(--text-color);
     transition: var(--transition);
 }

 .navbar-brand:hover {
     transform: scale(1.05);
 }

 .navbar-brand span {
     color: var(--primary);
 }

 .navbar-nav .nav-link {
     color: var(--text-color);
     font-weight: 500;
     margin: 0 10px;
     position: relative;
     transition: all 0.3s ease;
 }

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

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

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

 /* Hero Section - Ethiopian New Year Theme */
 .hero {
     min-height: 100vh;
     display: flex;
     align-items: center;
     position: relative;
     overflow: hidden;
     /* New background with a floral image and dark overlay for text readability */
     background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('https://images.unsplash.com/photo-1531299244874-9a185b1a8a25?q=80&w=2070&auto=format&fit=crop');
     background-size: cover;
     background-position: center;
     background-attachment: fixed;
     /* Creates a subtle parallax effect */
 }

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

 /* Animated Petals/Sparkles */
 .petals-container {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     overflow: hidden;
     pointer-events: none;
     z-index: 1;
 }

 .petal {
     position: absolute;
     top: -50px;
     background-color: var(--primary);
     border-radius: 50%;
     opacity: 0.6;
     animation: fall linear infinite;
 }

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

     100% {
         transform: translateY(105vh) rotate(720deg);
         opacity: 0;
     }
 }

 /* Generate varied petals */
 .petal.p1 {
     left: 10%;
     animation-duration: 15s;
     animation-delay: 0s;
     width: 10px;
     height: 10px;
 }

 .petal.p2 {
     left: 20%;
     animation-duration: 10s;
     animation-delay: 5s;
     width: 15px;
     height: 15px;
 }

 .petal.p3 {
     left: 35%;
     animation-duration: 18s;
     animation-delay: 2s;
     width: 8px;
     height: 8px;
 }

 .petal.p4 {
     left: 50%;
     animation-duration: 12s;
     animation-delay: 8s;
     width: 12px;
     height: 12px;
 }

 .petal.p5 {
     left: 65%;
     animation-duration: 20s;
     animation-delay: 1s;
     width: 10px;
     height: 10px;
 }

 .petal.p6 {
     left: 80%;
     animation-duration: 14s;
     animation-delay: 6s;
     width: 16px;
     height: 16px;
 }

 .petal.p7 {
     left: 90%;
     animation-duration: 16s;
     animation-delay: 4s;
     width: 9px;
     height: 9px;
 }


 .hero-title {
     font-size: 4.5rem;
     font-weight: 800;
     margin-bottom: 1.5rem;
     line-height: 1.2;
     color: #fff;
     /* White color for better contrast on image */
 }

 .hero-title span {
     background: linear-gradient(to right, var(--primary), var(--secondary));
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
 }

 .hero-subtitle {
     font-size: 1.8rem;
     margin-bottom: 2rem;
     opacity: 0.9;
     color: #E0E0E0;
 }

 .hero-subtitle .typing-cursor {
     display: inline-block;
     width: 3px;
     height: 1.8rem;
     background-color: var(--primary);
     animation: blink 0.7s infinite;
     margin-left: 5px;
 }

 @keyframes blink {
     50% {
         opacity: 0;
     }
 }

 .hero-profile-img {
     max-width: 350px;
     border: 5px solid var(--primary);
     box-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
     transition: var(--transition);
 }

 .hero-profile-img:hover {
     transform: scale(1.05) rotate(3deg);
     box-shadow: 0 0 60px rgba(251, 191, 36, 0.6);
 }

 .btn-primary,
 .btn-outline-light {
     border-radius: 50px;
     padding: 14px 35px;
     font-weight: 600;
     letter-spacing: 0.5px;
     transition: all 0.4s ease;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
 }

 .btn-primary {
     background: linear-gradient(45deg, var(--primary), var(--secondary));
     border: none;
     color: var(--dark);
 }

 .btn-primary:hover {
     transform: translateY(-5px);
     box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
 }

 .btn-outline-light {
     border: 2px solid var(--primary);
     color: var(--primary);
 }

 .btn-outline-light:hover {
     background: var(--primary);
     color: var(--dark);
     transform: translateY(-5px);
     box-shadow: 0 10px 20px rgba(251, 191, 36, 0.2);
 }

 /* General Section Styling */
 .section {
     padding: 100px 0;
     position: relative;
 }

 .section-bg {
     background-color: var(--section-bg);
 }

 .section-title {
     position: relative;
     margin-bottom: 60px;
     text-align: center;
 }

 .section-title h2 {
     font-size: 3.2rem;
     display: inline-block;
     position: relative;
     padding-bottom: 15px;
 }

 .section-title h2::after {
     content: '';
     position: absolute;
     bottom: 0;
     left: 50%;
     transform: translateX(-50%);
     width: 80px;
     height: 4px;
     background: var(--primary);
     border-radius: 2px;
     transition: width 0.4s ease;
 }

 .section-title:hover h2::after {
     width: 120px;
 }

 .section-title p {
     max-width: 700px;
     margin: 20px auto 0;
     font-size: 1.1rem;
     opacity: 0.8;
 }

 /* Card Styling */
 .card {
     background-color: var(--card-bg);
     border: 1px solid var(--border-color);
     transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
     height: 100%;
     margin-bottom: 25px;
     border-radius: 15px;
     overflow: hidden;
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
 }

 .card:hover {
     transform: translateY(-15px) scale(1.02);
     box-shadow: 0 0 35px rgba(251, 191, 36, 0.2), 0 25px 50px rgba(0, 0, 0, 0.2);
     border-color: var(--primary);
 }

 /* Services Section */
 .service-card {
     text-align: center;
     padding: 40px 25px;
 }

 .service-icon {
     width: 80px;
     height: 80px;
     background: linear-gradient(45deg, var(--primary), var(--secondary));
     border-radius: 20px;
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 25px;
     transition: var(--transition);
 }

 .service-card:hover .service-icon {
     transform: translateY(-10px) rotate(15deg) scale(1.1);
     box-shadow: 0 15px 30px rgba(251, 191, 36, 0.4);
 }

 /* Projects Section */
 .project-card .card-img-top {
     height: 220px;
     object-fit: cover;
     transition: transform 0.4s ease;
 }

 .project-card:hover .card-img-top {
     transform: scale(1.1);
 }

 .project-card {
     cursor: pointer;
 }

 /* Timeline / Experience Section */
 .timeline {
     position: relative;
     max-width: 1200px;
     margin: 0 auto;
 }

 .timeline::after {
     content: '';
     position: absolute;
     width: 6px;
     background: linear-gradient(to bottom, var(--primary), var(--accent));
     top: 0;
     bottom: 0;
     left: 50%;
     margin-left: -3px;
     border-radius: 3px;
 }

 .timeline-item {
     padding: 10px 40px;
     position: relative;
     width: 50%;
     box-sizing: border-box;
     opacity: 0;
     transform: translateY(50px);
     transition: all 0.8s ease;
 }

 .timeline-item.visible {
     opacity: 1;
     transform: translateY(0);
 }

 .timeline-item::after {
     content: '';
     position: absolute;
     width: 25px;
     height: 25px;
     background-color: var(--bg-color);
     border: 4px solid var(--primary);
     top: 15px;
     border-radius: 50%;
     z-index: 1;
     transition: transform 0.3s ease;
 }

 .timeline-item:hover::after {
     transform: scale(1.2);
 }

 .left {
     left: 0;
 }

 .right {
     left: 50%;
 }

 .left::after {
     right: -12px;
 }

 .right::after {
     left: -12px;
 }

 .timeline-content {
     padding: 25px 30px;
     background-color: var(--card-bg);
     position: relative;
     border-radius: 15px;
     border: 1px solid var(--border-color);
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
     transition: all 0.3s ease;
 }

 .timeline-link {
     text-decoration: none;
     color: inherit;
     display: block;
 }

 .timeline-link .timeline-content:hover {
     transform: translateY(-5px);
     box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
     border-color: var(--accent);
 }

 .timeline-link .timeline-content::after {
     content: '\f35d';
     /* Font Awesome external link icon */
     font-family: 'Font Awesome 6 Free';
     font-weight: 900;
     position: absolute;
     top: 15px;
     right: 15px;
     color: var(--accent);
     opacity: 0;
     transition: opacity 0.3s ease;
 }

 .timeline-link:hover .timeline-content::after {
     opacity: 1;
 }

 /* Education Card */
 .education-card-link {
     text-decoration: none;
     color: inherit;
     display: block;
 }

 .education-card {
     transition: all 0.3s ease;
 }

 .education-card-link:hover .education-card {
     transform: translateY(-10px);
     box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
     border-color: var(--accent);
 }

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

 .education-skills .badge {
     transition: all 0.3s ease;
 }

 .education-card-link:hover .education-skills .badge {
     background-color: var(--primary) !important;
     color: var(--dark);
 }

 /* Skills Section */
 .skill-bar {
     background-color: var(--border-color);
     border-radius: 10px;
     height: 12px;
     margin-bottom: 30px;
     overflow: hidden;
 }

 .skill-progress {
     height: 100%;
     border-radius: 10px;
     background: linear-gradient(90deg, var(--primary), var(--accent));
     position: relative;
     width: 0;
     transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
 }

 .skill-progress::after {
     content: attr(data-progress);
     position: absolute;
     right: 10px;
     top: -30px;
     font-size: 0.9rem;
     font-weight: 600;
     color: var(--text-color);
     background: var(--card-bg);
     padding: 2px 8px;
     border-radius: 5px;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
     opacity: 0;
     transition: opacity 0.3s ease 1s;
 }

 .skill-progress[style*="width"]:after {
     opacity: 1;
 }


 /* Blog Section */
 .blog-card {
     transition: transform 0.3s ease, box-shadow 0.3s ease;
 }

 .blog-card .card-link {
     text-decoration: none;
     color: inherit;
     display: flex;
     flex-direction: column;
     height: 100%;
 }

 .blog-card .card-img-top {
     border-top-left-radius: 15px;
     border-top-right-radius: 15px;
     height: 220px;
     object-fit: cover;
 }

 .blog-card .card-body {
     flex-grow: 1;
     display: flex;
     flex-direction: column;
 }

 .blog-card .card-text {
     flex-grow: 1;
 }

 /* Contact Section */
 .contact-form .form-control {
     background-color: var(--card-bg);
     border: 1px solid var(--border-color);
     color: var(--text-color);
     padding: 15px 20px;
     margin-bottom: 25px;
     transition: var(--transition);
     border-radius: 10px;
 }

 .contact-form .form-control:focus {
     border-color: var(--primary);
     box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.25);
     background-color: var(--bg-color);
 }

 .contact-info-item {
     display: flex;
     align-items: center;
     margin-bottom: 30px;
 }

 .contact-info-icon {
     width: 60px;
     height: 60px;
     background: linear-gradient(45deg, var(--primary), var(--secondary));
     border-radius: 15px;
     display: flex;
     align-items: center;
     justify-content: center;
     margin-right: 20px;
     flex-shrink: 0;
     transition: var(--transition);
 }

 .contact-info-item:hover .contact-info-icon {
     transform: rotate(15deg) scale(1.1);
 }

 /* Theme Switcher */
 .theme-switch {
     cursor: none;
     width: 60px;
     height: 30px;
     background: var(--border-color);
     border-radius: 15px;
     position: relative;
     margin-left: 15px;
     transition: var(--transition);
 }

 .theme-switch-handle {
     position: absolute;
     top: 3px;
     left: 3px;
     width: 24px;
     height: 24px;
     background: var(--accent);
     border-radius: 50%;
     transition: transform 0.3s ease;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .theme-switch-handle::before {
     content: '\f186';
     /* Moon icon */
     font-family: 'Font Awesome 6 Free';
     font-weight: 900;
     color: var(--bg-color);
     font-size: 14px;
 }

 [data-bs-theme="light"] .theme-switch-handle {
     transform: translateX(30px);
     background: var(--primary);
 }

 [data-bs-theme="light"] .theme-switch-handle::before {
     content: '\f185';
     /* Sun icon */
 }

 /* Footer */
 .footer {
     background: var(--card-bg);
     padding: 40px 0 20px;
     border-top: 1px solid var(--border-color);
 }

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

 .social-icon:hover {
     background: linear-gradient(45deg, var(--primary), var(--secondary));
     color: var(--dark);
     transform: translateY(-8px) scale(1.1);
     border-color: transparent;
 }

 /* Animations */
 [class*="fade-in"] {
     opacity: 0;
     transition: opacity 0.8s ease-out, transform 0.8s ease-out;
 }

 .fade-in.is-visible {
     opacity: 1;
 }

 .fade-in-up {
     transform: translateY(50px);
 }

 .fade-in-up.is-visible {
     transform: translateY(0);
 }

 /* Modal styling */
 .modal-content {
     background-color: var(--card-bg);
     border-radius: 20px;
     border: 1px solid var(--border-color);
 }

 .modal-header {
     border-bottom: 1px solid var(--border-color);
 }

 .modal-footer {
     border-top: 1px solid var(--border-color);
 }

 .btn-close {
     filter: invert(0.6);
 }

 /* Responsive Adjustments */
 @media (max-width: 991.98px) {
     .hero-title {
         font-size: 3.5rem;
     }

     .hero-subtitle {
         font-size: 1.5rem;
     }

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

     .timeline::after {
         left: 31px;
     }

     .timeline-item {
         width: 100%;
         padding-left: 70px;
         padding-right: 25px;
     }

     .timeline-item::after {
         left: 21px;
     }

     .right {
         left: 0;
     }

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

     .hero .d-flex {
         justify-content: center;
     }

     .hero-profile-img {
         margin-top: 40px;
     }
 }

 @media (max-width: 767.98px) {
     .hero-title {
         font-size: 2.8rem;
     }

     .hero-subtitle {
         font-size: 1.3rem;
     }

     .section {
         padding: 80px 0;
     }

     .section-title h2 {
         font-size: 2.2rem;
     }

     .navbar-collapse {
         background: var(--card-bg);
         padding: 20px;
         border-radius: 10px;
         margin-top: 10px;
         box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
     }
 }

 /* iPhone SE Specific & other small screens */
 @media (max-width: 480px) {

     .cursor,
     .cursor-follower {
         display: none;
     }

     body {
         cursor: default;
     }

     .hero-title {
         font-size: 2.4rem;
         line-height: 1.3;
     }

     .hero-subtitle {
         font-size: 1.2rem;
     }

     .hero .d-flex {
         flex-direction: column;
         align-items: center;
     }

     .hero .btn {
         width: 80%;
         margin-bottom: 15px;
     }

     .section {
         padding: 60px 0;
     }

     .section-title h2 {
         font-size: 1.8rem;
     }

     .contact-info-item {
         flex-direction: column;
         align-items: flex-start;
         text-align: left;
     }

     .contact-info-icon {
         margin-right: 0;
         margin-bottom: 15px;
     }
 }