/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Executive AI governance palette */
    --primary-color: #39d0ff;
    --secondary-color: #ffbf69;
    --accent-color: #65e4b0;
    --background-color: #07090d;
    --surface-color: #111720;
    --surface-hover: #182230;
    --surface-raised: #0c1118;
    --text-primary: #f7fbff;
    --text-secondary: #b9c5d6;
    --text-muted: #718095;
    --border-color: #263445;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.42);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.5rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    background-image: linear-gradient(180deg, #07090d 0%, #0b1017 45%, #07090d 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

a,
p,
h1,
h2,
h3,
h4,
span,
dd {
    overflow-wrap: anywhere;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.text-accent {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    gap: var(--spacing-sm);
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #061015;
    box-shadow: 0 12px 30px rgba(57, 208, 255, 0.18);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(7, 9, 13, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: var(--font-size-xl);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-lang {
    display: flex;
    align-items: center;
    margin-left: 12px;
}

.lang-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    /* dark fallback color if images fail */
    background-color: var(--surface-color);
    /* overlay gradient on top, then local image fallbacks */
    background-image: linear-gradient(105deg, rgba(7,9,13,0.95) 0%, rgba(7,9,13,0.72) 48%, rgba(7,9,13,0.52) 100%),
                      url('https://github.com/Marubozu-Ousseini/Static-Portfolio-Website/raw/main/images/cloud-ai-background.jpg?raw=true');
    background-position: center center;
    background-size: cover;
    /* avoid `fixed` which can be problematic on mobile browsers */
    background-attachment: scroll;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(57, 208, 255, 0.08) 0%,
        rgba(101, 228, 176, 0.04) 50%,
        rgba(255, 191, 105, 0.05) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Ensure readable content when background image fails */
.hero.no-bg::before {
    background: linear-gradient(135deg, rgba(10,10,10,0.85), rgba(26,26,26,0.85));
}

.hero-container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-motto {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 1180px;
    margin: calc(var(--spacing-xl) * -0.4) 0 0;
    color: var(--text-primary);
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    animation: heroTextIn 0.85s ease-out 0.5s both;
}

.hero-motto span {
    color: var(--secondary-color);
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    max-width: 760px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
    position: relative;
    z-index: 3;
    animation: heroTextIn 0.85s ease-out both;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 3;
    animation: heroTextIn 0.85s ease-out 0.12s both;
}

.hero-purpose {
    max-width: 720px;
    margin: 0 0 var(--spacing-2xl) 0;
    position: relative;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    text-align: left;
    line-height: 1.6;
    z-index: 3;
    padding: var(--spacing-lg);
    background: rgba(12, 17, 24, 0.78);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: heroTextIn 0.85s ease-out 0.24s both;
}

.hero-purpose b {
    color: var(--secondary-color);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.hero-purpose:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    position: relative;
    z-index: 3;
    animation: heroTextIn 0.85s ease-out 0.36s both;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 3;
}

.hero-avatar {
    width: 300px;
    height: 300px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: var(--background-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    animation: avatarEntrance 0.9s ease-out both, avatarFloat 5.2s ease-in-out 1s infinite;
    transform-origin: center;
}

.hero-avatar::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(57, 208, 255, 0.45), rgba(101, 228, 176, 0.24), rgba(255, 191, 105, 0.3));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.hero-avatar::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    pointer-events: none;
    animation: avatarPulse 3.4s ease-in-out infinite;
}

.hero-avatar:hover {
    animation-play-state: paused;
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.5), 0 0 34px rgba(57, 208, 255, 0.34);
}

.hero-avatar:hover::before {
    opacity: 1;
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.hero-avatar:hover img {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.04);
}

.hero-avatar #default-avatar-icon {
    position: absolute;
    z-index: 1;
}

.hero-avatar:has(img) {
    background: none;
}

.hero-avatar:has(img) #default-avatar-icon {
    display: none;
}

/* Section Styles */
section {
    padding: var(--spacing-3xl) 0;
}

.section-title {
    text-align: center;
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.86), rgba(7, 16, 24, 0.92)),
        url('images/vara-compliant-vasp-infrastructure.png') center / cover no-repeat;
    background-attachment: fixed;
}

.about::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 24%, rgba(57, 208, 255, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(5, 10, 18, 0.4), rgba(5, 10, 18, 0.8));
}

.about .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .about {
        background-attachment: scroll;
        background-position: center top;
    }

    .clients {
        background-attachment: scroll;
        background-position: center top;
    }
}

