/* Brand-aligned light theme (matching main site palette) */
:root {
    /* Core brand colors */
    --primary: #396bbd;
    /* Main site primary */
    --primary-light: #4d7fd1;
    --primary-dark: #2e5697;
    --secondary: #5A5D71;
    /* existing secondary */
    --accent: #FF6B6B;
    /* retained accent for vibrancy */

    /* Surfaces & backgrounds (light theme) */
    --background: #f5f9ff;
    /* soft tint instead of pure white */
    --surface: #ffffff;
    --surface-light: #eef4ff;

    /* Text colors tuned for light backgrounds */
    --text-primary: #1a2333;
    --text-secondary: #41526c;
    --text-muted: #647890;

    /* Gradients rebuilt around brand blue + accent for eye-catching elements */
    --gradient-1: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-2: linear-gradient(135deg, #ff9f7a 0%, var(--accent) 100%);
    --gradient-3: linear-gradient(135deg, #47b1ff 0%, #74d3ff 100%);
    --gradient-4: linear-gradient(135deg, #3ecf8e 0%, #52e3c2 100%);

    /* Shadows adapted for light UI */
    --shadow-soft: 0 6px 28px rgba(36, 72, 130, 0.18);
    --shadow-glow: 0 0 18px rgba(57, 107, 189, 0.35);

    --border-radius: 16px;
    --border-radius-large: 24px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(160deg, #ffffff 0%, var(--background) 60%, #e6f0ff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #e8f1ff, #dbe9ff, #f0f6ff, #d2e5ff);
    background-size: 400% 400%;
    animation: gradientShift 18s ease infinite;
    z-index: -2;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.15;
    animation: float 26s infinite ease-in-out;
    filter: blur(2px) saturate(120%);
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    background: var(--gradient-2);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 70%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    background: var(--gradient-3);
    border-radius: 50%;
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: var(--gradient-4);
    border-radius: 20% 80% 20% 80% / 20% 20% 80% 80%;
    bottom: 20%;
    left: 15%;
    animation-delay: -15s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    background: var(--gradient-1);
    border-radius: 50%;
    top: 20%;
    right: 30%;
    animation-delay: -7s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
    }

    50% {
        transform: translateY(10px) rotate(180deg);
    }

    75% {
        transform: translateY(-15px) rotate(270deg);
    }
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out;
}

.profile-image {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(57, 107, 189, 0.25);
    background: #ffffff;
    transition: var(--transition-smooth);
    animation: profilePulse 5s ease-in-out infinite;
}

.profile-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary) 0%, var(--primary-light) 40%, var(--accent) 70%, var(--primary) 100%);
    background-clip: border-box;
    -webkit-background-clip: border-box;
    z-index: -1;
    animation: ringRotate 10s linear infinite;
    box-shadow: 0 0 0 6px rgba(57, 107, 189, 0.08);
}

@keyframes profilePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    50% {
        transform: scale(1.01);
        box-shadow: 0 20px 0 50px rgba(102, 126, 234, 0);
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.5));
    }

    to {
        filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.8));
    }
}

.profile-bio {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    animation: fadeIn 1s ease-out 0.3s both;
}

/* Links Section */
.links-section {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.link-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    letter-spacing: .5px;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(57, 107, 189, 0.3);
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Link Cards */
.link-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(57, 107, 189, 0.18);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out forwards;
    box-shadow: 0 4px 12px -2px rgba(36, 72, 130, 0.12);
    opacity: 0;
    transform: translateY(30px);
}

.link-card:nth-child(1) {
    animation-delay: 0.1s;
}

.link-card:nth-child(2) {
    animation-delay: 0.2s;
}

.link-card:nth-child(3) {
    animation-delay: 0.3s;
}

.link-card:nth-child(4) {
    animation-delay: 0.4s;
}

.link-card:nth-child(5) {
    animation-delay: 0.5s;
}

.link-card:nth-child(6) {
    animation-delay: 0.6s;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(57, 107, 189, 0.15), transparent);
    transition: left 0.7s ease;
}

.link-card:hover::before {
    left: 100%;
}

