/* =========================================
   CSS Variables & Design System
   ========================================= */
:root {
    --bg-dark: #0a0f1c;
    --text-light: #e8f0fe;
    --text-muted: #9aa0a6;
    --primary: #38bdf8;
    --secondary: #7c6dff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --font-main: 'Poppins', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Force hide on HTML too */
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    cursor: none; /* Hide default cursor */
}

/* Also hide cursor on interactive elements since we have a custom one */
a, button, input, textarea {
    cursor: none;
}


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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--primary));
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.section-padding {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   Preloader
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 999998;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.typing-init {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--text-light);
    letter-spacing: 4px;
    position: relative;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* =========================================
   Backgrounds & Effects
   ========================================= */
/* =========================================
   Dot Matrix Canvas Background
   ========================================= */
#dot-matrix-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -3; /* Keeps it behind content */
}

#cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

#cursor-outline {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                background-color 0.3s ease,
                border-color 0.3s ease,
                opacity 0.2s ease;
}

/* Hide custom cursor on mobile/touch screens */
@media (pointer: coarse) {
    #cursor-dot,
    #cursor-outline {
        display: none !important;
    }
}

/* =========================================
   Glassmorphism System
   ========================================= */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(56, 189, 248, 0.1);
}

/* =========================================
   UI Components
   ========================================= */
/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    transform: scale(1.05);
}

.btn-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
}

.btn-gradient:hover {
    box-shadow: 0 0 20px rgba(124, 109, 255, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--bg-dark);
}

.btn-text {
    background: transparent;
    color: var(--text-light);
    padding: 0.8rem 0;
}

.btn-text i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.btn-text:hover i {
    transform: translateX(5px);
}

/* Scroll Progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    z-index: 1000;
}

/* Section Headers */
.section-header {
    margin-bottom: 3rem;
    text-align: left;
}

.section-header .eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
}

/* =========================================
   Layout Sections
   ========================================= */

/* Navbar */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    border-radius: 3rem;
    padding: 0.5rem 1.5rem;
    z-index: 999;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.logo-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.8;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    padding-top: 120px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.name {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.typing-container {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    height: 36px;
}

.cursor {
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.accent-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    margin-bottom: 1.5rem;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-cards {
    display: flex;
    gap: 1rem;
}

.small-card {
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border-radius: 1rem;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-placeholder {
    width: 350px;
    height: 450px;
    border-radius: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.photo-placeholder .initials {
    font-size: 8rem;
    font-weight: 800;
    opacity: 0.5;
}

/* 6 Floating Badges Distribution */
.floating-badge {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    animation: float 6s infinite alternate ease-in-out;
    z-index: 2;
    /* Keeps them above the image */
}

/* ================= LEFT SIDE ================= */
/* JS - Top Left */
.badge-1 {
    top: 10%;
    left: -25px;
    color: #f7df1e;
    animation-delay: 0s;
}

/* Code - Mid Left */
.badge-3 {
    top: calc(50% - 25px);
    /* Dead center vertically */
    left: -25px;
    color: var(--primary);
    animation-delay: 2s;
}

/* Globe - Bottom Left */
.badge-5 {
    bottom: 10%;
    left: -25px;
    color: #2ed573;
    animation-delay: 1.5s;
}


/* ================= RIGHT SIDE ================= */
/* Rocket - Top Right */
.badge-4 {
    top: 10%;
    right: -25px;
    color: #ff4757;
    animation-delay: 0.5s;
}

/* Users - Mid Right */
.badge-6 {
    top: calc(50% - 25px);
    /* Dead center vertically */
    right: -25px;
    color: #ffa502;
    animation-delay: 2.5s;
}

/* Brain - Bottom Right */
.badge-2 {
    bottom: 10%;
    right: -25px;
    color: var(--secondary);
    animation-delay: 1s;
}


/* Add this new rule for your image */
.profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keeps your photo from stretching */
    border-radius: inherit;
    /* Keeps the nice rounded corners */
    z-index: 0;
    /* Pushes the image to the background */
    opacity: 0.8;
    /* Optional: slightly fades the image to match the dark theme */
}

/* Make sure the badges and text sit on top of the image */
.floating-badge {
    z-index: 2;
}

.initials {
    z-index: 1;
}

/* About Section */
.about-grid {
    display: grid;
    gap: 2rem;
}

.main-bio {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Timeline (Education & Experience) */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -2.45rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 3px solid var(--primary);
}

.timeline-content .date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.timeline-content .gpa {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    color: var(--primary);
}

.experience-list {
    margin-top: 1rem;
    list-style-type: disc;
    padding-left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.experience-list li {
    margin-bottom: 0.5rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-header i {
    font-size: 1.2rem;
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    font-size: 0.85rem;
    transition: var(--transition);
}

.pill:hover {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    height: 100px;
    border-radius: 1rem 1rem 0 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(124, 109, 255, 0.2));
    margin: -2rem -2rem 1.5rem -2rem;
    display: flex;
    align-items: center;
    padding: 1rem;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-tag {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

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

.loader {
    text-align: center;
    color: var(--text-muted);
    grid-column: 1 / -1;
    padding: 2rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info p {
    color: var(--text-muted);
    margin: 1rem 0 2rem;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
}

.info-item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    color: var(--text-light);
}

.social-icon:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 0.8rem;
    color: var(--text-light);
    font-family: inherit;
    transition: var(--transition);
}

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

/* Floating Label Styles */
.form-group.floating-label label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
}

.form-group.floating-label input:focus ~ label,
.form-group.floating-label input:not(:placeholder-shown) ~ label,
.form-group.floating-label textarea:focus ~ label,
.form-group.floating-label textarea:not(:placeholder-shown) ~ label {
    top: -0.6rem;
    left: 0.8rem;
    font-size: 0.8rem;
    color: var(--primary);
    background: var(--bg-dark);
    border-radius: 4px;
}

.w-100 {
    width: 100%;
}

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Animations (Scroll Reveal)
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* =========================================
   CV Generator Modal & A4 Styling
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    height: 90vh;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.cv-scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    justify-content: center;
    background: #525659;
    /* Standard PDF viewer bg */
}

.cv-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.2rem;
    z-index: 10;
}

/* The actual A4 Page to be printed */
#cv-document {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    color: #1f2937;
    padding: 0;
    /* Removing padding here to use inner containers */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    font-size: 10pt;
    line-height: 1.5;
    position: relative;
}

.cv-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    color: #f8fafc;
    padding: 15mm 20mm;
}