.about-content {
    max-width: 940px;
    margin: 0 auto;
    text-align: left;
}

.about-profile {
    max-width: 980px;
    margin: 0 auto var(--spacing-3xl);
}

.about-profile-content {
    display: grid;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    background: rgba(7, 14, 24, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(10px);
}

.about-profile-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
}

.about-profile-content .about-lead {
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 650;
}

.about-text p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2xl);
    text-align: center;
}

.clients {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.82), rgba(7, 14, 24, 0.93)),
        url('images/abstract-blue-technology-background.jpg') center / cover no-repeat;
    background-attachment: fixed;
}

.clients::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 24% 18%, rgba(57, 208, 255, 0.2), transparent 28%),
        linear-gradient(90deg, rgba(5, 10, 18, 0.72), rgba(5, 10, 18, 0.42), rgba(5, 10, 18, 0.84));
}

.clients .container {
    position: relative;
    z-index: 1;
}

.clients-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

.client-card {
    background:
        linear-gradient(180deg, rgba(17, 29, 44, 0.9), rgba(9, 16, 26, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    transition: var(--transition);
    overflow: hidden;
}

.client-card:hover {
    border-color: rgba(57, 208, 255, 0.62);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34), 0 0 22px rgba(57, 208, 255, 0.08);
}

.client-card summary {
    list-style: none;
}

.client-card summary::-webkit-details-marker {
    display: none;
}

.client-summary {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 36px;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-lg);
    cursor: pointer;
}

