:root {
    /* Brand palette — Outlook visual identity, section 07.
       Oxford Blue leads; French Wine is the accent and should stay under
       1/4 of any layout. Extended tones are for section/category colour only. */
    --brand-oxford-blue: #101551;   /* primary: trustworthy, stable */
    --brand-american-blue: #38427a; /* secondary: familiar, mature */
    --brand-french-wine: #af1b3e;   /* secondary accent: elegant, warm */
    --brand-raisin-black: #262626;  /* neutral: bold, classy */
    --brand-light-gray: #d7d4d5;    /* neutral: calm, balanced */

    --brand-ext-linen: #f5f0ec;
    --brand-ext-sand: #d4bfaa;
    --brand-ext-clay: #b8775b;
    --brand-ext-coral: #e27d61;
    --brand-ext-mustard: #e9c16a;
    --brand-ext-olive: #8a9a5b;
    --brand-ext-forest: #2f6b52;
    --brand-ext-teal: #397689;
    --brand-ext-sky: #a2c6ea;
    --brand-ext-periwinkle: #a1a4eb;
    --brand-ext-rose: #c98b90;
    --brand-ext-plum: #5e3958;

    /* Roles */
    --color-primary: var(--brand-oxford-blue);
    --color-primary-light: var(--brand-american-blue); /* hover */
    --color-primary-translucent: rgba(16, 21, 81, 0.96);
    --color-accent: var(--brand-french-wine);
    --color-accent-dark: #8e1532;
    --color-success: var(--brand-ext-forest);
    --color-background-white: #FFFFFF;
    --color-background-ice: #f4f3f3; /* Light Gray at ~25% on white */
    --color-text-dark: var(--brand-raisin-black);
    --color-text-muted: #5f5d5e;
    --color-border-soft: rgba(16, 21, 81, 0.14);
    --color-tag-bg: #e8e9f0;
    --color-tag-text: var(--brand-oxford-blue);

    /* Typography — the brand book is set in Myriad Pro. Source Sans 3 is
       Adobe's open-licence humanist sans from the same design lineage. */
    --font-heading: 'Source Sans 3', 'Myriad Pro', 'Segoe UI', sans-serif;
    --font-body: 'Source Sans 3', 'Myriad Pro', 'Segoe UI', sans-serif;
    --font-ui: 'Source Sans 3', 'Myriad Pro', 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-unit: 8px;
    --container-max-width: 1200px;
    --header-height: 80px;

    /* Borders */
    --border-radius-card: 6px;
    --border-soft: 1px solid var(--color-border-soft);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Footer sits at the bottom even when the page is short. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-background-white);
    line-height: 1.6;
    font-size: 18px; /* High legibility */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; font-weight: 700; }

p {
    margin-bottom: 1.5rem;
}

.rich-text p {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--color-text-dark);
}

.rich-text a,
.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 3px;
}

.rich-text a:hover,
.article-content a:hover {
    color: var(--color-accent);
}

::selection {
    background: var(--color-primary);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 12px 24px;
    font-family: var(--font-ui);
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
}

/* Header & Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-background-white);
    border-bottom: var(--border-soft);
    transition: background-color 0.3s ease, color 0.3s ease;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.site-header.scrolled {
    background-color: var(--color-primary-translucent);
    color: #fff;
    border-bottom: none;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary);
}

.brand-logo img {
    display: block;
    height: 26px;
    width: auto;
}

.brand-logo .brand-logo--light {
    display: none;
}

.site-header.scrolled .brand-logo .brand-logo--dark {
    display: none;
}

.site-header.scrolled .brand-logo .brand-logo--light {
    display: block;
}


.site-header.scrolled .brand-logo {
    color: #fff;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
}

.main-nav a {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    border-bottom-color: var(--color-accent);
}

.site-content {
    flex: 1 0 auto;
}

/* Layout Grid */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-top: 40px;
}

/* Editorial Hero (Lead Story) */
.hero-section {
    padding: 60px 0;
    border-bottom: var(--border-soft);
}

