/* ============================================================
   ROBERT PEÑA
   PROFESSIONAL PORTFOLIO
   Version: 2.0
   ============================================================ */


/* ============================================================
   1. DESIGN SYSTEM
   ============================================================ */

:root {

    /* Background colors */

    --bg-primary: #334155;
    --bg-secondary: #3b4b61;
    --bg-card: #475569;
    --bg-card-hover: #52647b;
    --bg-dark: #1e293b;
    --bg-deep: #172334;

    /* Accent colors */

    --accent-primary: #38bdf8;
    --accent-secondary: #22d3ee;
    --accent-success: #34d399;
    --accent-purple: #a5b4fc;
    --accent-warning: #fbbf24;

    /* Text colors */

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #b0bfd1;

    /* Borders */

    --border-color: #64748b;
    --border-subtle: rgba(148, 163, 184, 0.25);
    --border-accent: rgba(56, 189, 248, 0.45);

    /* Typography */

    --font-primary: "Inter", Arial, sans-serif;
    --font-mono: "JetBrains Mono", Consolas, monospace;

    /* Layout */

    --container-width: 1440px;
    --header-height: 80px;

    /* Border radius */

    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 18px;

    /* Shadows */

    --shadow-small: 0 4px 12px rgba(15, 23, 42, 0.15);
    --shadow-medium: 0 8px 24px rgba(15, 23, 42, 0.22);
    --shadow-large: 0 16px 40px rgba(15, 23, 42, 0.30);

    /* Transitions */

    --transition: 200ms ease;

}


/* ============================================================
   2. GLOBAL RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.3;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-secondary);
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--accent-primary);
    color: var(--bg-dark);
}

:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 5px;
}


/* ============================================================
   3. SHARED LAYOUT
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 48px;
    padding-right: 48px;
}

.section {
    padding: 85px 0;
}

.section-heading {
    max-width: 850px;
    margin-bottom: 42px;
}

.section-heading h2 {
    margin-bottom: 16px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.13em;
}


/* ============================================================
   4. HEADER AND NAVIGATION
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-small);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 12px 48px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.brand:hover {
    color: var(--text-primary);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-medium);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.brand-text strong {
    font-size: 1.25rem;
    letter-spacing: 0.04em;
}

.brand-text > span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 26px;
}

.main-navigation a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--accent-primary);
}

.main-navigation .nav-live-project {
    padding: 9px 16px;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-small);
    color: var(--accent-primary);
}

.main-navigation .nav-live-project:hover {
    background: rgba(56, 189, 248, 0.12);
}

.menu-toggle {
    display: none;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}


/* ============================================================
   5. BUTTONS
   ============================================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    font-size: 0.9rem;
    font-weight: 600;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent-primary);
    color: var(--bg-dark);
}

.button-primary:hover {
    background: #7dd3fc;
    color: var(--bg-dark);
}

.button-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}


/* ============================================================
   6. HERO SECTION
   ============================================================ */

.hero {
    position: relative;
    overflow: hidden;
    padding: 100px 0 90px;
    background:
        radial-gradient(
            ellipse at 85% 20%,
            rgba(56, 189, 248, 0.12),
            transparent 50%
        ),
        linear-gradient(
            135deg,
            #334155 0%,
            #40536b 100%
        );
    border-bottom: 1px solid var(--border-subtle);
}

.hero::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.055) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.055) 1px,
            transparent 1px
        );
    background-size: 40px 40px;
    pointer-events: none;
    content: "";
}

.hero-container {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    align-items: center;
    gap: 65px;
}

.hero-content h1 {
    margin-bottom: 26px;
    font-size: clamp(2.5rem, 4.5vw, 4.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.hero-content h1 > span {
    display: block;
    margin-top: 14px;
    color: var(--accent-primary);
    font-size: 0.65em;
    font-weight: 600;
    letter-spacing: -0.035em;
}

.hero-description {
    max-width: 720px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.85;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 34px;
}

.hero-tags span {
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}


/* ============================================================
   7. PROJECT STATUS PANEL
   ============================================================ */

.project-status {
    overflow: hidden;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-large);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 26px;
    background: rgba(15, 23, 42, 0.25);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 1rem;
    font-weight: 600;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background: var(--accent-success);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.65);
    flex-shrink: 0;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0 25px;
    padding: 17px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.status-row span {
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.status-row strong {
    color: var(--accent-success);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
}

.status-footer {
    padding: 20px 25px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
}


/* ============================================================
   8. ENGINEERING METRICS
   ============================================================ */

.metrics-section {
    background: var(--bg-primary);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    padding: 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--accent-primary);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.metric-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-medium);
}

