/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --bg:         #0B0F14;
    --bg-card:    #111820;
    --bg-card-hover: #161E28;
    --bg-surface: #0E1319;
    --green:      #6FBF73;
    --green-dim:  #6FBF7340;
    --green-glow: #6FBF7320;
    --amber:      #FFD770;
    --amber-dim:  #FFD77040;
    --red:        #D98E73;
    --red-dim:    #D98E7340;
    --text:       #FFFFFF;
    --text-muted: #94A3B8;
    --text-dim:   #64748B;
    --border:     #1E293B;
    --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius:     12px;
    --radius-sm:  8px;
    --radius-xs:  4px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow:     0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow-green: 0 0 20px var(--green-dim);
    --nav-height: 64px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--amber);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* ============================================
   UTILITY
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red   { color: var(--red); }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(11, 15, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: border-color var(--transition), background var(--transition);
}

.nav--scrolled {
    border-bottom-color: var(--border);
    background: rgba(11, 15, 20, 0.95);
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.nav__logo-icon {
    font-size: 1.3rem;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav__links {
    display: flex;
    gap: 8px;
}

.nav__link {
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
}

.nav__link:hover,
.nav__link.active {
    color: var(--text);
    background: rgba(111, 191, 115, 0.08);
}

.nav__link.active {
    color: var(--green);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}

.btn--primary {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
}

.btn--primary:hover {
    background: transparent;
    color: var(--green);
    box-shadow: var(--shadow-glow-green);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn--outline:hover {
    border-color: var(--green);
    color: var(--green);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero__subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 12px;
}

.hero__role {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 40px;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero__scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--green), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

/* ============================================
   SECTIONS (shared)
   ============================================ */
.section {
    padding: 120px 0;
    position: relative;
}

.section__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section__icon {
    font-size: 1.2em;
}

.section__subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 48px;
}

/* ============================================
   METRIC CARDS
   ============================================ */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--green);
    opacity: 0.6;
}

.metric-card[data-status="warning"]::before { background: var(--amber); }
.metric-card[data-status="danger"]::before  { background: var(--red); }

.metric-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--green-dim);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-green);
}

.metric-card__icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.metric-card__value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.metric-card__value .counter {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.metric-card__unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-card__label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.metric-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot--green { background: var(--green); box-shadow: 0 0 6px var(--green-dim); }
.status-dot--amber { background: var(--amber); box-shadow: 0 0 6px var(--amber-dim); }
.status-dot--red   { background: var(--red);   box-shadow: 0 0 6px var(--red-dim); }

/* ============================================
   CHART CARDS
   ============================================ */
.charts {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.chart-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.chart-card__body {
    position: relative;
    height: 280px;
}

.chart-card__body canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   ARCHITECTURE DIAGRAM — Canvas Connector Tree
   ============================================ */
.arch-tree {
    --connector: var(--green);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 48px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: visible;
}

/* Canvas sits behind all nodes */
#archCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Tier (row of nodes) ---------- */
.arch-tier {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.arch-tier--pair {
    display: flex;
    gap: 80px;
}

.arch-tier--lambdas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 640px;
}

/* ---------- Node base styles ---------- */
.arch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    min-width: 100px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.arch-node:hover,
.arch-node:focus {
    border-color: var(--green);
    box-shadow: var(--shadow-glow-green);
    transform: translateY(-4px);
    outline: none;
}

.arch-node--lambda {
    padding: 16px 10px;
    min-width: 0;
}

.arch-node--lambda .arch-node__icon {
    font-size: 1.5rem;
    color: var(--amber);
}

.arch-node--lambda .arch-node__label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: var(--green);
    word-break: break-word;
}

.arch-node__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.arch-node__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.arch-node__detail {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ---------- Tooltip ---------- */
.arch-tooltip {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: var(--bg-card-hover);
    border: 1px solid var(--green-dim);
    border-radius: var(--radius);
    padding: 20px 24px;
    width: 320px;
    max-width: 90vw;
    box-shadow: var(--shadow), var(--shadow-glow-green);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
}

.arch-tooltip.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

.arch-tooltip__close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.arch-tooltip__close:hover {
    color: var(--text);
}

.arch-tooltip__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 8px;
}

.arch-tooltip__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .arch-tier--pair {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .arch-tier--lambdas {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
}

/* ============================================
   EXPERIENCE TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: 32px;
    margin-bottom: 64px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--green), var(--border));
}

.timeline__item {
    position: relative;
    padding-bottom: 40px;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__marker {
    position: absolute;
    left: -32px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--green);
    z-index: 1;
    box-shadow: 0 0 8px var(--green-dim);
}

.timeline__content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: all var(--transition);
}

.timeline__content:hover {
    border-color: var(--green-dim);
    box-shadow: var(--shadow);
}

.timeline__header {
    margin-bottom: 16px;
}

.timeline__role {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.timeline__company {
    display: block;
    font-size: 1rem;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline__meta {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.timeline__highlights {
    list-style: none;
    margin-bottom: 16px;
}

.timeline__highlights li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.timeline__highlights li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--green);
}

.timeline__highlights li strong {
    color: var(--text);
    font-weight: 600;
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--green-glow);
    border: 1px solid var(--green-dim);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--green);
}

.tag--sm {
    padding: 3px 10px;
    font-size: 0.75rem;
}

/* ============================================
   CREDENTIALS (Education, Certs, Skills)
   ============================================ */
.credentials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 64px;
}

.credentials__skills {
    grid-column: 1 / -1;
}

.credentials__heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.credential-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.credential-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.credential-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition);
}