.hero-content {
    grid-column: span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-text {
    grid-column: span 5;
}

.hero-image {
    grid-column: span 7;
}

.hero-image img {
    border-radius: var(--border-radius-card);
}

/* Editorial App Grid (Cards) */
.app-grid {
    padding: 40px 0;
}

.card {
    background: #fff;
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 24px rgba(16, 21, 81, 0.08);
}

.card:hover .card-title {
    color: var(--color-primary-light);
}

.card-tag {
    display: inline-block;
    background-color: transparent;
    color: var(--color-accent);
    padding: 0 0 0 10px;
    border-left: 3px solid var(--color-accent);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 12px;
    align-self: flex-start;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card-excerpt {
    font-size: 1rem;
    color: var(--color-text-muted);
    flex-grow: 1;
}

.card-meta {
    margin-top: 16px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Sidebar "Voice of the Student" */
.sidebar {
    background-color: var(--color-background-ice);
    padding: 32px; /* Increased padding */
    border-radius: var(--border-radius-card); /* Keep consistent rounding */
}

/* Ensure sidebar content has some breathing room */
.sidebar h3 {
    margin-top: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-primary);
    margin-bottom: 24px;
}

.sidebar-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border-soft);
}

.sidebar-item:last-child {
    border-bottom: none;
}

/* Article Page */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 60px auto 40px;
}

.article-content {
    max-width: 720px;
    margin: 0 auto 80px;
    font-size: 1.2rem;
}

/* Homepage: recruitment mode */
.btn-ghost {
    display: inline-block;
    padding: 11px 22px;
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 2px;
}

.main-nav .nav-cta {
    background: var(--color-accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 2px;
    border-bottom: 0;
}

.main-nav .nav-cta:hover {
    background: var(--color-accent-dark);
}

.recruit-hero {
    position: relative;
    overflow: hidden;
    background: var(--color-primary);
    color: #fff;
    padding: 96px 0 88px;
}

/* The Outlook "O" as a large watermark, as on the brand's social covers. */
.recruit-hero::after {
    content: "";
    position: absolute;
    right: -6%;
    top: 50%;
    width: min(46vw, 560px);
    aspect-ratio: 874 / 850;
    transform: translateY(-50%);
    background: url("../brand/icon/outlook-icon-ablue.a4f1d470cc5c.svg") center / contain no-repeat;
    opacity: 0.55;
    pointer-events: none;
}

.recruit-hero .container {
    position: relative;
    z-index: 1;
}

.recruit-hero h1 {
    color: #fff;
    font-size: 6rem;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    max-width: 900px;
}

.recruit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.recruit-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-ext-mustard);
}

.recruit-lede {
    font-size: 1.3rem;
    opacity: 0.88;
    max-width: 620px;
    margin-bottom: 32px;
}

.recruit-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.recruit-actions .btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.recruit-actions .btn-primary:hover {
    background: var(--color-accent-dark);
}

.recruit-actions .btn-ghost {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.recruit-closed {
    margin: 0;
    opacity: 0.9;
}

.recruit-closed a {
    text-decoration: underline;
}

.recruit-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 56px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    opacity: 0.8;
}