.metric-card:nth-child(3),
.metric-card:nth-child(4) {
    border-top-color: var(--accent-secondary);
}

.metric-card:nth-child(5) {
    border-top-color: var(--accent-success);
}

.metric-card:nth-child(6),
.metric-card:nth-child(7) {
    border-top-color: var(--accent-purple);
}

.metric-card:nth-child(8) {
    border-top-color: var(--accent-warning);
}

.metric-category {
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.metric-value {
    margin-bottom: 5px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.05em;
}

.metric-label {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.metric-card p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.metric-footnote {
    margin-top: 24px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}


/* ============================================================
   9. SYSTEM ARCHITECTURE
   ============================================================ */

.architecture-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.architecture-diagram {
    padding: 35px;
    background:
        linear-gradient(
            rgba(148, 163, 184, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.045) 1px,
            transparent 1px
        ),
        var(--bg-dark);
    background-size: 25px 25px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
}

.architecture-layer {
    padding: 20px;
    background: rgba(71, 85, 105, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-medium);
}

.layer-label {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-align: center;
}

.architecture-grid {
    display: grid;
    gap: 18px;
}

.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.architecture-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 22px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    color: var(--text-primary);
    text-align: center;
    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.architecture-node:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.node-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 35px;
    margin-bottom: 15px;
    padding: 0 12px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-small);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
}

.architecture-node h3 {
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.architecture-node p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.architecture-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    min-height: 48px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: center;
}

.database-node {
    background: rgba(8, 145, 178, 0.16);
    border-color: rgba(34, 211, 238, 0.5);
}

.database-node:hover {
    background: rgba(8, 145, 178, 0.25);
    border-color: var(--accent-secondary);
}

.database-node .node-icon {
    color: var(--accent-secondary);
}

.database-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 8px;
}

.database-metrics span {
    padding: 4px 9px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: var(--radius-small);
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.architecture-foundation {
    margin-top: 24px;
    padding: 22px;
    background: rgba(52, 211, 153, 0.055);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-medium);
}

.foundation-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.foundation-items span {
    padding: 7px 13px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius-small);
    color: var(--accent-success);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.architecture-caption {
    margin-top: 18px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}


/* ============================================================
   10. TECHNICAL DOMAIN CARDS
   ============================================================ */

.domains-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.domain-card {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
    scroll-margin-top: 110px;
    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.domain-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}

.domain-card:target {
    border-color: var(--accent-primary);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.18);
}

.domain-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-small);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
}

.domain-card h3 {
    margin-bottom: 14px;
    font-size: 1.15rem;
}

.domain-card p {
    margin-bottom: 22px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
}

.domain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.domain-tags span {
    padding: 5px 9px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-small);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
}


/* ============================================================
   11. TECHNOLOGY STACK
   ============================================================ */

.technology-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.technology-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.technology-card {
    padding: 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
}

.technology-card h3 {
    margin-bottom: 22px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 1rem;
    font-weight: 600;
}

.technology-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.technology-items span {
    padding: 8px 13px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-small);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    transition:
        border-color var(--transition),
        color var(--transition);
}

.technology-items span:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}


/* ============================================================
   12. AI-ASSISTED DEVELOPMENT
   ============================================================ */

.ai-section {
    background: var(--bg-primary);
}

.ai-workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.workflow-step {
    position: relative;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-purple);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
}

.step-number {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--accent-purple);
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 600;
}

.workflow-step h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.workflow-step p {
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.75;
}

.ai-principle {
    margin-top: 30px;
    padding: 35px;
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.08),
        rgba(165, 180, 252, 0.08)
    );
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-medium);
    text-align: center;
}