.client-card[open] .client-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.client-card-topline {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.client-summary-main {
    display: grid;
    gap: var(--spacing-xs);
}

.client-index,
.client-region {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.client-index {
    color: var(--secondary-color);
}

.client-region {
    justify-content: center;
    width: 100%;
    color: var(--primary-color);
    border: 1px solid rgba(57, 208, 255, 0.25);
    padding: 0 var(--spacing-sm);
    background: rgba(57, 208, 255, 0.07);
}

.client-sector {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.client-brief {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.client-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    color: var(--primary-color);
    border: 1px solid rgba(57, 208, 255, 0.2);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.client-card[open] .client-toggle {
    transform: rotate(180deg);
    background: rgba(57, 208, 255, 0.08);
}

.client-details {
    padding: var(--spacing-lg);
    background: rgba(7, 9, 13, 0.28);
}

.client-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.client-metric {
    min-height: 132px;
    padding: var(--spacing-md);
    background: rgba(57, 208, 255, 0.055);
    border: 1px solid rgba(57, 208, 255, 0.14);
    border-radius: var(--radius-md);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.client-metric:hover {
    transform: translateY(-3px);
    background: rgba(57, 208, 255, 0.08);
    border-color: rgba(57, 208, 255, 0.28);
}

.metric-value,
.metric-label,
.metric-detail {
    display: block;
}

.metric-value {
    color: var(--secondary-color);
    font-size: var(--font-size-2xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-xs);
}

.metric-label {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.metric-detail {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    line-height: 1.45;
}

.client-star {
    display: grid;
    gap: var(--spacing-sm);
}

.client-star div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.client-star dt {
    color: var(--accent-color);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.client-star dd {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-size-sm);
}

.client-result dd {
    color: var(--text-primary);
    font-weight: 600;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.stat {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.stat:hover {
    transform: translateY(-4px);
    border-color: rgba(57, 208, 255, 0.42);
    box-shadow: var(--shadow);
}

.stat h3 {
    font-size: var(--font-size-3xl);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.stat p {
    color: var(--text-secondary);
    margin: 0;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    padding: 0;
}

/* AWS Certifications background */
.certifications {
    position: relative;
    background: linear-gradient(135deg, rgba(3,10,14,0.6), rgba(10,15,20,0.6)), url('https://github.com/Marubozu-Ousseini/Static-Portfolio-Website/raw/main/images/AWS%20Certifications.png?raw=true') no-repeat center center;
    background-size: cover;
    color: var(--text-primary);
}

.certifications::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.6));
    pointer-events: none;
}

.certifications .container {
    position: relative; /* keep content above overlay */
    z-index: 2;
}

.certification-card {
    min-height: 260px;
    background:
        linear-gradient(180deg, rgba(18, 32, 48, 0.94), rgba(9, 16, 26, 0.97));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
    overflow: hidden;
}

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

.certification-card[open] {
    border-color: rgba(57, 208, 255, 0.58);
}

.certification-card summary {
    list-style: none;
}

.certification-card summary::-webkit-details-marker {
    display: none;
}

.certification-summary {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--spacing-md);
    min-height: 240px;
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
}

.certification-image {
    width: 108px;
    height: 108px;
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

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

.certification-name {
    display: block;
    max-width: 24ch;
    color: #f8fbff;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    font-weight: 780;
    line-height: 1.28;
    margin: 0;
    text-wrap: balance;
}

.certification-date {
    display: block;
    color: #9fb1c7;
    font-size: var(--font-size-xs);
    font-weight: 750;
    margin: 0;
}

.card-dropdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--primary-color);
    border: 1px solid rgba(57, 208, 255, 0.24);
    border-radius: var(--radius-sm);
    background: rgba(57, 208, 255, 0.08);
    transition: transform 0.24s ease, background 0.24s ease;
}

.certification-card[open] .card-dropdown,
.project-card[open] .card-dropdown {
    transform: rotate(180deg);
    background: rgba(57, 208, 255, 0.16);
}

.certification-details {
    display: grid;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    animation: detailsReveal 0.24s ease both;
}

.certification-description {
    color: #d1deec;
    font-size: var(--font-size-sm);
    line-height: 1.65;
    margin: 0;
    text-align: left;
}

.certification-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.certification-link.muted {
    color: #9fb1c7;
}

.certification-link:hover {
    color: var(--accent-color);
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: var(--spacing-3xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-lg);
}

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

.error-message {
    text-align: center;
    padding: var(--spacing-xl);
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--radius-md);
    color: var(--secondary-color);
}

/* Projects Section */
.projects {
    position: relative;
    background: linear-gradient(135deg, rgba(4,8,12,0.6), rgba(8,12,18,0.6)), url('https://github.com/Marubozu-Ousseini/Static-Portfolio-Website/raw/main/images/projects-bg.jpg?raw=true') no-repeat center center;
    background-size: cover;
    color: var(--text-primary);
}

.projects::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
    pointer-events: none;
}

.projects .container {
    position: relative; /* keep content above overlay */
    z-index: 2;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    padding: 0;
}

.project-card {
    min-height: 300px;
    background:
        linear-gradient(180deg, rgba(17, 29, 44, 0.9), rgba(9, 16, 26, 0.95));
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 26px rgba(57, 208, 255, 0.08);
    border-color: var(--primary-color);
}

.project-card[open] {
    border-color: rgba(57, 208, 255, 0.58);
}

.project-card summary {
    list-style: none;
}

.project-card summary::-webkit-details-marker {
    display: none;
}

.project-summary {
    display: grid;
    grid-template-columns: 1fr 34px;
    gap: var(--spacing-md);
    align-items: start;
    min-height: 260px;
    padding: var(--spacing-md);
    cursor: pointer;
}

.project-image {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--background-color);
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, filter 0.55s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.04);
}

.project-image:has(img) {
    background: var(--surface-color);
}

.project-content {
    padding: 0 var(--spacing-md) var(--spacing-md);
    animation: detailsReveal 0.24s ease both;
}

.project-summary-content {
    display: grid;
    gap: var(--spacing-xs);
}

.project-title {
    display: block;
    font-size: var(--font-size-lg);
    line-height: 1.2;
    font-weight: 760;
    margin: 0;
    color: var(--text-primary);
}

.project-outcome {
    display: block;
    color: var(--accent-color);
    font-size: var(--font-size-sm);
    line-height: 1.45;
}

.project-outcome-metric {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    width: fit-content;
    max-width: 100%;
    min-height: 32px;
    margin: var(--spacing-xs) 0;
    padding: 0.28rem 0.55rem;
    border: 1px solid rgba(255, 191, 105, 0.32);
    border-radius: var(--radius-sm);
    background: rgba(255, 191, 105, 0.08);
}

.project-outcome-percent {
    color: var(--secondary-color);
    font-size: var(--font-size-2xl);
    font-weight: 850;
    line-height: 1;
}

.project-outcome-label {
    color: #c7d4e4;
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.15;
    text-transform: uppercase;
}

.project-description {
    color: #c7d4e4;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.tech-tag {
    background: rgba(57, 208, 255, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(57, 208, 255, 0.18);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: var(--spacing-md);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent-color);
}