.cv-header-text {
    flex: 1;
    padding-right: 20px;
}

.cv-header-text h1 {
    font-size: 26pt;
    margin: 0 0 5px 0;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 1px;
}

.cv-header-text h2 {
    font-size: 13pt;
    margin: 0 0 12px 0;
    font-weight: 400;
    color: #cbd5e1;
}

.cv-summary {
    font-size: 9.5pt;
    color: #94a3b8;
    text-align: justify;
    line-height: 1.6;
}

.cv-header-image {
    width: 32mm;
    height: 32mm;
    border-radius: 50%;
    border: 3px solid #38bdf8;
    overflow: hidden;
    flex-shrink: 0;
}

.cv-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-contact-bar {
    background: #e2e8f0;
    padding: 8mm 20mm;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 8.5pt;
    font-weight: 500;
}

.cv-contact-bar a,
.cv-contact-bar span {
    color: #334155;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cv-body-modern {
    display: flex;
    padding: 15mm 20mm;
    gap: 15mm;
}

.cv-main-col {
    flex: 1.8;
}

.cv-side-col {
    flex: 1;
}

.cv-section {
    margin-bottom: 22px;
}

.cv-title {
    color: #0f172a;
    font-size: 13pt;
    border-bottom: 2px solid #38bdf8;
    padding-bottom: 4px;
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cv-item {
    margin-bottom: 16px;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}

.cv-item-header h4 {
    font-size: 11pt;
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.cv-date {
    font-size: 8.5pt;
    color: #0284c7;
    font-weight: 600;
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 4px;
}

.cv-institution {
    font-size: 9.5pt;
    color: #475569;
    font-weight: 500;
    margin: 0 0 4px 0;
    font-style: italic;
}

.cv-desc {
    font-size: 9.5pt;
    margin: 0;
    color: #334155;
}

.cv-bullets {
    padding-left: 15px;
    margin: 4px 0 0 0;
    font-size: 9.5pt;
    color: #334155;
}

.cv-bullets li {
    margin-bottom: 3px;
}

.cv-skills-group {
    margin-bottom: 12px;
}

.cv-skills-group h4 {
    font-size: 10pt;
    margin: 0 0 3px 0;
    color: #0f172a;
    font-weight: 600;
}

.cv-skills-group p {
    font-size: 9.5pt;
    margin: 0;
    color: #475569;
    line-height: 1.4;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 150px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero .description {
        margin: 0 auto 2.5rem;
    }

    .hero-cta {
        justify-content: center;
    }

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

@media (max-width: 768px) {

    /* 1. Navbar Mobile Fixes (This was in your old code) */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        border: 1px solid var(--glass-border);
        border-radius: 1rem;
        padding: 1rem;
        flex-direction: column;
        gap: 10px;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-actions .btn {
        display: none;
    }

    .hamburger {
        display: block;
    }

    /* 2. Typography & Typing Effect Fixes (NEW: Stops the up/down bouncing!) */
    .name {
        font-size: 2.2rem;
        word-wrap: break-word;
        line-height: 1.2;
    }

    /* Stop the typing effect from pushing the screen right */
    .typing-container {
        font-size: 1.2rem;
        min-height: 60px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 90vw;
        /* Forces it to stay safely inside the screen bounds */
        margin-left: auto;
        margin-right: auto;
        white-space: normal;
        /* Forces long words to wrap instead of stretch */
    }

    .hero-content {
        text-align: center;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        /* Extra layer of protection */
        box-sizing: border-box;
    }

    .section-padding {
        padding: 80px 5%;
    }

    /* 3. Grid Fixes (NEW: Stops the left/right stretching!) */
    .about-cards,
    .skills-grid,
    .projects-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        /* Forces exactly one column on mobile */
    }

    /* 4. CV Modal Mobile Fix (NEW: Keeps the PDF from breaking the screen) */
    .cv-scroll-container {
        padding: 1rem;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
}