.ai-principle h3 {
    margin-bottom: 15px;
    color: var(--accent-primary);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.ai-principle p {
    max-width: 850px;
    margin: 0 auto;
    color: var(--text-secondary);
}


/* ============================================================
   13. PROJECT SUMMARY
   ============================================================ */

.project-summary {
    padding-top: 25px;
}

.summary-card {
    padding: 65px 40px;
    background:
        radial-gradient(
            ellipse at top right,
            rgba(56, 189, 248, 0.13),
            transparent 60%
        ),
        var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.summary-card h2 {
    margin-bottom: 20px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    letter-spacing: -0.03em;
}

.summary-card p {
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
}


/* ============================================================
   14. FOOTER
   ============================================================ */

.site-footer {
    padding: 35px 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-subtle);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
}

.footer-container strong {
    font-size: 1rem;
}

.footer-container p {
    margin-top: 5px;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
}


/* ============================================================
   15. LARGE TABLETS AND SMALL DESKTOPS
   ============================================================ */

@media (max-width: 1200px) {

    .container,
    .nav-container {
        padding-left: 32px;
        padding-right: 32px;
    }

    .main-navigation {
        gap: 17px;
    }

    .main-navigation a {
        font-size: 0.78rem;
    }

    .hero-container {
        gap: 35px;
    }

    .metric-card {
        padding: 22px;
    }

}


/* ============================================================
   16. TABLET LAYOUT
   ============================================================ */

@media (max-width: 1024px) {

    .section {
        padding: 65px 0;
    }

    .hero {
        padding: 75px 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-status {
        max-width: 650px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .domains-grid,
    .technology-grid,
    .ai-workflow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 32px 24px;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-medium);
    }

    .main-navigation.is-open {
        display: flex;
    }

    .main-navigation a {
        padding: 13px 0;
        font-size: 0.9rem;
    }

    .main-navigation .nav-live-project {
        margin-top: 12px;
        text-align: center;
    }

}


/* ============================================================
   17. MOBILE LAYOUT
   ============================================================ */

@media (max-width: 640px) {

    :root {
        --header-height: 70px;
    }

    .container,
    .nav-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        padding: 48px 0;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .section-heading p {
        font-size: 0.95rem;
    }

    .hero {
        padding: 55px 0;
    }

    .hero-content h1 {
        font-size: 2.45rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .button {
        width: 100%;
    }

    .metrics-grid {
        gap: 12px;
    }

    .metric-card {
        min-height: 200px;
        padding: 18px 14px;
    }

    .metric-category {
        font-size: 0.65rem;
    }

    .metric-value {
        font-size: 1.9rem;
    }

    .metric-label {
        font-size: 0.9rem;
    }

    .metric-card p {
        font-size: 0.73rem;
    }

    .architecture-diagram {
        padding: 14px;
    }

    .architecture-layer {
        padding: 12px;
    }

    .three-columns,
    .two-columns {
        grid-template-columns: 1fr;
    }

    .architecture-node {
        min-height: 125px;
    }

    .architecture-connector {
        flex-direction: column;
        gap: 3px;
        padding: 10px 0;
        font-size: 0.7rem;
    }

    .layer-label {
        font-size: 0.65rem;
    }

    .architecture-foundation {
        padding: 15px;
    }

    .domains-grid,
    .technology-grid,
    .ai-workflow {
        grid-template-columns: 1fr;
    }

    .domain-card {
        min-height: auto;
        padding: 24px;
    }

    .ai-principle {
        padding: 25px 20px;
    }

    .summary-card {
        padding: 40px 22px;
    }

    .summary-card p {
        font-size: 0.95rem;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

}


/* ============================================================
   18. SMALL MOBILE DEVICES
   ============================================================ */

@media (max-width: 380px) {

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: auto;
        padding: 22px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .status-row {
        margin-left: 16px;
        margin-right: 16px;
    }

}


/* ============================================================
   19. ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}

/* ============================================================
   20. PROFESSIONAL WEBSITE NAVIGATION
   Version: 2.0
   ============================================================ */

#shared-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

#shared-header .site-header {
    position: relative;
}

.main-navigation {
    gap: 20px;
}

.nav-link,
.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition:
        color var(--transition),
        background var(--transition);
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover,
.dropdown-toggle.active {
    color: var(--accent-primary);
}


/* ============================================================
   21. DROPDOWN NAVIGATION
   ============================================================ */

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    padding: 10px 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.dropdown-arrow {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform var(--transition);
}

.dropdown-toggle:hover .dropdown-arrow,
.dropdown-toggle.active .dropdown-arrow {
    color: var(--accent-primary);
}

.nav-dropdown.is-open .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.nav-dropdown.is-open .dropdown-toggle {
    color: var(--accent-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    z-index: 1100;
    min-width: 235px;
    padding: 8px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-top: 2px solid var(--accent-primary);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-large);
}

.dropdown-menu[hidden] {
    display: none !important;
}

.dropdown-menu:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.main-navigation .dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    transition:
        background var(--transition),
        color var(--transition);
}

.main-navigation .dropdown-link:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
}

.main-navigation .dropdown-link.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-primary);
    font-weight: 600;
}

.external-link-icon {
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.dropdown-toggle:focus-visible,
.dropdown-link:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}


/* ============================================================
   22. PROFESSIONAL WEBSITE CONTENT ENHANCEMENTS
   ============================================================ */

.hero-content {
    min-width: 0;
}

.hero > .container {
    position: relative;
}