.link-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 28px -4px rgba(36, 72, 130, 0.25), var(--shadow-glow);
    border-color: rgba(57, 107, 189, 0.45);
    background: linear-gradient(135deg, #ffffff, #f1f7ff);
}

.link-card:active {
    transform: translateY(-4px) scale(0.98);
}

.link-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    margin-left: 16px;
    font-size: 1.4rem;
    transition: var(--transition-bounce);
    background: var(--surface-light);
    box-shadow: inset 0 0 0 1px rgba(57, 107, 189, 0.15);
}

.link-card:hover .link-icon {
    transform: rotate(360deg) scale(1.1);
}

.link-content {
    flex: 1;
}

.link-content h4 {
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

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

.link-arrow {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.link-card:hover .link-arrow {
    transform: translateX(-8px);
    color: var(--text-primary);
}

/* Specific link styles */
.link-card.primary .link-icon {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(57, 107, 189, 0.5);
}

.link-card.app-store .link-icon {
    background: var(--gradient-2);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(255, 107, 107, 0.45);
}

.link-card.google-play .link-icon {
    background: var(--gradient-3);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(0, 168, 255, 0.45);
}

.link-card.business .link-icon {
    background: var(--gradient-4);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(62, 207, 142, 0.45);
}

.link-card.social .link-icon {
    background: rgba(57, 107, 189, 0.08);
    color: var(--primary-dark);
}

.link-card.social.twitter:hover .link-icon {
    background: #1DA1F2;
}

.link-card.social.instagram:hover .link-icon {
    background: linear-gradient(45deg, #F56040, #E1306C, #C13584);
}

.link-card.social.linkedin:hover .link-icon {
    background: #0077B5;
}

.link-card.social.email:hover .link-icon {
    background: #EA4335;
}

.link-card.info .link-icon {
    background: rgba(57, 107, 189, 0.08);
    color: var(--primary-dark);
}

.link-card.info:hover .link-icon {
    background: var(--primary);
    color: #fff;
}

/* Address Section */
.address-section {
    margin-top: 40px;
    animation: fadeIn 1s ease-out 0.8s both;
}

.address-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.address-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.address-card:hover::before {
    transform: translateX(100%);
}

.address-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.address-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.address-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.address-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.map-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.map-link:hover::before {
    transform: translateX(100%);
}

.map-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    animation: fadeIn 1s ease-out 1s both;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* Focus states for accessibility */
.link-card:focus-visible {
    outline: 3px solid rgba(57, 107, 189, 0.5);
    outline-offset: 2px;
}

/* Optional: Dark mode (prefers-color-scheme) to keep original dark aesthetics for users on dark preference */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0F1420;
        --surface: #162032;
        --surface-light: #1f2b3d;
        --text-primary: #ffffff;
        --text-secondary: #c2d4ee;
        --text-muted: #9bb1cc;
        --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);
        --shadow-glow: 0 0 20px rgba(57, 107, 189, 0.45);
    }

    body {
        background: linear-gradient(-30deg, #0F1420, #162032 55%, #0F1420);
    }

    .animated-background {
        background: linear-gradient(-45deg, #121d2d, #0f1a29, #1a2b42, #0f1a29);
    }

    .link-card {
        background: linear-gradient(135deg, rgba(26, 40, 61, 0.9), rgba(26, 40, 61, 0.85));
        border-color: rgba(255, 255, 255, 0.08);
    }

    .link-card:hover {
        background: linear-gradient(135deg, rgba(36, 56, 85, 0.95), rgba(30, 48, 74, 0.9));
        border-color: rgba(57, 107, 189, 0.5);
    }
}

.made-with {
    font-size: 0.8rem !important;
}

.made-with i {
    color: #FF6B6B;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 30px 16px;
    }

    .profile-name {
        font-size: 2rem;
    }

    .social-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .link-card {
        padding: 16px;
    }

    .link-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .profile-img {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    .social-stats {
        gap: 20px;
    }

    .link-card {
        padding: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --background: #000000;
        --surface: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shapes {
        display: none;
    }
}