/* =========================================
   01. CORE VARIABLES & THEME
   ========================================= */
:root {
    /* --- Premium Bento Core Colors --- */
    --bg: #050505;             
    --bg-color: #050505;       
    --card-bg: #0f1115;        
    --dark-bg: #050505;
    
    /* --- Global Text Colors --- */
    --text: #e2e8f0;
    --text-color: #e2e8f0;
    --muted-text: #94a3b8;
    --dark-text: #f1f5ff;
    
    /* --- Premium Accents --- */
    --accent: #5b8cff;
    --accent-soft: rgba(91, 140, 255, 0.1);
    --accent-strong: #5b6cff; 
    
    /* --- Borders, Shadows & UI --- */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --light-gray: rgba(225, 230, 245, 0.1);
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius-md: 14px;
    --radius-lg: 22px;
    --transition: 0.3s ease;
    
    /* --- Specific Text Variables --- */
    --text-secondary: #d4e2ff;
    --text-muted: #e7ebff;
    --text-heading: #ffffff;
    --text-hero: #ffffff;
    --text-stats: #94a3b8;
    --text-accent: #5b8cff;
    --text-label: #d3dbf7;
    --text-status: #a9c6ff;
    --text-success: #bbf7d0;
    --text-btn-secondary: #e5e7eb;
    --text-skill: #e7edff;
    --text-skill-bar: #d4dfff;
    --text-tool: #e5ebff;
    --text-project-title: #ffffff;
    --text-project-desc: #94a3b8;
    --text-project-tech: #5b8cff;
    --text-exp-title: #f8fbff;
    --text-exp-desc: #a8b4d2;
    --text-cert: #e2e8f0;
    --text-cert-strong: #ffffff;
    --text-cert-span: #94a3b8;
    --text-contact: #e2e8f0;
}

/* =========================================
   02. BASE RESETS & GLOBAL STYLES
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color); 
    color: var(--text);
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

body.dark {
    background: var(--bg-color); 
    color: var(--dark-text);
}

/* =========================================
   03. REUSABLE COMPONENTS & UTILITIES
   ========================================= */
/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.progress {
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.5, 1);
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Layout Blocks */
.section {
    max-width: 1100px;
    margin: auto;
    padding: 50px 2rem;
}

.section + .section {
    margin-top: 20px;
}

.section h2 {
    font-size: clamp(1.38rem, 1.8vw, 1.8rem);
    margin-bottom: 1.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-heading);
    font-weight: 700;
    border-left: 4px solid #3b82f6;
    padding-left: 10px;
    text-shadow: 0 0 10px rgba(130, 150, 255, 0.4);
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    margin-top: 0.75rem;
    filter: drop-shadow(0 0 8px rgba(103, 120, 244, 0.8));
    transition: width .3s ease;
}

.section h2:hover::after {
    width: 120px;
}

