/* ==========================================================================
   SAAD HASSAN QURESHI - DEVOPS PORTFOLIO STYLESHEET
   Mobile-First, Responsive & Modern Light Theme Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Variables & Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Surfaces & Clean Light Backgrounds */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-terminal: #0f172a;

    /* High Contrast Dark Typography (Clean readability) */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;

    /* Brand Accents (Cloud & DevOps) */
    --color-primary: #0284c7;
    --color-primary-hover: #0369a1;
    --color-accent: #2563eb;
    --color-k8s: #0284c7;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    /* Borders & Shadows */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.09), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 18px 22px -5px rgba(2, 132, 199, 0.12);

    /* Fonts */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Layout Constants */
    --container-max-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Core Typography (No Horizontal Scroll)
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-highlight {
    color: var(--color-primary);
    background: linear-gradient(120deg, #0284c7 0%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent {
    color: var(--color-accent);
}

.text-cyan {
    color: #0891b2;
}

.text-success {
    color: var(--color-success);
}

/* --------------------------------------------------------------------------
   3. Top Announcement Ribbon
   -------------------------------------------------------------------------- */
.top-status-bar {
    background-color: #0f172a;
    color: #e2e8f0;
    font-size: 0.8rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #1e293b;
}

.status-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGreen 1.8s infinite;
    flex-shrink: 0;
}

@keyframes pulseGreen {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.status-cta {
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   4. Navbar (Sticky & Responsive)
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--transition-smooth);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.terminal-prefix {
    color: var(--color-primary);
    font-weight: 800;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--color-primary);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.4rem 0.65rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background-color: var(--bg-surface-alt);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active .bar-1 {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .bar-2 {
    opacity: 0;
}

.menu-toggle.active .bar-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. Buttons System
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    white-space: nowrap;
    user-select: none;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.825rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.btn-outline {
    background-color: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-outline:hover {
    background-color: var(--bg-surface-alt);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background-color: var(--bg-surface-alt);
    color: var(--color-primary);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.spinning {
    animation: btnSpin 0.8s linear infinite;
}

@keyframes btnSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 3.5rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-body) 100%);
    border-bottom: 1px solid var(--border-light);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    border: 1px solid #bae6fd;
    max-width: 100%;
}

.badge-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.15rem;
    letter-spacing: -0.025em;
    word-break: break-word;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* System Monitor Card */
.system-monitor-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
}

.card-header-bar {
    background-color: #f1f5f9;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    gap: 0.5rem;
}

.window-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background-color: #ef4444;
}

.dot-yellow {
    background-color: #f59e0b;
}

.dot-green {
    background-color: #10b981;
}

.window-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-status-live {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    background-color: #dcfce7;
    color: #15803d;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.system-monitor-body {
    padding: 1.15rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border-light);
    gap: 0.5rem;
}

