/* ========================================
   Global Styles & Reset
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #8b5cf6;
    --primary-pink: #ec4899;
    --primary-cyan: #14b8a6;
    --primary-blue: #3b82f6;
    --dark: #1a1a1a;
    --gray-dark: #4a4a4a;
    --gray-mid: #6b6b6b;
    --gray-light: #e5e5e5;
    --off-white: #fafafa;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-pink) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
    /* Dark mode variables */
    --bg-body: #fafafa;
    --bg-section: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --border-color: #e5e5e5;
    --navbar-bg: rgba(250, 250, 250, 0.95);
}

/* ========================================
   Dark Mode Variables
======================================== */
body.dark-mode {
    --bg-body: #0f0f0f;
    --bg-section: #1a1a1a;
    --bg-card: #242424;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --border-color: #333333;
    --navbar-bg: rgba(15, 15, 15, 0.95);
    --off-white: #1a1a1a;
    --white: #242424;
    --dark: #f0f0f0;
    --gray-mid: #a0a0a0;
    --gray-light: #333333;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-body);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* ========================================
   Navigation with Mobile Menu
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Navbar right controls */
.navbar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    z-index: 1001;
    text-transform: uppercase;
}

.logo-dot {
    color: var(--primary-pink);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========================================
   Dark Mode Pill Toggle Switch
   Matches the reference image:
   Light → light-gray track, white thumb left
   Dark  → charcoal track,   light thumb right
======================================== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}

.theme-toggle input[type="checkbox"] {
    display: none;
}

.toggle-track {
    position: relative;
    width: 56px;
    height: 28px;
    background: #d1d5db;
    border-radius: 28px;
    transition: background 0.35s ease;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.35s ease;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Checked state — dark mode active */
.theme-toggle input:checked ~ .toggle-track {
    background: #374151;
}

.theme-toggle input:checked ~ .toggle-track .toggle-thumb {
    transform: translateX(28px);
    background: #d1d5db;
}

.toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 2.2rem;
    transition: color 0.3s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--dark);
}

.btn-outline:hover {
    background: var(--dark);
    color: var(--white);
}

/* ========================================
   Hero Section (Home Page)
======================================== */
.hero-content {
    width: 100%;
    margin-left: 0;
    min-width: 0; /* prevent grid blowout */
}


.hero {
    min-height: 100vh;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    border-radius: 0 0 0 50%;
    z-index: 0;
}

