/* Base styles and variables */
:root {
    --primary: #06b6d4;            /* cyan-500 */
    --primary-dark: #0891b2;       /* cyan-600 */
    --color-primary: #06b6d4;      /* main accent */
    --color-secondary: #0ea5a5;    /* teal tone */
    --color-success: #10b981;      /* emerald-500 */
    --color-background: #0b1220;   /* deep navy */
    --color-card: #0f172a;         /* slate-900 */
    --color-text: #ecfeff;         /* cyan-50 */
    --color-text-secondary: #7dd3fc;/* cyan-300 */
    --color-border: #164e63;       /* cyan-900 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.dark {
    --color-primary: #22d3ee;       /* cyan-400 brighter */
    --color-secondary: #14b8a6;     /* teal-500 */
    --color-success: #34d399;       /* emerald-400 */
    --color-background: #06101c;    /* darker navy */
    --color-card: #0b1626;          /* dark card */
    --color-text: #e6fbff;          /* near-white cyan tint */
    --color-text-secondary: #a5f3fc;/* cyan-200 */
    --color-border: #155e75;        /* cyan-800 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    transition: background-color 0.3s, color 0.3s;
}

/* Hero gradient background */
.hero-gradient {
    background: radial-gradient(1200px 600px at 10% 10%, rgba(79,70,229,0.18), transparent 60%),
                radial-gradient(1000px 500px at 90% 20%, rgba(2,132,199,0.16), transparent 60%),
                linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.08) 100%);
}

/* CTA button subtle glow */
.btn-primary {
    box-shadow: 0 4px 16px rgba(79,70,229,0.16);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79,70,229,0.24);
}

/* Active nav state */
.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    margin: 0 auto;
    width: 20px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

.nav-link.active {
    text-decoration: underline;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Buttons */
.navbar-glass {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-radius: 999px;
    padding: 0.5rem 1rem;
}
.dark .navbar-glass {
    background: rgba(2, 6, 23, 0.55);
    border-color: rgba(148, 163, 184, 0.25);
}

/* Pill nav links */
.nav-link {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-link:hover {
    background: rgba(79, 70, 229, 0.12);
    color: var(--color-primary);
}
.dark .nav-link:hover {
    background: rgba(129, 140, 248, 0.18);
}
.nav-link.active {
    background: var(--color-primary);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}
.nav-link.active::after {
    display: none;
}
.btn-group {
    display: flex;
    gap: 12px;
    row-gap: 12px;
    column-gap: 12px;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.8rem 1.6rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 1rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    min-height: 44px;
    border: 1px solid rgba(15,23,42,0.08);
}
.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
/* Icon inside primary button */
.btn-primary i {
    color: var(--accent);
    transition: transform 0.2s ease, color 0.2s ease;
}
.btn-primary:hover i {
    transform: translateX(4px);
}

/* Focus states for accessibility */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.nav-link:focus-visible,
.mobile-nav-link:focus-visible,
.social-link:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.35);
    border-radius: 8px;
}

/* Cards */
.skill-card, .project-card {
    background-color: var(--color-card);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

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

/* Tech tag badges used in projects */
.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 999px;
    background-color: rgba(79,70,229,0.1);
    color: var(--color-primary);
    border: 1px solid rgba(79,70,229,0.2);
}

/* Form styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background-color: var(--color-card);
    color: var(--color-text);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

@media (max-width: 640px) {
    .btn-group {
        flex-direction: column;
    }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text);
}

/* Profile image enhancements */
.profile-img {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
}

.profile-img:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 16px 40px 0 rgba(31, 38, 135, 0.22);
}

/* Map legacy Tailwind blue utilities to the new cyan theme */
.text-blue-600 { color: var(--color-primary) !important; }
.text-blue-700 { color: var(--color-primary) !important; }
.dark .text-blue-400 { color: var(--color-primary) !important; }
.bg-blue-600 { background-color: var(--color-primary) !important; }
.hover\:bg-blue-700:hover { background-color: var(--primary-dark) !important; }
.hover\:text-blue-700:hover, .hover\:text-blue-800:hover { color: var(--primary-dark) !important; }
.hover\:bg-blue-50:hover { background-color: rgba(6, 182, 212, 0.08) !important; }
.text-blue-500 { color: var(--color-primary) !important; }
.border-blue-600 { border-color: var(--color-primary) !important; }