@keyframes detailsReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blog Home */
.blog-page {
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.96), rgba(7, 15, 24, 0.9) 42%, rgba(5, 9, 14, 0.98)),
        url('images/cloud-ai-background.jpg') center top / cover fixed no-repeat;
}

.blog-home {
    min-height: calc(100vh - 80px);
}

.blog-home-hero {
    position: relative;
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
}

.blog-home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 24%, rgba(57, 208, 255, 0.2), transparent 28%),
        radial-gradient(circle at 74% 18%, rgba(101, 228, 176, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(7, 9, 13, 0.22), rgba(7, 9, 13, 0.84));
    pointer-events: none;
}

.blog-home-hero-inner {
    position: relative;
    max-width: 980px;
}

.blog-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: var(--spacing-md);
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(57, 208, 255, 0.34);
    border-radius: var(--radius-sm);
    background: rgba(57, 208, 255, 0.08);
    color: var(--primary-color);
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.blog-home-hero h1 {
    max-width: 900px;
    margin: 0 0 var(--spacing-md);
    color: var(--text-primary);
    font-size: clamp(2.35rem, 6vw, 4.75rem);
    font-weight: 780;
    letter-spacing: 0;
    line-height: 1.02;
}

.blog-home-hero p:not(.blog-kicker) {
    max-width: 760px;
    margin: 0;
    color: #d8e4f2;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.75;
}

.blog-feed {
    display: grid;
    gap: var(--spacing-lg);
    max-width: 980px;
    padding-top: 0;
    padding-bottom: var(--spacing-3xl);
}

.blog-card {
    position: relative;
    padding: clamp(1.25rem, 3vw, 1.8rem);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(10, 18, 30, 0.84);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(57, 208, 255, 0.46);
    background: rgba(12, 24, 39, 0.9);
}

.blog-card-featured {
    border-color: rgba(57, 208, 255, 0.36);
    background:
        linear-gradient(135deg, rgba(57, 208, 255, 0.12), transparent 42%),
        rgba(10, 18, 30, 0.88);
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: var(--spacing-md);
    color: #9eb0c7;
    font-size: var(--font-size-sm);
    font-weight: 700;
}

.blog-card-meta span {
    color: var(--accent-color);
}

.blog-card-meta time::before {
    content: "/";
    margin-right: 0.55rem;
    color: rgba(185, 197, 214, 0.48);
}

.blog-card h2 {
    margin: 0 0 var(--spacing-sm);
    font-size: clamp(1.45rem, 3.6vw, 2.35rem);
    line-height: 1.15;
}

.blog-card h2 a {
    color: #f8fbff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card h2 a:hover,
.blog-card h2 a:focus-visible {
    color: var(--primary-color);
}

.blog-card p {
    max-width: 820px;
    margin: 0;
    color: #c1cede;
    font-size: var(--font-size-lg);
    line-height: 1.72;
}

@media (max-width: 768px) {
    .blog-page {
        background-attachment: scroll;
    }

    .blog-card-meta {
        gap: 0.35rem;
    }

    .blog-card-meta time::before {
        content: "";
        margin-right: 0;
    }
}

@media (max-width: 1024px) {
    .certifications-grid,
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Blog Post Pages */
.blog-post-page {
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.96), rgba(8, 15, 24, 0.92) 34%, rgba(6, 9, 14, 0.98)),
        url('images/cloud-ai-background.jpg') center top / cover fixed no-repeat;
}