.summary-card h3 {
    margin-top: 30px;
    margin-bottom: 16px;
    color: var(--accent-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.summary-card h3:first-child {
    margin-top: 0;
}

.summary-card .hero-actions {
    justify-content: center;
    margin-top: 30px;
}

.summary-card .domain-tags,
.summary-card .hero-tags,
.summary-card .technology-items {
    justify-content: center;
}

.summary-card .domain-tags {
    margin-top: 24px;
    margin-bottom: 24px;
}

.summary-card .hero-tags {
    margin-top: 24px;
}

.domain-card .button {
    align-self: flex-start;
    margin-top: 18px;
}

.domain-card > a:not(.button) {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.domain-card > a:not(.button):hover {
    color: var(--accent-secondary);
}

.architecture-node.is-focused,
.architecture-node:focus-visible {
    border-color: var(--accent-primary);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.25);
}

.status-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.footer-brand {
    min-width: 180px;
}

.footer-brand p {
    margin-top: 6px;
}

.footer-links {
    align-items: center;
}

.back-to-top {
    white-space: nowrap;
}

.menu-toggle-icon {
    display: inline-block;
    min-width: 24px;
    line-height: 1.2;
    text-align: center;
}


/* ============================================================
   23. RESPONSIVE DESKTOP NAVIGATION
   ============================================================ */

@media (max-width: 1350px) {

    .main-navigation {
        gap: 15px;
    }

    .main-navigation .nav-link,
    .dropdown-toggle {
        font-size: 0.8rem;
    }

    .nav-container {
        gap: 18px;
    }

}

@media (max-width: 1200px) {

    .main-navigation {
        gap: 12px;
    }

    .main-navigation .nav-link,
    .dropdown-toggle {
        font-size: 0.76rem;
    }

    .brand-text strong {
        font-size: 1.1rem;
    }

    .brand-text > span {
        font-size: 0.7rem;
    }

    .brand-icon {
        width: 44px;
        height: 44px;
    }

    .brand {
        gap: 10px;
    }

}


/* ============================================================
   24. RESPONSIVE TABLET AND MOBILE NAVIGATION
   ============================================================ */

@media (max-width: 1024px) {

    .main-navigation {
        gap: 0;
        max-height: calc(100vh - var(--header-height));
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .main-navigation.is-open {
        display: flex;
    }

    .main-navigation .nav-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 48px;
        padding: 13px 0;
        border-bottom: 1px solid var(--border-subtle);
        font-size: 0.9rem;
    }

    .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid var(--border-subtle);
    }

    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 13px 0;
        font-size: 0.9rem;
        text-align: left;
    }

    .dropdown-arrow {
        margin-left: auto;
        font-size: 1rem;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        min-width: 0;
        margin: 0 0 12px;
        padding: 6px;
        background: rgba(71, 85, 105, 0.3);
        border: 1px solid var(--border-subtle);
        border-left: 3px solid var(--accent-primary);
        border-radius: var(--radius-small);
        box-shadow: none;
    }

    .main-navigation .dropdown-link {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.85rem;
        white-space: normal;
    }

    .main-navigation .dropdown-link:hover,
    .main-navigation .dropdown-link.active {
        background: rgba(56, 189, 248, 0.12);
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    .menu-toggle:hover {
        border-color: var(--accent-primary);
        color: var(--accent-primary);
    }

    .menu-toggle[aria-expanded="true"] {
        background: rgba(56, 189, 248, 0.12);
        border-color: var(--accent-primary);
        color: var(--accent-primary);
    }

}


/* ============================================================
   25. SMALL SCREEN CONTENT ENHANCEMENTS
   ============================================================ */

@media (max-width: 640px) {

    .main-navigation {
        padding: 10px 20px 20px;
    }

    .brand-text strong {
        font-size: 1.05rem;
    }

    .brand-text > span {
        font-size: 0.68rem;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .summary-card h3 {
        margin-top: 24px;
        font-size: 1.15rem;
    }

    .summary-card .hero-actions {
        align-items: stretch;
    }

    .domain-card .button {
        align-self: stretch;
        width: 100%;
    }

    .status-row {
        align-items: flex-start;
    }

    .status-row strong {
        max-width: 60%;
    }

    .footer-links {
        gap: 15px 20px;
    }

}

@media (max-width: 380px) {

    .nav-container {
        padding-left: 14px;
        padding-right: 14px;
        gap: 10px;
    }

    .brand {
        gap: 8px;
    }

    .brand-text strong {
        font-size: 0.95rem;
    }

    .brand-text > span {
        font-size: 0.62rem;
    }

}


/* ============================================================
   26. ACCESSIBILITY ENHANCEMENTS
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .dropdown-arrow,
    .dropdown-toggle,
    .dropdown-link,
    .nav-link,
    .menu-toggle {
        transition: none !important;
    }

}


/* ============================================================
   END OF PROFESSIONAL WEBSITE STYLESHEET
   Version: 2.0
   ============================================================ */