@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0e27;
    --bg-dark-secondary: #151933;
    --card-bg: #1a1a1a;
    --bg-light: #f8f9fe;
    --bg-light-secondary: #ffffff;
    --text-dark: #e2e8f0;
    --text-dark-secondary: #94a3b8;
    --text-light: #1e293b;
    --text-light-secondary: #64748b;
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.light-mode {
    background: var(--bg-light);
    color: var(--text-light);
}

body.light-mode::before {
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 12px 48px rgba(139, 92, 246, 0.3);
}

body.light-mode .theme-toggle {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
}

/* Logo */
.logo {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 2px solid rgba(139, 92, 246, 0.2);
}

body.light-mode .logo {
    background: rgba(248, 249, 254, 0.9);
    border-color: rgba(139, 92, 246, 0.15);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.3));
    letter-spacing: -0.5px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo:hover .logo-text {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.5));
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 0 10rem;
    position: relative;
    margin-bottom: 4rem;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-area {
    margin-bottom: 3rem;
    position: relative;
}

.profile-wrapper {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.profile-bg {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    background: var(--gradient-hero);
    border-radius: 50%;
    animation: rotateGradient 8s linear infinite;
    filter: blur(8px);
    opacity: 0.7;
}

@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-image {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.4), inset 0 0 20px rgba(139, 92, 246, 0.1);
    transition: all 0.4s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 80px rgba(139, 92, 246, 0.5), inset 0 0 30px rgba(139, 92, 246, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.light-mode .profile-image {
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2), inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dark-secondary);
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

body.light-mode .hero-subtitle {
    color: var(--text-light-secondary);
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark-secondary);
    font-weight: 400;
}

body.light-mode .hero-description {
    color: var(--text-light-secondary);
}

.contact-info {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(20px);
    padding: 14px 28px;
    border-radius: 50px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    color: inherit;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.contact-info:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}

body.light-mode .contact-info {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.15);
}

body.light-mode .contact-info:hover {
    background: rgba(139, 92, 246, 0.12);
}

/* === Container === */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Button Base === */
.social-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-dark-secondary);
    color: var(--text-dark);
    z-index: 0;
}

/* === Content always on top === */
.social-link>* {
    position: relative;
    z-index: 3;
}

/* === Animated Border === */
.social-link::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    z-index: 0;
    animation: rotateBorder 2.5s linear infinite;
}

/* === Inner Background === */
.social-link::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: var(--bg-dark-secondary);
    z-index: 1;
}

/* ================= INSTAGRAM ================= */
.social-link[data-platform="instagram"] {
    border: 1px solid #832f9c;
}

.social-link[data-platform="instagram"]::before {
    background: conic-gradient(#8528db, #db22bc, #d42d17, #b6962f, #8a2be2);
}

.social-link[data-platform="instagram"]:hover {
    background: #8a2be2;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3);
}

/* ================= LINKEDIN ================= */
.social-link[data-platform="linkedin"] {
    border: 1px solid rgb(0, 118, 181);
}

.social-link[data-platform="linkedin"]::before {
    background: conic-gradient(#0077b5, #00a0dc, #0094d4, #0077b5);
}

.social-link[data-platform="linkedin"]:hover {
    background: #0077b5;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3);
}

/* ================= GITHUB ================= */
.social-link[data-platform="github"] {
    border: 1px solid rgb(87, 87, 87);
}

.social-link[data-platform="github"]::before {
    background: conic-gradient(#838383, #3d3d3d, #bbb1b1, #3d3d3d, #838383);
}

.social-link[data-platform="github"]:hover {
    background: #353535;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.3);
}

/* === Hover Lift === */
.social-link:hover {
    transform: translateY(-2px);
}

/* === Light Mode === */
body.light-mode .social-link {
    background: var(--bg-light-secondary);
    color: var(--text-light);
}

body.light-mode .social-link::after {
    background: var(--bg-light-secondary);
}

/* === Animation === */
@keyframes rotateBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Projects Section */
.projects-section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1.5px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-dark-secondary);
    max-width: 600px;
    margin: 0 auto;
}

body.light-mode .section-subtitle {
    color: var(--text-light-secondary);
}

.projects-wrapper {
    position: relative;
}

.projects-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.projects-container::-webkit-scrollbar {
    height: 10px;
}

.projects-container::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
}

.projects-container::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

.projects-container::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    min-width: 400px;
    max-width: 400px;
    scroll-snap-align: start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 32px 64px rgba(139, 92, 246, 0.25);
}

body.light-mode .project-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(139, 92, 246, 0.12);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.08);
}

body.light-mode .project-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 32px 64px rgba(139, 92, 246, 0.15);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    transition: all 0.4s ease;
}

.project-card:hover .project-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}

.project-title-group h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

body.light-mode .project-title-group h3 {
    color: var(--text-light);
}

.project-category {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
}

.project-description {
    color: var(--text-dark-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

body.light-mode .project-description {
    color: var(--text-light-secondary);
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.project-link:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5);
    background: var(--gradient-secondary);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.project-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.project-status.developing {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.project-status.developing::before {
    background: #f59e0b;
}

body.light-mode .project-status {
    background: rgba(34, 197, 94, 0.1);
}

body.light-mode .project-status.developing {
    background: rgba(245, 158, 11, 0.1);
}

/* Navigation Controls */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(139, 92, 246, 0.2);
    color: var(--text-dark);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.nav-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

body.light-mode .nav-btn {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-light);
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0 3rem;
    margin-top: 6rem;
    border-top: 2px solid rgba(139, 92, 246, 0.1);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: var(--gradient-hero);
}

footer p {
    color: var(--text-dark-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

body.light-mode footer {
    border-top-color: rgba(139, 92, 246, 0.15);
}

body.light-mode footer p {
    color: var(--text-light-secondary);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 48px rgba(139, 92, 246, 0.6);
    background: var(--gradient-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .logo, .theme-toggle { top: 1.5rem; }
    .logo { left: 1.5rem; }
    .theme-toggle { right: 1.5rem; width: 50px; height: 50px; }
    .logo-text { font-size: 1.25rem; }
    .hero-section { padding: 6rem 0 3rem; }
    .profile-wrapper, .profile-image { width: 220px; height: 220px; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .hero-description { font-size: 1rem; }
    .section-title { font-size: 2.5rem; }
    .project-card { min-width: 320px; max-width: 320px; padding: 2rem; }
    .scroll-to-top { bottom: 1.5rem; right: 1.5rem; width: 50px; height: 50px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .social-link { padding: 12px 24px; font-size: 0.875rem; }
}