/* Buttons */
.btn-primary,
.btn-outline,
.btn-small {
    cursor: pointer;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(135deg, #7f8cf0, #4c63e0);
    color: white;
    border: none;
    transition: all .25s ease;
    box-shadow: 0 8px 18px rgba(79, 99, 224, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 99, 224, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(149, 169, 255, 0.6);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Adds perfect spacing between icon and text */
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-outline:hover {
    background: rgba(66, 95, 255, 0.16);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.btn-small {
    padding: 0.48rem 0.95rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(99, 110, 216, 0.15);
    border: 1px solid rgba(144, 169, 255, 0.5);
}

.verify-btn {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: #5b8cff;
    text-decoration: none;
    font-weight: 600;
}

.verify-btn:hover { text-decoration: underline; }

/* =========================================
   04. HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed; 
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(5, 5, 5, 0.75); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition);
    z-index: 9999; 
}

header.scrolled {
    background: rgba(5, 5, 5, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    max-width: 1100px;
    margin: auto;
    padding: 1rem 2.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px; 
}

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

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--muted-text);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color var(--transition);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.4rem;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
    transition: width var(--transition);
}

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

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

.nav-cta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-cta .btn-primary {
    background: #5b8cff;
    color: white;
}

/* Mobile Header Controls (Hidden on Desktop) */
.mobile-controls {
    display: none; 
}
.hamburger { 
    display: none; 
    font-size: 1.8rem; 
    color: #ffffff; 
    cursor: pointer; 
}

/* =========================================
   05. HERO SECTION
   ========================================= */
.hero-new {
    display: flex;
    align-items: center;
    padding: 120px 40px 60px;
    max-width: 1200px;
    margin: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
}

.hero-top {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7f8cf0;
    margin-bottom: 20px;
}

.hero-name {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ffffff, #9fb3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 64px;
    line-height: 1.1;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.hero-title span {
    background: linear-gradient(90deg, #5b8cff, #7f8cf0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 18px;
    color: #aab2c0;
    max-width: 500px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap; 
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    padding: 28px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.stat-card h3 {
    font-size: 32px;
    color: #5b8cff;
    margin-bottom: 6px;
}

.stat-card p {
    color: #aab2c0;
    font-size: 14px;
}

.hero-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.hero-tech span {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid rgba(120, 140, 255, 0.4);
    border-radius: 20px;
    color: #cfd6ff;
    background: rgba(120, 140, 255, 0.1);
}

body.dark .hero-section {
    background: #2a2a2a;
}

/* =========================================
   06. ABOUT SECTION BENTO GRID
   ========================================= */
#about { margin-top: 0; }

.about-bento {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: 
        "photo bio bio"
        "photo analysis viz"
        "engineering engineering engineering";
    gap: 20px;
    margin-top: 30px;
}

.about-card {
    background: var(--card-bg);
    padding: 30px; 
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(91, 140, 255, 0.3);
    background: #1a1a1a;
}

.about-card h3 {
    color: #5b8cff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-card p {
    color: #cbd5e1;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Bento Area Mappings */
.area-analysis { grid-area: analysis; }
.area-visualization { grid-area: viz; }
.area-engineering { grid-area: engineering; }

.about-card.area-photo { 
    grid-area: photo; 
    padding: 0; 
    overflow: hidden; 
    background: transparent; 
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-card.area-bio { 
    grid-area: bio; 
    justify-content: center; 
}

.about-card.area-bio p {
    font-size: 1.15rem; 
    color: #cbd5e1; 
}

.profile-img, .profile-photo, .profile-photo-bento {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

/* =========================================
   07. SKILLS & TOOLS SECTION
   ========================================= */
.skills-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px;
    margin-top: 40px;
}

.skill-category-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.skill-category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(91, 140, 255, 0.3);
}

.category-label {
    display: block;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 800;
    border-bottom: 1px solid rgba(127, 140, 240, 0.3);
    padding-bottom: 5px;
}

.skill-desc {
    font-size: 0.85rem;
    color: var(--muted-text);
    line-height: 1.6;
    margin-bottom: 12px;
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #1e1e1e;
    color: #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.2s;
}

.skill-tag:hover {
    background: #5b8cff;
    color: #fff;
    border-color: #5b8cff;
}

/* =========================================
   08. WORKFLOW SECTION
   ========================================= */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.workflow-step {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative; 
    overflow: hidden; 
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workflow-step:hover {
    transform: translateY(-5px);
    border-color: rgba(127, 140, 240, 0.3);
}

.workflow-content {
    position: relative;
    z-index: 2; 
    padding-right: 40px; 
}

.workflow-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(127, 140, 240, 0.08); 
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1; 
    user-select: none; 
}

.workflow-step h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 12px;
}

.workflow-step p {
    font-size: 0.95rem;
    color: #aab2c0;
    line-height: 1.6;
}

/* =========================================
   09. PROJECTS SECTION
   ========================================= */
.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.other-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.project-card {
    background: #0f1115; 
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px; 
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 140, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

body.dark .project-card {
    background: #020617;
    border-color: rgba(30, 64, 175, 0.6);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

body.dark .project-card:hover {
    background: #020617;
    border-color: rgba(129, 140, 248, 0.9);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.95);
}

.project-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; 
    border-radius: 12px; 
    overflow: hidden;
    margin-bottom: 20px;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

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

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

.project-content h3 {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 0.2px;
}

.project-content p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1; 
}

.project-tech {
    display: flex;
    flex-wrap: wrap; 
    gap: 8px; 
    margin-bottom: 16px;
    width: 100%; 
}

.tech-tag {
    background: rgba(91, 108, 255, 0.12); 
    color: #b5c2ff;
    padding: 6px 12px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 600;
    border: none;
    white-space: nowrap; 
}

.project-links {
    display: flex;
    gap: 14px;
    margin-top: auto;
}

.project-links .btn-primary,
.project-links .btn-outline {
    padding: 10px 22px;
    border-radius: 30px; 
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px; 
    transition: all 0.3s ease;
}

.project-links .btn-primary {
    background: #5b6cff; 
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(91, 108, 255, 0.25); 
}

.project-links .btn-primary:hover {
    background: #4a5aeb;
    box-shadow: 0 6px 20px rgba(91, 108, 255, 0.45);
    transform: translateY(-2px);
}

.project-links .btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0 !important;
}

.project-links .btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* =========================================
   10. EXPERIENCE & CASE STUDIES SECTION
   ========================================= */
.experience-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.job-card {
    background: #121212;
    padding: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-date {
    font-size: 12px;
    color: #666;
    letter-spacing: 1px;
}

.company-name {
    color: #5b8cff;
    font-weight: 600;
    margin-bottom: 20px;
}

.job-bullets li {
    color: #aab2c0;
    margin-bottom: 12px;
    line-height: 1.6;
}

.experience-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric-bento-card {
    background: #121212;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.metric-bento-card h3 {
    font-size: 32px;
    color: #5b8cff; 
    margin-bottom: 8px;
}

.metric-bento-card p {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.highlight-text {
    color: #5b8cff; 
    font-weight: 700;
}

.highlight-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Case Study Cards */
.case-study-card {
    background: #0f1115; 
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px; 
    margin-top: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.case-study-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 140, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
    padding-bottom: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.case-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}

.case-link {
    color: #5b8cff; 
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.case-link:hover {
    color: #ffffff; 
    background: rgba(91, 140, 255, 0.1); 
}

.case-link i {
    transition: transform 0.3s ease;
}

.case-link:hover i {
    transform: translateX(4px); 
}

.case-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px;
}

.case-block h4 {
    color: #5b8cff; 
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px; 
}

.case-block p, 
.case-block ul {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.case-block ul {
    padding-left: 18px; 
}

.case-block ul li {
    margin-bottom: 6px;
}

/* Skills Transfer Table */
.skills-transfer-wrap {
    margin-top: 30px;
    width: 100%;
}

.table-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; 
    font-size: 0.85rem;
    color: #64748b; 
    margin-bottom: 20px;
    display: block;
    letter-spacing: 0.5px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent; 
}

.comparison-table th, 
.comparison-table td {
    padding: 18px 10px;
    text-align: left;
}

.comparison-table th {
    color: #64748b; 
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); 
}

.comparison-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04); 
    color: #94a3b8; 
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.comparison-table td:last-child {
    color: #f8fafc; 
    font-weight: 500;
}

.comparison-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* =========================================
   11. CERTIFICATIONS SECTION
   ========================================= */
.cert-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.cert-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    height: 100%; 
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: #161616;
}

.cert-card strong {
    display: block;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cert-card span {
    color: var(--muted-text);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: block;
    flex-grow: 1; 
}

.cert-card a {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto; 
}

.cert-card a:hover {
    color: #ffffff;
}

/* =========================================
   12. CONTACT & FOOTER SECTION
   ========================================= */

.contact-cta-card {
    background: transparent; 
    border: none; 
    box-shadow: none; 
    padding: 10px 20px 20px; /* Changed from 60px to 10px to close the huge gap! */
    text-align: center;
    max-width: 700px; 
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-cta-card h3 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 2.5rem); 
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: none;
    letter-spacing: 1px;
}

.contact-cta-card p {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-location {
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #5b8cff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 35px;
    background: rgba(91, 108, 255, 0.05); 
    border: 1px solid rgba(91, 108, 255, 0.2); 
    padding: 8px 24px;
    border-radius: 30px;
}

.contact-location .divider {
    color: #475569;
}

.contact-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-buttons .btn-primary {
    background: #5b6cff !important;
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(91, 108, 255, 0.25);
}

.contact-buttons .btn-primary:hover {
    background: #4a5aeb !important;
    box-shadow: 0 6px 20px rgba(91, 108, 255, 0.45);
    transform: translateY(-3px);
}

.contact-buttons .btn-outline {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
}

.contact-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-3px);
}

footer {
    padding: 20px 0 40px 0;
    text-align: center;
    background: transparent;
}

.footer-bottom p {
    color: #475569;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* =========================================
   13. BACK TO TOP BUTTON
   ========================================= */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   14. MEDIA QUERIES & RESPONSIVENESS
   ========================================= */

/* --- Large Tablets & Small Laptops --- */
@media (max-width: 1100px) {
    .skills-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Medium Tablets (iPads) --- */
@media (max-width: 992px) {
    .case-grid-4 {
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .about-bento {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "photo bio"
            "analysis viz"
            "engineering engineering";
    }
}

/* --- Mobile Devices (Phones) --- */
@media (max-width: 768px) {
    /* 1. Global Fixes & Stop Horizontal Scrolling */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }

    .section {
        padding: 60px 20px;
    }

    .section h2 {
        text-align: center;
        display: block;
        border-left: none;
        padding-left: 0;
        font-size: 2rem;
    }

    /* 2. Fix the Squished Hero Section */
    .hero-new {
        padding: 100px 20px 40px; 
    }

    .hero-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
        text-align: left;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }

    /* 3. Mobile Navigation Menu */
    .navbar {
        flex-wrap: wrap; 
    }

    .hamburger {
        display: block; 
    }

    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 15px; 
    }

    .desktop-resume {
        display: none !important; 
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #0f1115;
        padding: 20px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        margin-top: 15px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

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

    .nav-links {
        display: flex !important; 
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-bottom: 25px;
        width: 100%;
    }

    .nav-links a {
        color: #ffffff;
        font-size: 1.15rem;
        padding: 10px;
        display: block;
    }

    .nav-cta {
        display: none !important;
    }

    /* 4. Force All Bento Grids to 1 Column */
    .about-bento {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "photo"
            "bio"
            "analysis"
            "viz"
            "engineering";
    }

    .skills-bento-grid,
    .featured-projects-grid,
    .other-projects-grid,
    .workflow-grid,
    .cert-bento-grid,
    .case-grid-4,
    .experience-metrics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 5. Mobile Adjustments for Cards & Images */
    .about-card.area-bio {
        padding: 20px; 
        text-align: center;
    }

    .area-photo img, .profile-photo-bento {
        max-width: 250px;
        margin: 0 auto 20px auto;
        display: block;
    }
    
    .skill-category-card {
        min-height: auto; 
    }    

    .project-card, 
    .cert-card, 
    .workflow-step,
    .case-study-card,
    .job-card {
        padding: 20px;
    }

    .project-image-wrapper {
        margin-bottom: 15px;
    }

    /* 6. Case Study & Contact Layouts */
    .case-header,
    .contact-cta-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 15px;
    }

    .contact-cta-card {
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }

    /* 7. Skills Transfer Table Fix */
    .comparison-table th, 
    .comparison-table td {
        padding: 12px 5px;
        font-size: 0.8rem; 
    }

    /* 8. Full-Width Buttons for Thumbs */
    .project-links,
    .contact-buttons,
    .hero-buttons {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .btn-primary, .btn-outline {
        width: 100%; 
        justify-content: center;
    }
}