.blog-post-shell {
    width: min(940px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.blog-breadcrumb {
    margin-bottom: var(--spacing-lg);
    color: #9fb1c7;
    font-size: var(--font-size-sm);
    font-weight: 650;
}

.blog-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: var(--accent-color);
}

.blog-article {
    color: #dbe7f4;
}

.blog-article header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.blog-post-title {
    max-width: 920px;
    margin: 0 0 var(--spacing-md);
    color: #f8fbff;
    font-size: clamp(2.1rem, 5.4vw, 4.3rem);
    font-weight: 780;
    letter-spacing: 0;
    line-height: 1.04;
}

.blog-post-subtitle {
    max-width: 780px;
    margin: 0 0 var(--spacing-md);
    color: #c5d3e4;
    font-size: clamp(1.05rem, 2.2vw, 1.28rem);
    line-height: 1.75;
}

.blog-article header small {
    color: #93a6bd;
    font-size: var(--font-size-sm);
    font-weight: 700;
}

.blog-article p,
.blog-article li {
    color: #d1deec;
    font-size: clamp(1.02rem, 1.8vw, 1.13rem);
    line-height: 1.86;
}

.blog-article p {
    margin-bottom: var(--spacing-lg);
}

.blog-article strong {
    color: #f8fbff;
}

.blog-article h2,
.blog-article h3 {
    color: #f8fbff;
    letter-spacing: 0;
}

.blog-article h2 {
    margin-top: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: var(--spacing-md);
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.blog-article h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    color: var(--accent-color);
}

.blog-article a {
    color: var(--primary-color);
    text-decoration-color: rgba(57, 208, 255, 0.42);
    text-underline-offset: 0.2em;
}

.blog-article a:hover,
.blog-article a:focus-visible {
    color: var(--accent-color);
}

.blog-article ul,
.blog-article ol {
    display: grid;
    gap: 0.7rem;
    margin: 0 0 var(--spacing-xl);
    padding-left: 1.35rem;
}

.blog-article li::marker {
    color: var(--primary-color);
    font-weight: 800;
}

.blog-article pre {
    margin: var(--spacing-xl) 0;
    padding: clamp(1rem, 3vw, 1.4rem);
    overflow-x: auto;
    border: 1px solid rgba(57, 208, 255, 0.22);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(57, 208, 255, 0.08), transparent 48%),
        rgba(5, 10, 18, 0.88);
    color: #d9f6ff;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: clamp(0.76rem, 1.6vw, 0.92rem);
    line-height: 1.45;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.blog-article section {
    padding: 0;
}

.blog-article section[aria-label="Key takeaways"],
.blog-article section[aria-label="Article contents"],
.blog-article #faq {
    margin: var(--spacing-xl) 0;
    padding: clamp(1.1rem, 3vw, 1.5rem);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(10, 18, 30, 0.72);
    backdrop-filter: blur(12px);
}

.blog-answer-box {
    margin: var(--spacing-xl) 0;
    padding: clamp(1.1rem, 3vw, 1.5rem);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(57, 208, 255, 0.12), transparent 48%),
        rgba(10, 18, 30, 0.82);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.blog-answer-box h2 {
    margin-top: 0;
}

.blog-post-figure {
    margin: var(--spacing-xl) 0;
}

.blog-post-figure-hero {
    margin-top: var(--spacing-xl);
}

.blog-post-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.blog-post-caption {
    margin-top: var(--spacing-sm);
    color: #9fb1c7;
    font-size: var(--font-size-sm);
}

@media (max-width: 768px) {
    .blog-post-page {
        background-attachment: scroll;
    }

    .blog-post-shell {
        width: min(100% - 1.25rem, 940px);
        padding-top: var(--spacing-xl);
    }
}

/* Skills Section */
.skills {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.88), rgba(7, 15, 24, 0.94)),
        url('images/cloud-ai-background.jpg') center / cover no-repeat;
    background-attachment: fixed;
}

.skills::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 20%, rgba(57, 208, 255, 0.18), transparent 28%),
        radial-gradient(circle at 82% 42%, rgba(101, 228, 176, 0.12), transparent 30%),
        linear-gradient(90deg, rgba(5, 10, 18, 0.38), rgba(5, 10, 18, 0.76));
}

.skills .container {
    position: relative;
    z-index: 1;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.skill-category {
    background:
        linear-gradient(180deg, rgba(17, 29, 44, 0.88), rgba(9, 16, 26, 0.92));
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

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

.skill-category-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
    text-align: center;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.skill-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.skill-item:hover {
    background: rgba(57, 208, 255, 0.08);
}

.skill-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.skill-name {
    color: var(--text-primary);
    font-weight: 500;
}

/* Answer Engine Section */
.answers {
    position: relative;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(5, 10, 18, 0.88), rgba(7, 14, 24, 0.95)),
        url('images/vara-compliant-vasp-infrastructure.png') center / cover no-repeat;
    background-attachment: fixed;
}

.answers::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 72% 22%, rgba(57, 208, 255, 0.2), transparent 26%),
        linear-gradient(90deg, rgba(5, 10, 18, 0.86), rgba(5, 10, 18, 0.52), rgba(5, 10, 18, 0.88));
}

