:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;

    --dark: #0f172a;
    --darker: #020617;
    --card-bg: #1e293b;
    --card-border: rgba(148, 163, 184, 0.1);

    --light: #f1f5f9;
    --white: #ffffff;
    --gray: #94a3b8;
    --gray-light: #cbd5e1;
    --gray-dark: #64748b;

    --success: #10b981;
    --warning: #f59e0b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --transition: 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition);
}

nav.scrolled {
    padding: 0.75rem 2rem;
    background: rgba(2, 6, 23, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-light);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
    border-radius: 1px;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light);
    z-index: 1001;
}


/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}


/* ============================================
   SECTION STYLES
   ============================================ */
section {
    padding: 6rem 2rem;
    position: relative;
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

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

.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.section-desc {
    color: var(--gray);
    max-width: 550px;
    margin: 0 auto;
    font-size: 0.95rem;
}


/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 6rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.05) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    width: 100%;
    padding: 0 0.5rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.hero-subtitle strong {
    color: inherit;
}

.hero-title {
    font-size: clamp(2.75rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1rem 0.5rem;
}

.stat {
    text-align: center;
    padding: 0 1.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--card-border);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--card-border);
    color: var(--gray);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}


/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
    background: var(--dark);
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--card-border), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.about-content p {
    color: var(--gray);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.about-content strong {
    color: var(--gray-light);
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2rem;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.highlight:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}

.highlight i {
    font-size: 1.25rem;
    color: var(--primary-light);
}

.highlight span {
    font-weight: 500;
    font-size: 0.9rem;
}

.about-image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--card-border);
}

.about-image-wrapper::before {
    display: none;
}

.about-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
}

.about-image {
    overflow: hidden;
    min-width: 0;
}


/* ============================================
   EXPERIENCE
   ============================================ */
#experience {
    background: var(--darker);
}

.exp-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.exp-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    transition: var(--transition);
    position: relative;
    border-left: 3px solid var(--primary);
}

.exp-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    border-left-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.exp-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.exp-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
}

.exp-company-info {
    flex: 1;
}

.exp-company-info h3 {
    font-size: 1.15rem;
    color: var(--white);
    margin-bottom: 0.2rem;
    word-break: break-word;
}

.exp-company-info h4 {
    color: var(--gray);
    font-weight: 400;
    font-size: 0.9rem;
}

.exp-date {
    flex-shrink: 0;
    padding: 0.2rem 0.7rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 500;
    white-space: nowrap;
}

.exp-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1.5rem;
}

.exp-list li {
    position: relative;
    padding-left: 1rem;
    color: var(--gray);
    font-size: 0.82rem;
    line-height: 1.5;
}

.exp-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
}


/* ============================================
   PROJECTS SECTION
   ============================================ */
#projects {
    background: var(--dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.project-icon-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    overflow: hidden;
}

.project-icon-placeholder .icon-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity var(--transition);
}

.project-card:hover .project-icon-placeholder .icon-bg {
    opacity: 1;
}

.project-icon-placeholder .icon-bg i {
    font-size: 2.75rem;
    color: rgba(255, 255, 255, 0.9);
    transition: transform var(--transition);
}

.project-card:hover .project-icon-placeholder .icon-bg i {
    transform: scale(1.1);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--dark);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--white);
    word-break: break-word;
}

.project-info p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.project-tech span {
    padding: 0.2rem 0.65rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    color: var(--primary-light);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-links a {
    color: var(--gray);
    transition: var(--transition);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.project-links a:hover {
    color: var(--primary-light);
}


/* ============================================
   REPOSITORIES SECTION
   ============================================ */
#repositories {
    background: var(--darker);
}

.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: 1rem;
}

.repo-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.repo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.repo-card:hover::before {
    opacity: 1;
}

.repo-card:hover {
    transform: translateX(4px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-md);
}

.repo-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    color: var(--primary-light);
    transition: var(--transition);
}

.repo-card:hover .repo-icon {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.repo-content {
    flex: 1;
    min-width: 0;
}

.repo-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--light);
    word-break: break-word;
    overflow-wrap: break-word;
}

.repo-card:hover .repo-content h3 {
    color: var(--primary-light);
}

.repo-content p {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.repo-tags span {
    padding: 0.15rem 0.5rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 5px;
    font-size: 0.65rem;
    color: var(--gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.repo-card:hover .repo-tags span {
    color: var(--primary-light);
    border-color: rgba(99, 102, 241, 0.2);
}

.repo-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-dark);
    font-size: 0.8rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-8px);
}

