/* Shared portfolio stylesheet - Alpha Kouanda */
:root {
    --navy: #152238;
    --blue: #2563a6;
    --blue-hover: #174879;
    --pale: #f2f6fb;
    --white: #ffffff;
    --text: #243044;
    --muted: #53647a;
    --border: #dbe4ef;
}
/* JavaScript controls use the existing colors and page layout. */
[hidden] { display: none !important; }
button {
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: white;
    font: inherit;
    cursor: pointer;
}
button:hover, button:focus-visible { background: var(--blue-hover); }
.page-tools, .page-clock { width: min(1100px, 94%); margin: 12px auto; }
.page-tools { text-align: right; }
.page-clock { text-align: right; font-size: .9rem; }
.projects-table article { transition: transform .2s, border-color .2s; }
.projects-table article.card-active, .projects-table article:focus-within {
    transform: scale(1.02);
    border-color: var(--blue);
}
.project-gallery { text-align: center; }
.project-gallery figure { margin: 0 0 16px; }
.project-gallery img { width: 100%; max-width: 650px; height: 330px; object-fit: contain; }
.project-gallery figcaption { margin-top: 10px; }
.field-error { display: block; color: #b42318; font-size: .9rem; }
#contact-form [aria-invalid="true"] { border: 2px solid #b42318; }
#back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 2; }
body.dark-mode {
    --navy: #e1ebfa;
    --blue: #3275b9;
    --blue-hover: #205b98;
    --pale: #111827;
    --white: #1f2937;
    --text: #f3f4f6;
    --muted: #c2cddd;
    --border: #62728a;
}
body.dark-mode header, body.dark-mode footer { background: #0c1524; color: #f3f4f6; }
body.dark-mode nav a { color: #f3f4f6; }
body.dark-mode main a, body.dark-mode summary,
body.dark-mode .home-eyebrow, body.dark-mode .about-eyebrow,
body.dark-mode .about-kicker { color: #9dccff; }
body.dark-mode main .projects-button { color: white; }
body.dark-mode .projects-table article, body.dark-mode .about-skill-card,
body.dark-mode .about-artwork-grid figure, body.dark-mode .about-next-step { background: #273449; }
body.dark-mode form input, body.dark-mode form textarea { background: #111827; color: #f3f4f6; }
body.dark-mode .field-error { color: #ffb4ac; }
@media (max-width: 760px) { .project-gallery img { height: 240px; } }
@media (prefers-reduced-motion: reduce) { .projects-table article { transition: none; } }
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--pale);
}
header {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 25px 16px 0;
}
header h1 { margin: 0; font-size: 2rem; }
header p { margin: 5px 0 18px; color: #dce8fb; }
nav { margin-top: 18px; }
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
    padding: 0;
    max-width: 800px;
}
nav li { flex: 1; }
nav a {
    display: block;
    padding: 13px 12px;
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    transition: background-color .2s ease;
}
nav a:hover, nav a:focus-visible { background: var(--blue-hover); }
nav a.active, nav a[aria-current="page"] { background: var(--blue); border-bottom: 3px solid #a6d4ff; }
main { width: min(1100px, 94%); margin: 30px auto; flex: 1; }
section { background: var(--white); padding: 26px; margin-bottom: 22px; border: 1px solid var(--border); border-radius: 10px; }
h2 { color: var(--navy); margin-top: 0; }
main a { color: var(--blue); }
.profile-image {
    width: min(100%, 380px);
    height: auto;
    display: block;
    border-radius: 10px;
    margin: 18px 0;
}
/* Project table: one project per column */
.projects-table { width: 100%; table-layout: fixed; border-spacing: 12px; }
.projects-table td { width: 33.333%; vertical-align: top; padding: 0; }
.projects-table article {
    height: 100%;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fafcff;
    overflow-wrap: anywhere;
}
.projects-table h2 { font-size: 1.35rem; min-height: 2.5em; margin-bottom: 10px; }
.projects-table img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: contain;
    object-position: left center;
}
.projects-table video { display: block; width: 100%; max-width: 100%; border-radius: 6px; background: #1f2937; }
.projects-table h3 { margin-bottom: 8px; }
details { margin-top: 14px; }
summary { color: var(--blue); font-weight: bold; cursor: pointer; }
summary:hover { text-decoration: underline; }
/* Contact form */
form { max-width: 540px; }
form label { display: inline-block; margin-bottom: 5px; font-weight: bold; }
form input[type="text"], form input[type="email"], form textarea {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #b7c5d5;
    border-radius: 6px;
    font: inherit;
}
form textarea { min-height: 125px; resize: vertical; }
form input[type="submit"] {
    padding: 12px 26px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: var(--blue);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: background-color .2s ease;
}
form input[type="submit"]:hover, form input[type="submit"]:focus-visible { background: var(--blue-hover); }
footer { background: var(--navy); color: white; text-align: center; padding: 20px; }
footer p { margin: 0; }
@media (max-width: 760px) {
    nav a { font-size: .88rem; padding: 12px 5px; }
    main { width: 96%; }
    section { padding: 14px; }
    .projects-table, .projects-table tbody, .projects-table tr, .projects-table td { display: block; width: 100%; }
    .projects-table { border-spacing: 0; }
    .projects-table td { margin-bottom: 16px; }
    .projects-table h2 { min-height: 0; }
}


/* Homepage: two-column HTML table with intro left and photo right */
.home-hero { padding: 34px; }
.home-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.home-table td { vertical-align: middle; }
.home-text-cell { width: 60%; padding: 20px 32px 20px 8px; text-align: left; }
.home-photo-cell { width: 40%; text-align: right; }
.home-eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 1rem; font-weight: bold; }
.home-text-cell h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 16px; }
.home-description { max-width: 520px; font-size: 1.15rem; margin: 0 0 26px; }
main .projects-button {
    display: inline-block;
    padding: 13px 25px;
    border: 2px solid var(--blue-hover);
    border-radius: 999px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color .2s ease, border-color .2s ease;
}
main .projects-button:hover, main .projects-button:focus-visible {
    background: var(--blue-hover);
    border-color: var(--blue);
    color: white;
}
.home-photo-cell .profile-image {
    width: 100%;
    max-width: 360px;
    height: 440px;
    object-fit: cover;
    object-position: center 35%;
    display: inline-block;
    margin: 0;
}
@media (max-width: 760px) {
    .home-hero { padding: 18px; }
    .home-table, .home-table tbody, .home-table tr, .home-table td { display: block; width: 100%; }
    .home-text-cell { padding: 12px 2px 24px; }
    .home-photo-cell { text-align: center; }
    .home-photo-cell .profile-image { max-width: 360px; height: auto; }
}

/* About page */
.about-page { max-width: 1050px; }
.about-intro { padding: 38px 42px; border-left: 6px solid var(--blue); }
.about-eyebrow, .about-kicker { color: var(--blue); font-weight: bold; letter-spacing: .09em; font-size: .8rem; }
.about-intro h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); margin-bottom: 12px; }
.about-intro p:not(.about-eyebrow) { max-width: 760px; font-size: 1.08rem; }
.about-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.about-two-columns .about-panel { margin-bottom: 22px; }
.about-panel h3 { margin: 0 0 6px; color: var(--navy); }
.about-muted { color: var(--muted); }
.about-panel .about-kicker { margin-bottom: 8px; }
.about-skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.about-skill-card { background: #f5f9ff; border: 1px solid var(--border); border-radius: 10px; padding: 19px; }
.about-skill-card h3 { color: var(--navy); margin: 0 0 10px; }
.about-skill-card ul { margin: 0; padding-left: 20px; }
.about-skill-card li { padding: 3px 0; }
.about-interest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.about-interest-grid > div { border-top: 3px solid var(--blue); padding-top: 10px; }
.about-interest-grid h3 { margin: 4px 0; color: var(--navy); }
.about-interest-grid p { margin: 6px 0; }
.about-next-step { text-align: center; padding: 32px; background: #e8f1fd; }
.about-next-step .projects-button { margin-top: 8px; }
@media (max-width: 760px) {
    .about-intro { padding: 22px; }
    .about-two-columns, .about-skills-grid, .about-interest-grid { grid-template-columns: 1fr; }
    .about-two-columns { gap: 0; }
}

/* Optional About-page artwork gallery; appears when gallery HTML is uncommented */
.about-artwork-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.about-artwork-grid figure { margin: 0; padding: 12px; background: #f5f9ff; border: 1px solid var(--border); border-radius: 10px; }
.about-artwork-grid img { display: block; width: 100%; height: 300px; object-fit: contain; border-radius: 6px; }
@media (max-width: 760px) { .about-artwork-grid { grid-template-columns: 1fr; } .about-artwork-grid img { height: auto; max-height: 400px; } }
