* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f3f5f7;
    color: #333;
    line-height: 1.6;
}

header {
    background: #002d62;
    color: white;
    padding: 50px 20px 30px;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

nav a {
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

nav a:hover,
nav a:focus,
nav a.active {
    background: rgba(255, 255, 255, 0.18);
}

nav a:hover,
nav a:focus {
    transform: translateY(-1px);
}

main {
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 20px;
}

.card {
    background: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}

.card h2 {
    color: #002d62;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card h3 {
    color: #002d62;
    margin-bottom: 12px;
    line-height: 1.35;
}

.card p {
    margin-bottom: 18px;
    line-height: 1.9;
}

.card p:last-child {
    margin-bottom: 0;
}

.card ul {
    margin-bottom: 0;
}

/* Portfolio cards */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid #dce2e8;
    border-radius: 8px;
    background: #fafbfc;
}

.portfolio-item p {
    flex-grow: 1;
    margin-bottom: 22px;
}

.portfolio-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: auto;
}

.action-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Buttons */

.button {
    display: inline-block;
    background: #002d62;
    color: white;
    padding: 12px 20px;
    border: 2px solid #002d62;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.button:hover,
.button:focus {
    background: #004a99;
    border-color: #004a99;
    color: white;
    transform: translateY(-1px);
}

.secondary-button {
    padding: 9px 14px;
    font-size: 0.9rem;
}

.outline-button {
    background: transparent;
    color: #002d62;
    border: 2px solid #002d62;
}

.outline-button:hover,
.outline-button:focus {
    background: #eef4fa;
    color: #002d62;
    border-color: #002d62;
}

/* Status badges */

.status {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.status.completed {
    background: #e6f4ea;
    color: #216e39;
}

.status.in-progress {
    background: #fff4ce;
    color: #7a5900;
}

/* Video */

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-link {
    margin-top: 18px;
    margin-bottom: 0;
    text-align: center;
}

.video-link a {
    color: #002d62;
    font-weight: 600;
}

.video-link a:hover,
.video-link a:focus {
    text-decoration: none;
}

/* Enhancement progress */

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.progress-item {
    padding: 26px;
    border: 1px solid #dce2e8;
    border-radius: 8px;
    background: #fafbfc;
}

.progress-content {
    width: 100%;
}

.progress-item p {
    margin-bottom: 18px;
}

/* Repository links */

.repository-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

/* Enhancement page heading */

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.page-heading h2 {
    margin-bottom: 0;
}

.eyebrow {
    margin-bottom: 6px;
    color: #5f6b76;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

/* Enhancement objectives */

.objective-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.objective-item {
    padding: 24px;
    border: 1px solid #dce2e8;
    border-radius: 8px;
    background: #fafbfc;
}

.objective-item p {
    margin-bottom: 0;
}

/* Major improvements */

.improvement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.improvement-item {
    padding: 24px;
    border: 1px solid #dce2e8;
    border-radius: 8px;
    background: #fafbfc;
}

.improvement-item ul {
    padding-left: 20px;
    line-height: 1.8;
}

.improvement-item li + li {
    margin-top: 5px;
}

/* Technical skills */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid #cfd8e1;
    border-radius: 20px;
    background: #f5f7f9;
    color: #002d62;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Course outcomes */

.outcome-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.outcome-item {
    padding: 24px;
    border: 1px solid #dce2e8;
    border-radius: 8px;
    background: #fafbfc;
}

.outcome-item p {
    margin-bottom: 0;
}

/* Bottom page navigation */

.page-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
    padding: 24px 0;
}

.page-navigation a,
.disabled-link {
    color: #002d62;
    font-weight: 600;
    text-decoration: none;
}

.page-navigation a:first-child {
    text-align: left;
}

.page-navigation a:nth-child(2) {
    text-align: center;
}

.page-navigation a:last-child,
.page-navigation .disabled-link:last-child {
    text-align: right;
}

.page-navigation a:hover,
.page-navigation a:focus {
    text-decoration: underline;
}

.disabled-link {
    color: #8a939c;
    cursor: default;
}

/* Footer */

footer {
    text-align: center;
    padding: 30px;
    color: #777;
}

/* Tablet and mobile */

@media (max-width: 700px) {
    header {
        padding: 40px 20px 25px;
    }

    header h1 {
        font-size: 2.3rem;
    }

    .subtitle {
        font-size: 1.05rem;
    }

    main {
        margin: 30px auto;
    }

    .card {
        padding: 28px 22px;
    }

    .portfolio-grid,
    .objective-grid,
    .improvement-grid {
        grid-template-columns: 1fr;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .repository-links {
        align-items: stretch;
        flex-direction: column;
    }

    .repository-links .button {
        width: 100%;
    }

    .page-navigation {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .page-navigation a:first-child,
    .page-navigation a:nth-child(2),
    .page-navigation a:last-child,
    .page-navigation .disabled-link:last-child {
        text-align: left;
    }
}

@media (max-width: 450px) {
    header h1 {
        font-size: 2rem;
    }

    nav {
        align-items: stretch;
        flex-direction: column;
    }

    nav a {
        width: 100%;
    }

    .card {
        padding: 24px 18px;
    }

    .portfolio-item,
    .progress-item,
    .objective-item,
    .improvement-item,
    .outcome-item {
        padding: 22px 18px;
    }

    .action-buttons {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .action-buttons .button {
        width: 100%;
    }

    .page-heading .status {
        align-self: flex-start;
    }
}