.repo-card:hover .repo-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-light);
}


/* ============================================
   SKILLS SECTION
   ============================================ */
#skills {
    background: var(--dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}

.skill-category:hover {
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    color: var(--primary-light);
    margin-bottom: 1.25rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tag {
    padding: 0.35rem 0.75rem;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--gray);
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    color: var(--primary-light);
}


/* ============================================
   COMPETITIVE PROGRAMMING
   ============================================ */
.cp-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.25rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: var(--transition);
    min-width: 140px;
}

.cp-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.cp-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cp-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.cp-name {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}


/* ============================================
   EDUCATION SECTION
   ============================================ */
#education {
    background: var(--darker);
}

.education-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.edu-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.edu-logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
}

.edu-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--white);
    word-break: break-word;
}

.edu-info h4 {
    color: var(--gray);
    font-weight: 400;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.edu-info .date {
    color: var(--primary-light);
    font-size: 0.8rem;
}


/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
    background: var(--dark);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: rgba(148, 163, 184, 0.04);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 0;
}

.contact-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.contact-link:hover {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.06);
}

.contact-link i {
    font-size: 1.1rem;
    color: var(--primary-light);
    width: 20px;
    text-align: center;
}

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--light);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
}

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


/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--darker);
    padding: 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--card-border);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-text {
    color: var(--gray-dark);
    font-size: 0.85rem;
}

.footer-text a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-text a:hover {
    color: var(--white);
}


/* ============================================
   ANIMATIONS
   ============================================ */
/* No animations — clean professional look */


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .exp-list {
        grid-template-columns: 1fr;
    }

    .exp-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .exp-date {
        margin-left: auto;
    }

    .repos-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: transform var(--transition);
        border-left: 1px solid var(--card-border);
        z-index: 1000;
        transform: translateX(100%);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: block;
    }

    section {
        padding: 3.5rem 1rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

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

    .section-desc {
        font-size: 0.85rem;
    }

    /* Hero mobile */
    .hero {
        padding: 6rem 1.25rem 3rem;
        min-height: auto;
    }

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

    .hero-desc {
        font-size: 0.9rem;
        margin-bottom: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding: 0.75rem;
    }

    .stat {
        padding: 0.75rem 0.5rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-divider {
        display: none;
    }

    /* About mobile */
    .about-content h3 {
        font-size: 1.2rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .highlight {
        padding: 0.7rem 0.875rem;
    }

    /* Experience mobile */
    .exp-card {
        padding: 1.25rem;
    }

    .exp-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .exp-logo {
        width: 40px;
        height: 40px;
    }

    .exp-company-info h3 {
        font-size: 1rem;
    }

    .exp-company-info h4 {
        font-size: 0.82rem;
    }

    .exp-date {
        align-self: flex-start;
    }

    .exp-list li {
        font-size: 0.78rem;
    }

    /* Projects mobile */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-info {
        padding: 1.25rem;
    }

    .project-info h3 {
        font-size: 1rem;
    }

    /* Repos mobile */
    .repo-card {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
        gap: 0.875rem;
    }

    .repo-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .repo-content h3 {
        font-size: 0.85rem;
    }

    .repo-content p {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .repo-tags span {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }

    .repo-arrow {
        display: none;
    }

    .repo-card::before {
        width: 3px;
        height: 100%;
    }

    /* Skills mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category {
        padding: 1.25rem;
    }

    .skill-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.875rem;
    }

    .skill-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    /* CP cards mobile */
    .cp-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .cp-card {
        padding: 0.875rem 0.5rem;
        min-width: unset;
    }

    .cp-count {
        font-size: 1.15rem;
    }

    .cp-name {
        font-size: 0.7rem;
    }

    .cp-icon {
        font-size: 1.2rem;
    }

    /* Education mobile */
    .education-card {
        padding: 1.25rem;
    }

    .edu-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .edu-info h3 {
        font-size: 0.95rem;
    }

    /* Contact mobile */
    .contact-info h3 {
        font-size: 1.35rem;
    }

    .contact-link {
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
    }

    .contact-form {
        padding: 1.25rem;
    }

    /* Footer mobile */
    .footer-social {
        gap: 0.5rem;
    }

    .social-link {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2.5rem 0.875rem;
    }

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

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

    .hero-stats {
        max-width: 280px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .cp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .exp-company-info h3 {
        font-size: 0.9rem;
    }

    .repo-card {
        gap: 0.65rem;
    }

    .repo-icon {
        width: 36px;
        height: 36px;
    }

    .about-image {
        display: none;
    }
}