.recruit-stats b {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.home-section {
    padding-top: 72px;
}

.home-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.home-section-head h2 {
    margin: 0;
    font-size: 2.2rem;
}

.home-section-head p {
    margin: 0;
    color: var(--color-text-muted);
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.news-grid,
.soon-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-grid {
    grid-template-columns: repeat(3, 1fr);
}

.soon {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 22px;
    border: 1.5px dashed var(--color-border-soft);
    border-radius: var(--border-radius-card);
    background: var(--color-background-ice);
}

.soon-tag,
.team-num {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.soon h3 {
    font-size: 1.25rem;
    margin: 10px 0 8px;
}

.soon p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0;
}

.soon-pill {
    align-self: flex-start;
    margin-top: auto;
    padding: 3px 10px;
    border: 1px solid var(--brand-light-gray);
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.soon p + .soon-pill {
    margin-top: 16px;
}

.team-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 24px rgba(16, 21, 81, 0.08);
}

.team-card:hover .team-go {
    color: var(--color-accent);
}

.team-card h3 {
    margin: 8px 0 0;
    font-size: 1.35rem;
}

.team-go {
    margin-top: auto;
    padding-top: 18px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
}

.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    background: var(--color-background-ice);
}

.steps li {
    padding: 24px;
    border-right: var(--border-soft);
}

.steps li:last-child {
    border-right: 0;
}

.steps b {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1;
    color: var(--color-primary);
}

.steps h4 {
    margin: 10px 0 4px;
    font-size: 1.05rem;
}

.steps p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.site-footer {
    margin-top: 60px;
    padding: 64px 0 40px;
    background-color: var(--color-primary);
    border-top: 4px solid var(--color-accent);
    color: #fff;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 28px;
    margin-bottom: 24px;
}

.footer-wordmark {
    height: 34px;
    width: auto;
}

.footer-wordmark-ar {
    height: 40px;
    width: auto;
    padding-left: 28px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-tagline {
    margin-bottom: 0;
    opacity: 0.8;
}

.footer-legal {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
    opacity: 0.65;
}

.footer-legal p {
    margin: 0;
}

.footer-links a {
    padding: 10px 4px;
    border-bottom: 2px solid transparent;
}

.footer-links a:hover {
    border-bottom-color: var(--color-accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .footer-wordmark { height: 26px; }
    .footer-wordmark-ar { height: 32px; padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
    .news-grid, .soon-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .steps li:nth-child(2) { border-right: 0; }
    .steps li:nth-child(-n+2) { border-bottom: var(--border-soft); }
}

@media (max-width: 768px) {
    .recruit-hero h1 { font-size: 4.5rem; }
}

@media (max-width: 560px) {
    .recruit-hero { padding: 56px 0; }
    .recruit-hero::after { width: 70vw; right: -30vw; opacity: 0.3; }
    .recruit-hero h1 { font-size: 3.2rem; }
    .recruit-lede { font-size: 1.1rem; }
    .recruit-stats { gap: 24px; margin-top: 36px; }
    .news-grid, .soon-grid, .team-grid { grid-template-columns: 1fr; }
    .soon { min-height: 0; }
    .home-section { padding-top: 56px; }
    .home-section-head h2 { font-size: 1.8rem; }
}

/* Mobile Adaptability */
@media (max-width: 768px) {
    .grid-12, .hero-content {
        display: flex;
        flex-direction: column;
    }
    
    .hero-text, .hero-image {
        grid-column: span 12;
    }

    .hero-text {
        order: 2; /* Image first on mobile */
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 24px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    /* One compact row so the sticky header doesn't eat the screen. */
    .site-header .container {
        padding: 10px 16px;
        gap: 12px;
    }

    .brand-logo img { height: 20px; }
    .main-nav ul { gap: 14px; align-items: center; }
    .main-nav a { display: inline-block; padding: 10px 0; font-size: 0.82rem; }
    .main-nav .nav-cta { padding: 8px 12px; }

    .site-header {
      height: auto;
    }
}

/* Phones: keep each nav label on one line; whole items wrap instead. */
@media (max-width: 480px) {
    .main-nav a { white-space: nowrap; }
    .main-nav .nav-home { display: none; } /* the logo already goes home */
}

@media (max-width: 350px) {
    .brand-logo img { height: 16px; }
    .main-nav ul { gap: 10px; }
}

/* Author pages and the "about the author" box on articles */
.author-hero {
    background-color: var(--color-background-ice);
    border-bottom: var(--border-soft);
    padding: 56px 0;
}

.author-hero-inner {
    display: flex;
    align-items: center;
    gap: 32px;
}

.author-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-photo--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
}

.author-name {
    font-size: 2.5rem;
    margin: 12px 0 4px;
}

.author-role {
    font-family: var(--font-ui);
    color: var(--color-text-muted);
    margin: 0 0 12px;
}

.author-bio {
    max-width: 640px;
    font-size: 1.1rem;
    margin: 0 0 12px;
}

.author-links {
    display: flex;
    gap: 16px;
    font-family: var(--font-ui);
    font-weight: 600;
    margin: 0;
}

.author-links a {
    color: var(--color-primary);
}

.author-articles {
    padding-top: 48px;
    padding-bottom: 72px;
}

.author-articles h2 {
    margin-bottom: 24px;
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.author-empty {
    color: var(--color-text-muted);
}

.author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 24px;
    border: var(--border-soft);
    border-radius: var(--border-radius-card);
    background: var(--color-background-ice);
}

.author-box-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    font-size: 1.6rem;
}

.author-box-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-dark);
}

.author-box p {
    margin: 6px 0 0;
    font-size: 0.95rem;
}

@media (max-width: 700px) {
    .author-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .author-links {
        justify-content: center;
    }
}

/* 404 */
.error-page {
    max-width: 640px;
    padding-top: 96px;
    padding-bottom: 96px;
    text-align: center;
}

.error-page-mark {
    width: 96px;
    margin: 0 auto 24px;
}

.error-page-code {
    margin-bottom: 8px;
    font-family: var(--font-ui);
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--color-accent);
}