.answers .container {
    position: relative;
    z-index: 1;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.answer-card {
    min-height: 190px;
    padding: var(--spacing-xl);
    background:
        linear-gradient(180deg, rgba(17, 29, 44, 0.9), rgba(9, 16, 26, 0.93));
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.answer-card:hover {
    transform: translateY(-5px);
    border-color: rgba(57, 208, 255, 0.42);
    box-shadow: var(--shadow);
}

.answer-card h3 {
    font-size: var(--font-size-xl);
    color: #f8fbff;
}

.answer-card p {
    margin: 0;
    color: #c8d5e5;
}

@media (max-width: 768px) {
    .skills,
    .answers {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* Contact Section */
.contact {
    position: relative;
    background: linear-gradient(135deg, rgba(4,8,12,0.6), rgba(8,12,18,0.6)), url('https://github.com/Marubozu-Ousseini/Static-Portfolio-Website/blob/main/images/contact-bg.jpg?raw=true') no-repeat center center;
    background-size: cover;
    color: var(--text-primary);
}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
    pointer-events: none;
}

.contact .container {
    position: relative; /* keep content above overlay */
    z-index: 2;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    margin-top: var(--spacing-2xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(12, 17, 24, 0.96);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.contact-item i {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
    width: 24px;
}

.contact-item h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.contact-item p {
    margin: 0;
    color: var(--text-secondary);
}

.contact-form {
    background: rgba(12, 17, 24, 0.96);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

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

/* Footer */
.footer {
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-2xl) 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-content p {
    margin: 0;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface-color);
    color: var(--text-secondary);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 980px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--background-color);
        width: 100%;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: var(--spacing-xl) 0;
        gap: var(--spacing-lg);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-2xl);
    }

    .hero-motto {
        margin-top: 0;
        font-size: var(--font-size-3xl);
        white-space: normal;
        text-wrap: balance;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-purpose {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-avatar {
        width: 200px;
        height: 200px;
        font-size: 80px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .certifications-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .client-summary {
        grid-template-columns: 92px minmax(0, 1fr) 36px;
        gap: var(--spacing-md);
    }

    .client-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-motto {
        font-size: var(--font-size-2xl);
        line-height: 1.2;
    }

    .hero {
        min-height: auto;
        padding: 96px 0 var(--spacing-3xl);
    }

    .hero-container {
        gap: var(--spacing-xl);
    }

    .hero-subtitle,
    .hero-purpose {
        font-size: var(--font-size-base);
    }

    .hero-purpose {
        padding: var(--spacing-md);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }

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

    .hero-buttons .btn {
        width: 100%;
    }

    .client-summary {
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .client-details {
        padding: var(--spacing-md);
    }

    .client-star div {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .client-summary {
        grid-template-columns: 1fr 36px;
    }

    .client-card-topline {
        align-items: flex-start;
        grid-column: 1 / -1;
    }

    .client-summary-main {
        grid-column: 1;
    }

    .client-toggle {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
    }

    .client-metrics {
        grid-template-columns: 1fr;
    }

    .client-metric {
        min-height: auto;
    }

    .answer-card {
        min-height: auto;
        padding: var(--spacing-lg);
    }

    .contact-item {
        align-items: flex-start;
    }

    .contact-item p {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 360px) {
    .nav-logo h2 {
        font-size: var(--font-size-lg);
    }

    .hero-title,
    .hero-motto {
        font-size: var(--font-size-xl);
    }

    .hero-avatar {
        width: 176px;
        height: 176px;
    }

    .client-toggle {
        width: 32px;
        height: 32px;
    }
}

/* Motion system */
.motion-reveal {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
    transition: opacity 0.68s ease, transform 0.68s ease, filter 0.68s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.motion-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.fade-in {
    animation: softFadeIn 0.72s ease both;
}

@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(26px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

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

@keyframes avatarEntrance {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.94);
    }
    65% {
        opacity: 1;
        transform: translateY(-8px) scale(1.018);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes avatarPulse {
    0%, 100% {
        opacity: 0.32;
        transform: scale(1);
    }
    50% {
        opacity: 0.78;
        transform: scale(0.965);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    .motion-reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Chat widget */
.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--background-color);
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.chat-panel {
    width: 340px;
    max-height: 480px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.chat-panel.open {
    display: flex;
}

.chat-header {
    padding: 12px;
    background: linear-gradient(90deg, rgba(0,0,0,0.2), rgba(0,0,0,0.1));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chat-messages {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
}

.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(78,205,196,0.08));
    color: var(--text-primary);
}

.chat-message.bot {
    align-self: flex-start;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: var(--background-color);
}

.chat-form input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .chat-panel { width: 90%; right: 8px; left: 8px; }
    .chat-widget { right: 8px; bottom: 8px; }
}