.metric-name {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

.code-preview-snippet {
    margin-top: 1rem;
    background-color: #0f172a;
    color: #f8fafc;
    padding: 0.85rem;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-cmd {
    color: #38bdf8;
    font-weight: bold;
}

.code-output {
    margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   7. Sections Common Layout
   -------------------------------------------------------------------------- */
.section {
    padding: clamp(3rem, 6vw, 5rem) 0;
    border-bottom: 1px solid var(--border-light);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(2rem, 4vw, 3.25rem);
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.4rem;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.section-subtitle {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-muted);
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   8. About Section
   -------------------------------------------------------------------------- */
.about-grid {
    display: block;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.about-card.main-bio {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}

.about-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.5rem;
}

.tag {
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-medium);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   9. Technical Skills Section
   -------------------------------------------------------------------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    width: 100%;
}

.skill-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: clamp(1.25rem, 2.5vw, 1.65rem);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #bae6fd;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.skill-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.skill-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.icon-linux {
    background-color: #fee2e2;
    color: #dc2626;
}

.icon-git {
    background-color: #ffedd5;
    color: #ea580c;
}

.icon-aws {
    background-color: #fef3c7;
    color: #d97706;
}

.icon-docker {
    background-color: #e0f2fe;
    color: #0284c7;
}

.icon-k8s {
    background-color: #dbeafe;
    color: #2563eb;
}

.icon-network {
    background-color: #dcfce7;
    color: #16a34a;
}

.skill-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.skill-level {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skill-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.15rem;
    line-height: 1.5;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.skill-pills span {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    background-color: var(--bg-surface-alt);
    color: var(--text-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   10. CI/CD Visualizer Section (Responsive Grid/Flex Flow)
   -------------------------------------------------------------------------- */
.pipeline-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.5rem;
}

.pipeline-step {
    flex: 1;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth);
}

.pipeline-step:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.step-badge {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.step-icon {
    width: 34px;
    height: 34px;
    background-color: #e0f2fe;
    color: var(--color-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.step-icon svg {
    width: 18px;
    height: 18px;
}

.pipeline-step h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.pipeline-step p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.85rem;
}

.step-tool {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    background-color: var(--bg-surface-alt);
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    display: inline-block;
}

.pipeline-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.conn-arrow {
    display: block;
}

.conn-arrow-down {
    display: none;
}

/* --------------------------------------------------------------------------
   11. Experience & Education Timeline
   -------------------------------------------------------------------------- */
.timeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.col-heading {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.col-heading svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.timeline-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    padding: 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.period {
    font-family: var(--font-mono);
    font-size: 0.775rem;
    font-weight: 700;
    color: var(--color-primary);
}

.badge-role-tag {
    font-size: 0.675rem;
    font-weight: 700;
    background-color: var(--bg-surface-alt);
    color: var(--text-secondary);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.timeline-role {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.timeline-points {
    list-style-type: disc;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   12. Featured Projects Section
   -------------------------------------------------------------------------- */
.project-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    width: 100%;
}

.project-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: #bae6fd;
}

/* 7th project centered on the row */
.project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.875rem);
    width: 100%;
    justify-self: center;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.project-num {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    font-weight: 700;
    color: var(--color-primary);
}

.project-status-tag {
    font-size: 0.675rem;
    font-weight: 700;
    background-color: #dcfce7;
    color: #166534;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.project-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.project-highlights {
    background-color: var(--bg-surface-alt);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.highlight-item {
    font-size: 0.775rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-tech-stack span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   14. Contact Section & Interactive Links
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2rem;
    width: 100%;
    min-width: 0;
}

.contact-info-col,
.contact-form-col {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.contact-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
    height: 100%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    min-width: 0;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.contact-row:hover {
    background-color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-linkedin {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.icon-github {
    background-color: #f1f5f9;
    color: #0f172a;
}

.icon-email {
    background-color: #e0f2fe;
    color: #0284c7;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-info-text {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
}

.contact-row .label {
    display: block;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.contact-row .val {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    max-width: 100%;
}

.contact-form {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 1.15rem;
    width: 100%;
    min-width: 0;
}

.form-group label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 16px;
    /* 16px avoids mobile iOS auto-zoom bug */
    background-color: var(--bg-body);
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    background-color: #ffffff;
}

/* --------------------------------------------------------------------------
   15. Footer & Toast Notifications
   -------------------------------------------------------------------------- */
.footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-tagline {
    font-size: 0.775rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.back-to-top {
    font-weight: 600;
    font-size: 0.825rem;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: 420px;
    margin-left: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background-color: #0f172a;
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    border-left: 4px solid var(--color-primary);
    animation: slideUp 0.3s ease;
    line-height: 1.4;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   15. Precision Mobile Media Queries (< 992px, < 768px, < 600px, < 380px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {

    .hero-grid,
    .about-grid,
    .timeline-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .hire-btn {
        display: none;
        /* In mobile, CTA is in menu or sticky ribbon */
    }

    .nav-menu {
        position: fixed;
        top: 68px;
        left: 0;
        width: 100%;
        max-width: 100vw;
        height: calc(100vh - 68px);
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
        padding: 2rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0.85rem;
        text-align: center;
    }

    .nav-link {
        display: block;
        font-size: 1.15rem;
        font-weight: 600;
        padding: 0.75rem 1rem;
    }

    /* Responsive CI/CD Vertical Flow on Mobile */
    .pipeline-wrapper {
        flex-direction: column;
        gap: 0.6rem;
        width: 100%;
    }

    .pipeline-step {
        width: 100%;
        min-width: 0;
    }

    .conn-arrow {
        display: none;
    }

    .conn-arrow-down {
        display: block;
        padding: 0.2rem 0;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-card:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 600px) {
    .container {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        width: 100%;
        max-width: 100%;
    }

    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .top-status-bar {
        padding: 0.4rem 0;
    }

    .status-content {
        justify-content: center;
        text-align: center;
        gap: 0.35rem;
    }

    .status-left {
        justify-content: center;
        width: 100%;
    }

    .status-text {
        font-size: 0.75rem;
        text-align: center;
    }

    .status-cta {
        font-size: 0.75rem;
    }

    .hero-section {
        padding: 2.25rem 0 2.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    .stat-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.65rem 1rem;
    }

    .stat-value {
        margin-bottom: 0;
        font-size: 1.4rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .metric-row {
        font-size: 0.775rem;
    }

    .contact-card,
    .contact-form {
        padding: 1.25rem 1rem;
        width: 100%;
    }

    .contact-row {
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
        width: 100%;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
    }

    .contact-row .label {
        font-size: 0.675rem;
    }

    .contact-row .val {
        font-size: 0.8rem;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

@media (max-width: 380px) {
    .nav-brand {
        font-size: 1rem;
    }

    .stat-card {
        padding: 0.5rem 0.75rem;
    }

    .contact-card,
    .contact-form {
        padding: 1rem 0.75rem;
    }

    .contact-row .val {
        font-size: 0.75rem;
    }
}