* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
}

[data-theme="dark"] .bg-blur {
    filter: blur(15px) brightness(0.4);
    opacity: 0.7;
}

[data-theme="dark"] main {
    background-color: rgba(22, 33, 62, 0.95) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

[data-theme="dark"] .skill-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .stat-box {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: var(--text-primary) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

[data-theme="dark"] .skill-card:hover,
[data-theme="dark"] .project-card:hover {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-500 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] p,
[data-theme="dark"] h4,
[data-theme="dark"] span:not(.tooltip):not([class*="bg-"]) {
    color: var(--text-primary) !important;
}

[data-theme="dark"] footer {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
    border-color: rgba(99, 102, 241, 0.6);
    background-color: rgba(30, 41, 59, 0.9);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-secondary);
}

[data-theme="dark"] .tooltip {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .icon-container .tooltip::after {
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent !important;
}

[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .bg-white {
    background-color: rgba(30, 41, 59, 0.3) !important;
}

[data-theme="dark"] .bg-opacity-15,
[data-theme="dark"] .bg-opacity-30 {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

[data-theme="dark"] .tech-icon {
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.3));
}

[data-theme="dark"] .tech-icon:hover {
    filter: drop-shadow(0 8px 20px rgba(99, 102, 241, 0.5));
}

[data-theme="dark"] .badge {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .badge:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .text-blue-600 {
    color: #60a5fa !important;
}

[data-theme="dark"] .text-pink-600 {
    color: #f472b6 !important;
}

[data-theme="dark"] .text-green-600 {
    color: #4ade80 !important;
}

[data-theme="dark"] .text-yellow-500 {
    color: #fbbf24 !important;
}

[data-theme="dark"] .text-blue-500 {
    color: #60a5fa !important;
}

[data-theme="dark"] .text-pink-500 {
    color: #f472b6 !important;
}

[data-theme="dark"] .bg-gray-200 {
    background-color: rgba(71, 85, 105, 0.8) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .border-gray-300 {
    border-color: rgba(99, 102, 241, 0.2) !important;
}

.profile-ring {
    position: relative;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #ec4899, #8b5cf6);
    animation: rotate 3s linear infinite;
    display: inline-block;
}

.profile-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #ec4899, #8b5cf6);
    filter: blur(10px);
    opacity: 0.5;
    z-index: -1;
}

.profile-img {
    display: block;
    border: 3px solid white;
    transition: transform 0.4s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.icon-container {
    position: relative;
    display: inline-block;
}

.icon-container .tooltip {
    visibility: hidden;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 0;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.icon-container .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.icon-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.badge {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge:hover {
    transform: scale(1.2) rotate(-5deg);
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.bg-blur {
    background: url(../../img/bg.gif) no-repeat center center fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(15px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.skill-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.4);
}

.social-link {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #ec4899);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.social-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.social-link:hover {
    filter: brightness(1.3) drop-shadow(0 5px 15px rgba(59, 130, 246, 0.4));
}

.tech-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tech-icon:hover {
    transform: scale(1.2) translateY(-5px) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

@media (max-width: 768px) {
    .icon-container .tooltip {
        width: 100px;
        margin-left: -50px;
        font-size: 0.65rem;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.project-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
}

.blog-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateX(5px);
}

.stat-box {
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.05);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
