:root {
    --primary-rgb: 255, 128, 82; /* Warm coral in RGB format */
    --primary-color-dark-rgb: 255, 153, 102; /* Warm orange in RGB format */
    --secondary-rgb: 255, 246, 237; /* Warm beige in RGB format */
    --secondary-dark-rgb: 40, 36, 32; /* Dark warm brown in RGB format */
    
    /* Font family variables */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Outfit', sans-serif;
}

/* Font styling */
body {
    font-family: var(--body-font);
    font-weight: 400;
    line-height: 1.7;
}

h1, h2, h3, .section-title, .navbar-brand {
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h4, h5, h6, p, span, div, li, a, button {
    font-family: var(--body-font);
}

/* Typing animation styling */
.typed-element {
    color: var(--primary-color);
    font-weight: 500;
    /* Improve text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.02em;
}

.typed-cursor {
    color: var(--primary-color);
    opacity: 1;
    animation: blink 0.7s infinite;
    font-weight: 400;
    /* Improve cursor rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

html.dark .typed-element,
body.dark .typed-element {
    color: var(--primary-color-dark);
}

html.dark .typed-cursor,
body.dark .typed-cursor {
    color: var(--primary-color-dark);
}

/* Mobile optimizations for typing animation */
@media (max-width: 768px) {
    .typed-element {
        font-weight: 600;
        letter-spacing: 0.03em;
    }
    
    .typed-cursor {
        font-weight: 500;
    }
}

/* light mode */
.light > * {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
}

/* dark mode */
.dark {
    --background-color: var(--background-color-dark) !important;
    --secondary-background-color: var(--secondary-background-color-dark) !important;
    --text-color: var(--text-color-dark) !important;
    --text-secondary-color: var(--text-secondary-color-dark) !important;
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --primary-rgb: var(--primary-color-dark-rgb);
    --secondary-rgb: var(--secondary-dark-rgb);
}

.text-secondary {
    color: var(--text-secondary-color) !important;
}

/* Fix for better text visibility */
.light p, .light h1, .light h2, .light h3, .light h4, .light h5, .light h6, 
.light span, .light div, .light li, .light a, .light label {
    color: var(--text-color) !important;
}

.dark p, .dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6, 
.dark span, .dark div, .dark li, .dark a, .dark label {
    color: var(--text-color) !important;
}

/* Exceptions for specific elements */
.primary-text, .text-primary, 
h1.text-primary, h2.text-primary, h3.text-primary, 
h4.text-primary, h5.text-primary, h6.text-primary,
.navbar-brand, .btn, .skill-icon i,
.icon, .nav-link:hover, .dropdown-item:hover {
    color: var(--primary-color) !important;
}

.btn-primary, .btn-info {
    color: white !important;
}

/* Theme toggle styling */
#theme-toggle:focus {
    outline: 0;
}

#theme-toggle svg {
    height: 18px;
}

button#theme-toggle {
    border: none;
    font-size: 26px;
    margin: auto 4px;
    background: transparent;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

button#theme-toggle:hover {
    transform: rotate(30deg);
}

body.dark #moon {
    vertical-align: middle;
    display: none;
}

body:not(.dark) #sun {
    display: none;
}

body *::selection {
    color: var(--background-color) !important;
    background-color: var(--primary-color) !important;
}

/* Consistent link animations */
a {
    text-decoration: none;
    color: var(--text-color) !important;
    position: relative;
    display: inline-block;
    font-weight: 600;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

a:link, a:visited {
    text-decoration: none;
    font-weight: 600;
}

a:hover, a:active {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color) !important;
}

/* Exclude specific elements from the animation */
a:not(.btn, .navbar-brand, .nav-link, .dropdown-item, [class*="social"], .card-link, .logo):after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

a:not(.btn, .navbar-brand, .nav-link, .dropdown-item, [class*="social"], .card-link, .logo):hover:after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Custom nav link hover effect */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Card styles */
.card {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    overflow: hidden;
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.15);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
      rgba(var(--primary-rgb), 0.2) 0%, 
      rgba(var(--primary-rgb), 0) 60%);
    transition: all 0.6s ease;
    z-index: 0;
}

.card:hover::before {
    top: 0;
    left: 0;
}

/* Custom Cursor - Unified across all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

body {
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-color) !important;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

.cursor-dot,
.cursor-dot-outline {
    pointer-events: none;
    position: fixed;
    z-index: 9999;
    border-radius: 50%;
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.9);
}

.cursor-dot-outline {
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.2);
}

/* Improve cursor visibility in light mode */
body:not(.dark) .cursor-dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1); /* Add border for light mode visibility */
}

body:not(.dark) .cursor-dot-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.4);
}

/* Dark mode cursor */
body.dark .cursor-dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.9);
}

body.dark .cursor-dot-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.4);
}

/* Cursor hover effects */
.clickable .cursor-dot,
a:hover ~ .cursor-dot,
button:hover ~ .cursor-dot,
input:hover ~ .cursor-dot,
textarea:hover ~ .cursor-dot,
select:hover ~ .cursor-dot,
.card:hover ~ .cursor-dot {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: var(--primary-color);
    opacity: 1;
}

.clickable .cursor-dot-outline,
a:hover ~ .cursor-dot-outline,
button:hover ~ .cursor-dot-outline,
input:hover ~ .cursor-dot-outline,
textarea:hover ~ .cursor-dot-outline,
select:hover ~ .cursor-dot-outline,
.card:hover ~ .cursor-dot-outline {
    transform: translate(-50%, -50%) scale(1.2);
    width: 40px;
    height: 40px;
    opacity: 0.8;
}

@media (max-width: 767px) {
    * {
        cursor: auto !important;
    }
    
    .cursor-dot,
    .cursor-dot-outline {
        display: none !important;
    }
}

/* Add styles for exercise page buttons */
.exercise-section .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.exercise-section .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.exercise-section .card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.exercise-section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(var(--primary-rgb), 0.15);
}