.cert-badge:hover {
    border-color: var(--amber-dim);
    color: var(--amber);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================
   PROJECTS
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.project-card:hover {
    border-color: var(--green-dim);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.project-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-card__links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.project-card__links a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--green-dim);
    border-radius: 6px;
    transition: all var(--transition);
}

.project-card__links a:hover {
    background: var(--green);
    color: var(--bg);
}

/* ============================================
   SYSTEM STATUS
   ============================================ */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.status-card__indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-card__indicator--green {
    background: var(--green);
    box-shadow: 0 0 8px var(--green-dim);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-card__indicator--amber {
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber-dim);
}

.status-card__indicator--red {
    background: var(--red);
    box-shadow: 0 0 8px var(--red-dim);
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}

.status-card__info {
    display: flex;
    flex-direction: column;
}

.status-card__label {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 500;
}

.status-card__value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* ============================================
   CHATBOT
   ============================================ */
.chatbot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
}

.chatbot__toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(111, 191, 115, 0.3);
    transition: all var(--transition);
}

.chatbot__toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 24px rgba(111, 191, 115, 0.5);
}

.chatbot__toggle-icon {
    font-size: 1.5rem;
}

.chatbot__window {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    max-height: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: all 0.25s ease;
}

.chatbot__window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chatbot__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.chatbot__header-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.chatbot__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.chatbot__close:hover {
    color: var(--text);
}

.chatbot__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

.chatbot__message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.5;
}

.chatbot__message--bot {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    align-self: flex-start;
    color: var(--text-muted);
}

.chatbot__message--user {
    background: var(--green);
    color: var(--bg);
    align-self: flex-end;
    font-weight: 500;
}

.chatbot__suggestions {
    display: flex;
    gap: 6px;
    padding: 8px 20px;
    flex-wrap: wrap;
}

.chatbot__suggestion {
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}

.chatbot__suggestion:hover {
    border-color: var(--green-dim);
    color: var(--green);
}

.chatbot__input-area {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}

.chatbot__input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition);
}

.chatbot__input:focus {
    border-color: var(--green-dim);
}

.chatbot__send {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--green);
    color: var(--bg);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.chatbot__send:hover {
    background: var(--text);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer__about {
    max-width: 600px;
    margin: 0 auto 24px;
}

.footer__about p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.footer__links {
    margin-bottom: 16px;
}

.footer__links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.footer__links a:hover {
    color: var(--green);
}

.footer__sep {
    color: var(--text-dim);
    margin: 0 8px;
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
    .charts {
        grid-template-columns: 1fr;
    }

    .credentials {
        grid-template-columns: 1fr;
    }

    .arch-tree__row--lambdas {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
    }

    .arch-tree__row--split {
        grid-template-columns: 1fr 1fr;
        max-width: 400px;
    }

    .arch-node--split-s3 {
        grid-column: auto;
    }

    .arch-node--split-apigw {
        grid-column: auto;
    }

    .arch-branch-svg,
    .arch-fork-svg {
        display: none;
    }

    .arch-tree__row--split {
        gap: 24px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    :root {
        --nav-height: 56px;
    }

    .nav {
        padding: 0 16px;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(11, 15, 20, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav__links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav__link {
        padding: 12px 16px;
    }

    .section {
        padding: 80px 0;
    }

    .section__subtitle {
        margin-bottom: 32px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .metrics {
        grid-template-columns: 1fr 1fr;
    }

    .arch-tree__row--split {
        grid-template-columns: 1fr 1fr;
        max-width: 320px;
    }

    .arch-node--split-s3 {
        grid-column: auto;
    }

    .arch-node--split-apigw {
        grid-column: auto;
    }

    .arch-tree__row--split-wide {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .arch-tree__row--lambdas {
        grid-template-columns: 1fr 1fr;
        max-width: 320px;
    }

    .arch-node--lambda {
        padding: 12px 8px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline__content {
        padding: 20px;
    }

    .chatbot__window {
        width: calc(100vw - 48px);
        right: -12px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .metrics {
        grid-template-columns: 1fr;
    }
}