.hero-gradient-orb {
    position: absolute;
    top: 20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-mid);
    margin-bottom: 2.5rem;
    max-width: 650px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    text-align: justify;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.stat-item h3 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--gray-mid);
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 40%;
    right: 10%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: 20%;
    animation-delay: 2s;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-card h4 {
    font-size: 1rem;
    color: var(--dark);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* ========================================
   Services Section
======================================== */
.services {
    padding: 6rem 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--gray-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.service-number {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.service-icon {
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.service-card p {
    color: var(--gray-mid);
    line-height: 1.8;
}

/* ========================================
   CTA Section
======================================== */
.cta-section {
    padding: 6rem 0;
    background: var(--gradient-primary);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-content .btn-primary {
    background: var(--white);
    color: var(--primary-purple);
}

.cta-content .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

/* ========================================
   Page Hero (About, Projects, Contact)
======================================== */
.page-hero {
    padding: 10rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
}

.page-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--white);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--gray-mid);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   About Section
======================================== */
.about-section {
    padding: 7rem 0 5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    align-items: start;
}

.about-image-wrapper {
    position: sticky;
    top: 120px;
}

.about-image {
    border-radius: 20px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 220px;
    display: block;
    border-radius: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-box h3 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-box p {
    color: var(--gray-mid);
    font-size: 0.9rem;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text {
    margin-right: 0;
}

.about-text p {
    color: var(--gray-mid);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ========================================
   Certifications Section
======================================== */
.certifications-section {
    padding: 6rem 0;
    background: var(--white);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.certificate-card {
    background: var(--off-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.certificate-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.certificate-content {
    padding: 1.5rem;
}

.certificate-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.certificate-content p {
    color: var(--gray-mid);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* ========================================
   Audio Introduction Section
======================================== */
.audio-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    text-align: center;
}

.audio-wrapper {
    margin-top: 2rem;
}

.audio-wrapper audio {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
}


/* ========================================
   Skills Section
======================================== */
.skills-section {
    padding: 6rem 0;
    background: var(--white);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.skill-category {
    background: var(--off-white);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--primary-purple);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-icon {
    color: var(--primary-purple);
}

.skill-header h3 {
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--dark);
}

.skill-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* ========================================
   Timeline Section
======================================== */
.timeline-section {
    padding: 6rem 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -38px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-purple);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--gray-mid);
    line-height: 1.8;
}

/* ========================================
   Projects Showcase (Full)
======================================== */
.projects-showcase {
    padding: 4rem 0 6rem;
}

.projects-grid-full {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.project-card-full {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3rem;
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.project-card-full:nth-child(even) {
    grid-template-columns: 1.2fr 0.8fr;
}

.project-card-full:nth-child(even) .project-visual {
    order: 2;
}

.project-card-full:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-visual {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #ddd;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit:cover;
    cursor: pointer;
}

.project-img:hover{
    transition: 0.4s ease;
    transform: scale(1.1);
}

.project-details {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--gray-mid);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.tech-tag {
    padding: 0.5rem 1.2rem;
    background: var(--off-white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.btn-project {
    flex: 1;
    text-align: center;
    padding: 0.9rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-project-outline {
    flex: 1;
    text-align: center;
    padding: 0.9rem 1.5rem;
    background: transparent;
    color: var(--dark);
    border: 2px solid var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-project-outline:hover {
    background: var(--dark);
    color: var(--white);
}

/* ========================================
   Contact Section
======================================== */
.contact-main {
    padding: 4rem 0 6rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.info-content a {
    color: var(--gray-mid);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-content a:hover {
    color: var(--primary-purple);
}

.info-content p {
    color: var(--gray-mid);
    margin: 0;
}

.social-connect {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.social-connect h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: var(--off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-5px);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: var(--shadow-md);
}

.contact-form-wrapper h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-form-wrapper > p {
    color: var(--gray-mid);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--off-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    margin-top: 1rem;
    cursor: pointer;
}

/* ========================================
   Footer
======================================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-purple);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-purple);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Skills Table
======================================== */
.skills-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
}

.skills-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.skills-table thead {
    background: var(--gradient-primary);
    color: var(--white);
}

.skills-table th {
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-weight: 700;
}

.skills-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.skills-table tbody tr:hover {
    background: var(--off-white);
}

.skills-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .about-image-wrapper {
        position: static;
    }

    .project-card-full {
        grid-template-columns: 1fr !important;
    }

    .project-card-full:nth-child(even) .project-visual {
        order: 0;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .about-text {
        margin-right: 0;
    }

    .about-image {
        margin-left: 0;
        justify-content: center;
    }

    .about-image img {
        width: 180px;
    }
}

@media (max-width: 768px) {
    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }

    .toggle-label {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-body);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.25rem;
    }

    /* Typography */
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* About section — single column */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-section {
        padding: 5.5rem 0 3rem;
    }

    .about-image img {
        width: 150px;
    }

    /* Stat boxes — always stay in a 3-column row */
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .stat-box {
        padding: 0.9rem 0.4rem;
    }

    .stat-box h3 {
        font-size: 1.4rem;
    }

    .stat-box p {
        font-size: 0.72rem;
    }

    /* Buttons */
    .cta-buttons,
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .project-actions {
        flex-direction: column;
    }

    /* Grid adjustments */
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-grid,
    .skills-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Timeline */
    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-dot {
        left: -20px;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 2rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .navbar {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .service-card,
    .skill-category {
        padding: 1.5rem;
    }

    .project-details {
        padding: 1.5rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem 1rem;
    }

    /* Keep stats as 3 columns even on very small screens */
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .stat-box {
        padding: 0.75rem 0.25rem;
    }

    .stat-box h3 {
        font-size: 1.2rem;
    }

    .stat-box p {
        font-size: 0.65rem;
    }

    .about-image img {
        width: 130px;
    }

    .about-section {
        padding: 5rem 0 2.5rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .stat-item h3 {
        font-size: 1.8rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .page-hero {
        padding: 7rem 0 2.5rem;
    }
}

/* ========================================
   Back To Top Button
======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6);
}

/* ========================================
   Form Validation Styles
======================================== */
.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.form-group input.success,
.form-group textarea.success {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.field-error i {
    font-size: 0.75rem;
}

.form-success-msg {
    display: none;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(20, 184, 166, 0.1));
    border: 1px solid #22c55e;
    border-radius: 12px;
    color: #16a34a;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.form-success-msg.show {
    display: flex;
}

/* Dark mode for form inputs */
body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #f0f0f0;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #777;
}

body.dark-mode .form-group label {
    color: #e0e0e0;
}

body.dark-mode .contact-form-wrapper {
    background: #1e1e1e;
}

body.dark-mode .social-connect {
    background: #1e1e1e;
}

body.dark-mode .info-card {
    background: #1e1e1e;
}

body.dark-mode .service-card {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .service-card h3 {
    color: #f0f0f0;
}

body.dark-mode .skill-category {
    background: #1e1e1e;
}

body.dark-mode .timeline-content {
    background: #1e1e1e;
}

body.dark-mode .stat-box {
    background: #1e1e1e;
}

body.dark-mode .floating-card {
    background: #1e1e1e;
}

body.dark-mode .floating-card h4 {
    color: #f0f0f0;
}

body.dark-mode .skills-table {
    background: #1e1e1e;
}

body.dark-mode .skills-table td {
    color: #e0e0e0;
    border-bottom-color: #333;
}

body.dark-mode .skills-table tbody tr:hover {
    background: #2a2a2a;
}

body.dark-mode .page-hero {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

body.dark-mode .page-tag {
    background: #2a2a2a;
    color: var(--primary-purple);
}

body.dark-mode .services {
    background: #1a1a1a;
}

body.dark-mode .audio-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

body.dark-mode .nav-menu {
    background: #111;
}

body.dark-mode .project-card-full {
    background: #1e1e1e;
}

body.dark-mode .btn-outline {
    color: #f0f0f0;
    border-color: #f0f0f0;
}

body.dark-mode .btn-outline:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

body.dark-mode .social-icon {
    background: #2a2a2a;
    color: #f0f0f0;
}

body.dark-mode .section-title {
    color: #f0f0f0;
}

body.dark-mode .hero-title {
    color: #f0f0f0;
}

body.dark-mode .about-text h2 {
    color: #f0f0f0;
}

body.dark-mode .page-title {
    color: #f0f0f0;
}

body.dark-mode .contact-form-wrapper h2,
body.dark-mode .contact-form-wrapper > p {
    color: #e0e0e0;
}

body.dark-mode .skills-section {
    background: #141414;
}

body.dark-mode .info-content h4 {
    color: #e0e0e0;
}


/* ========================================
   Footer Dark Mode Fix
   Footer stays deeply dark in dark mode so
   all text, links, and icons remain readable
======================================== */
body.dark-mode .footer {
    background: #09090b;
    border-top: 1px solid #1c1c24;
}

body.dark-mode .footer-col h3,
body.dark-mode .footer-col h4 {
    color: #f3f4f6;
}

body.dark-mode .footer-col p {
    color: rgba(209, 213, 219, 0.75);
}

body.dark-mode .footer-col ul li a {
    color: rgba(209, 213, 219, 0.65);
}

body.dark-mode .footer-col ul li a:hover {
    color: #a78bfa;
}

body.dark-mode .social-link {
    background: rgba(255, 255, 255, 0.07);
    color: #d1d5db;
}

body.dark-mode .social-link:hover {
    background: #7c3aed;
    color: #ffffff;
}

body.dark-mode .footer-bottom {
    color: rgba(156, 163, 175, 0.5);
    border-top-color: rgba(255, 255, 255, 0.05);
}

@media (max-width: 400px) {
    .toggle-label { display: none; }
}
