:root {
    --ink: #0a1612;
    --ink-2: #0f1f19;
    --ink-3: #15291f;
    --paper: #f4f0e6;
    --muted: #93a49b;
    --muted-dim: #637066;
    --accent: #e2983c;
    --accent-light: #f5c583;
    --accent-soft: rgba(226, 152, 60, 0.22);
    --accent-ink: #1a1007;
    --line: rgba(244, 240, 230, 0.12);
    --line-strong: rgba(244, 240, 230, 0.24);
    --font-display: 'Noto Serif KR', serif;
    --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--ink);
    color: var(--paper);
    line-height: 1.75;
    font-size: 17px;
    overflow-x: hidden;
    word-break: keep-all;
    overflow-wrap: break-word;
}

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

.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--paper); }

p { color: var(--muted); }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 22, 18, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.topbar.scrolled { border-bottom-color: var(--line); }

.topbar-inner {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wordmark {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.mainnav { display: flex; gap: 36px; list-style: none; }

.mainnav a {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mainnav a:hover { color: var(--paper); }

.topbar-actions { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 28px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.nav-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--paper);
    transition: all 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-panel {
    display: none;
    flex-direction: column;
    padding: 12px 24px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--ink);
}

.mobile-panel a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    font-size: 17px;
    color: var(--paper);
}

.mobile-panel.open { display: flex; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 30px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #c98934; border-color: #c98934; transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(226, 152, 60, 0.45); }

.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-small { padding: 11px 20px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 56px; }

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero::before {
    top: -240px;
    right: -160px;
    width: 680px;
    height: 680px;
    background: radial-gradient(circle, var(--accent-soft) 0%, rgba(226, 152, 60, 0) 70%);
    animation: drift1 20s ease-in-out infinite;
}

.hero::after {
    bottom: -260px;
    left: -220px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(79, 122, 100, 0.28) 0%, rgba(79, 122, 100, 0) 70%);
    animation: drift2 24s ease-in-out infinite;
}

@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 30px); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -20px); } }

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

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 4.8vw, 4rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.hero-copy .lede {
    font-size: 20px;
    max-width: 500px;
    margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.graph-wrap { position: relative; width: 100%; max-width: 580px; margin-left: auto; }

.graph-wrap::before {
    content: '';
    position: absolute;
    top: -4%;
    left: -4%;
    right: -4%;
    bottom: 64px;
    background-image: radial-gradient(rgba(244, 240, 230, 0.1) 1px, transparent 1.6px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse at 55% 45%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 55% 45%, #000 0%, transparent 70%);
    pointer-events: none;
}

#ontology { position: relative; display: block; width: 100%; aspect-ratio: 1 / 0.9; cursor: crosshair; }

.graph-caption {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding: 10px 16px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 31, 25, 0.72);
    backdrop-filter: blur(6px);
}

.graph-tag {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    padding: 5px 11px;
    border: 1px solid rgba(226, 152, 60, 0.45);
    border-radius: 999px;
}

.graph-query {
    min-width: 0;
    font-size: 15px;
    color: var(--paper);
    opacity: 0;
    transition: opacity 0.35s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.graph-query.show { opacity: 1; }

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 56px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label { font-size: 15px; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    background: var(--ink-2);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 52s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.mq-item {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: rgba(244, 240, 230, 0.42);
    white-space: nowrap;
}

.mq-item.hl { color: var(--paper); }

.mq-item::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 36px;
    background: var(--accent);
    transform: rotate(45deg);
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: 104px 0; border-top: 1px solid var(--line); }

.section.alt { background: var(--ink-2); }

.section-head { max-width: 640px; margin-bottom: 56px; }

.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -0.015em; margin-bottom: 18px; }

.section-head p { font-size: 17px; }

.has-contour { overflow: hidden; }

.has-contour::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/img/contour-bg.webp') center / cover no-repeat;
    opacity: 0.4;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(105deg, transparent 25%, #000 85%);
    mask-image: linear-gradient(105deg, transparent 25%, #000 85%);
}

.has-contour > .container { position: relative; z-index: 1; }

/* ---------- Problems ---------- */
.problem-list { list-style: none; border-top: 1px solid var(--line); }

.problem {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: baseline;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.problem-q { font-family: var(--font-display); font-size: clamp(1.15rem, 1.9vw, 1.4rem); font-weight: 700; line-height: 1.5; color: var(--paper); }

.problem-tag {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 11px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid rgba(226, 152, 60, 0.45);
    border-radius: 999px;
}

.problem-a p { font-size: 16px; }

/* ---------- Consulting ---------- */
.consult-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }

.consult-media { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }

.consult-media img { width: 100%; height: auto; }

.phase-list { list-style: none; }

.phase { position: relative; padding: 22px 0 22px 24px; border-left: 1px solid var(--line-strong); }

.phase::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.phase .step-num { font-size: 1.1rem; margin-bottom: 4px; }

.phase h3 { font-family: var(--font-body); font-size: 21px; font-weight: 700; margin-bottom: 8px; }

.phase p { font-size: 16px; }

.phase-out { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.step-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

/* ---------- Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.tile {
    position: relative;
    overflow: hidden;
    padding: 30px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tile:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6); }

.tile::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 220px;
    height: 220px;
    background-image: radial-gradient(rgba(244, 240, 230, 0.14) 1px, transparent 1.6px);
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 68%);
    mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 68%);
    pointer-events: none;
}

.tile-icon { color: var(--accent); }

.tile-icon svg { width: 34px; height: 34px; }

.tile h3 { font-family: var(--font-body); font-size: 20px; font-weight: 700; margin: 18px 0 10px; }

.tile p { font-size: 16px; }

.cap { display: flex; flex-direction: column; }

.tile .cap-refs { margin-top: auto; padding-top: 16px; font-size: 14px; color: var(--muted); }

.cap > p:not(.cap-refs) { margin-bottom: 20px; }

.cap-refs span { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted-dim); }

/* ---------- Education: folded curriculum ---------- */
.edu-more { border-top: 1px solid var(--line); }

.edu-more summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 4px;
    list-style: none;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
}

.edu-more summary::-webkit-details-marker { display: none; }

.edu-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.edu-more-title { font-size: 17px; font-weight: 700; color: var(--paper); }

.edu-more-meta { font-size: 14px; color: var(--muted-dim); }

.edu-more summary:hover .open-ico, .edu-more[open] summary .open-ico { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.edu-more[open] summary .open-ico { transform: rotate(45deg); }

.edu-more-body { padding-top: 40px; }

/* ---------- Education ---------- */
.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
    margin-top: 64px;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.track-card {
    overflow: hidden;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.track-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5); }

.track-media { width: 100%; height: auto; border-bottom: 1px solid var(--line); }

.track-body { padding: 24px 26px 28px; }

.track-label { font-size: 13px; font-weight: 600; color: var(--muted-dim); margin-bottom: 10px; }

.track-stat {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.track-card p { font-size: 15px; }

.course-list { list-style: none; margin-bottom: 56px; }

.course-row {
    display: grid;
    grid-template-columns: 36px 1fr auto 28px;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    align-items: baseline;
}

.course-row:last-child { border-bottom: 1px solid var(--line); }

.course-row .c-num { font-family: var(--font-display); color: var(--accent); font-size: 17px; font-weight: 700; }

.course-main { display: flex; flex-direction: column; gap: 4px; }

.course-title { font-size: 16px; font-weight: 700; color: var(--paper); }

.course-desc { font-size: 14px; color: var(--muted); }

.course-hours { font-size: 14px; color: var(--muted-dim); white-space: nowrap; }

.course-curriculum { font-size: 14px; color: var(--muted-dim); margin-top: 2px; }

.short-course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 48px;
}

.short-course-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.short-course-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.55); }

.sc-head { display: flex; align-items: center; gap: 12px; }

.sc-code {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid rgba(226, 152, 60, 0.4);
    border-radius: 3px;
}

.sc-title { font-size: 16px; font-weight: 700; color: var(--paper); }

.sc-curriculum { font-size: 14px; color: var(--muted); line-height: 1.65; }

.sc-audience {
    font-size: 13px;
    color: var(--muted-dim);
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid var(--line);
}

.curriculum-label { font-size: 16px; font-weight: 700; margin-bottom: 20px; color: var(--paper); }

.curriculum { list-style: none; }

.curriculum li {
    display: grid;
    grid-template-columns: 36px 1fr 28px;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    font-size: 17px;
    color: var(--paper);
}

.curriculum li:last-child { border-bottom: 1px solid var(--line); }

.curriculum .c-num { font-family: var(--font-display); color: var(--accent); font-size: 17px; font-weight: 700; }

.education-card {
    background: var(--ink);
    border: 1px solid var(--line);
    padding: 36px;
    border-radius: 8px;
}

.education-card h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.education-card ul { list-style: none; margin-bottom: 28px; }

.education-card ul li {
    font-size: 16px;
    color: var(--muted);
    padding: 8px 0 8px 18px;
    position: relative;
}

.education-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 6px;
    height: 1px;
    background: var(--accent);
}

.education-card .divider { height: 1px; background: var(--line); margin: 24px 0; }

.education-card p { font-size: 16px; margin-bottom: 28px; }

.workshop-note {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

.workshop-note h4 { font-family: var(--font-body); font-size: 18px; font-weight: 700; }

.workshop-note p { font-size: 16px; max-width: 560px; }

/* ---------- Course detail triggers ---------- */
[data-course] { cursor: pointer; transition: background-color 0.2s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; }

.course-row[data-course]:hover, .curriculum li[data-course]:hover { background: rgba(244, 240, 230, 0.035); }

.course-list, .curriculum { margin-left: -12px; margin-right: -12px; }

.course-row, .curriculum li { padding-left: 12px; padding-right: 12px; }

[data-course]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.open-ico {
    align-self: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.3s ease;
}

.open-ico svg { width: 11px; height: 11px; }

[data-course]:hover .open-ico, [data-course]:focus-visible .open-ico {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}

/* ---------- Course dialog ---------- */
html.dialog-open { overflow: hidden; }

.course-dialog {
    width: min(780px, calc(100% - 32px));
    max-width: none;
    max-height: min(88vh, 920px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--paper);
    background: radial-gradient(circle at 92% 0%, rgba(226, 152, 60, 0.17), rgba(226, 152, 60, 0) 46%), var(--ink-2);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
}

.course-dialog[open] { animation: dlgIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.course-dialog.closing { animation: dlgOut 0.2s ease forwards; }
.course-dialog::backdrop { background: rgba(4, 9, 7, 0.74); backdrop-filter: blur(6px); }
.course-dialog[open]::backdrop { animation: fadeIn 0.32s ease; }
.course-dialog.closing::backdrop { animation: fadeOut 0.2s ease forwards; }

@keyframes dlgIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.cd-scroll { max-height: min(88vh, 920px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }

.cd-head { position: relative; padding: 34px 36px 0; }

.cd-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--paper);
    background: rgba(10, 22, 18, 0.6);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cd-close:hover { border-color: var(--accent); color: var(--accent); }

.cd-close svg { width: 14px; height: 14px; }

.cd-kicker { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.cd-code {
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    border-radius: 6px;
}

.cd-group { font-size: 14px; font-weight: 600; color: var(--muted); }

.cd-title { position: relative; font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }

.cd-sub { position: relative; margin-top: 6px; font-size: 16px; color: var(--muted); }

.cd-body { padding: 0 36px 32px; }

.cd-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    margin-top: 24px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cd-meta div { padding: 12px 16px; background: var(--ink); }

.cd-meta dt { font-size: 12px; font-weight: 600; color: var(--muted-dim); }

.cd-meta dd { margin-top: 2px; font-size: 15px; color: var(--paper); }

.cd-lead {
    margin-top: 24px;
    padding-left: 16px;
    font-size: 17px;
    color: var(--paper);
    border-left: 2px solid var(--accent);
}

.cd-h { margin: 30px 0 6px; font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--muted); }

.cd-days { list-style: none; }

.cd-day { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px 0; }

.cd-day + .cd-day { border-top: 1px dashed var(--line); }

.cd-day-label { padding-top: 5px; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent); }

.cd-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cd-chip {
    padding: 6px 13px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--paper);
    background: rgba(244, 240, 230, 0.05);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.cd-chip.deliver { color: var(--accent-light); background: rgba(226, 152, 60, 0.08); border-color: rgba(226, 152, 60, 0.45); }

.cd-outcomes { list-style: none; margin-top: 8px; }

.cd-outcomes li { position: relative; padding: 9px 0 9px 30px; font-size: 16px; color: var(--paper); }

.cd-outcomes li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 15px;
    width: 11px;
    height: 6px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.cd-note { margin-top: 26px; padding: 14px 16px; font-size: 14px; color: var(--muted); background: rgba(244, 240, 230, 0.04); border: 1px solid var(--line); border-radius: 8px; }

.cd-note strong { color: var(--paper); font-weight: 600; }

.cd-foot {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: rgba(15, 31, 25, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.cd-foot .btn { padding: 12px 22px; font-size: 15px; }

.cd-nav { display: flex; gap: 8px; margin-left: auto; }

.cd-nav button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--paper);
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cd-nav button:hover { border-color: var(--accent); color: var(--accent); }

.cd-nav svg { width: 12px; height: 12px; }

@media (max-width: 600px) {
    .course-dialog {
        width: 100%;
        max-height: 92vh;
        margin: auto 0 0;
        border-radius: 16px 16px 0 0;
        border-bottom: 0;
    }
    .course-dialog[open] { animation: sheetIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
    .course-dialog.closing { animation: sheetOut 0.22s ease forwards; }
    .cd-scroll { max-height: 92vh; }
    .cd-head { padding: 28px 22px 0; }
    .cd-body { padding: 0 22px 26px; }
    .cd-foot { padding: 12px 22px; }
    .cd-day { grid-template-columns: 1fr; gap: 8px; }
    .cd-meta { grid-template-columns: 1fr 1fr; }
    .cd-meta div:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .cd-nav button span { display: none; }
}

/* ---------- Case study (reuses the course dialog) ---------- */
[data-case] { cursor: pointer; }

[data-case]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.course-dialog.is-case { width: min(1000px, calc(100% - 32px)); }

.course-dialog.is-case .cd-nav { display: none; }

.cd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 24px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.cd-stats div { padding: 18px 18px 16px; background: var(--ink); }

.cd-stats b {
    display: block;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cd-stats span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }

.cd-p { margin-top: 6px; font-size: 16px; color: var(--muted); }

.cd-fig { margin: 16px 0 0; }

.cd-fig img { width: 100%; height: auto; border-radius: 8px; }

.cd-fig figcaption { margin-top: 8px; font-size: 13px; color: var(--muted-dim); }

.cd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

.case-link { margin-left: 6px; font-size: 14px; font-weight: 600; color: var(--accent); border-bottom: 1px solid currentColor; }

@media (max-width: 600px) {
    .course-dialog.is-case { width: 100%; }
    .cd-stats { grid-template-columns: 1fr 1fr; }
    .cd-stats b { font-size: 1.5rem; }
}

@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }

/* ---------- References ---------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.work-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.work-item:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6); }

.work-media { aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); }

.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }

.work-item:hover .work-media img { transform: scale(1.045); }

.work-body { padding: 24px 26px 28px; }

.work-item h3 { font-family: var(--font-body); font-size: 18px; font-weight: 700; margin-bottom: 10px; }

.work-item p { font-size: 15px; margin-bottom: 14px; }

.work-item.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }

.work-item.featured .work-media { border-bottom: 0; border-right: 1px solid var(--line); }

.work-item.featured .work-body { padding: 44px 44px; align-self: center; }

.work-item.featured h3 { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-bottom: 14px; }

.work-item.featured p { font-size: 16px; margin-bottom: 20px; }

.work-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.metric-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid rgba(226, 152, 60, 0.4);
    padding: 4px 10px;
    border-radius: 2px;
}

.tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    padding: 4px 10px;
    border-radius: 2px;
}

.work-item a.demo-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    margin-left: 6px;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
}

.about-grid h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; margin-bottom: 18px; }

.about-grid > div > p { font-size: 17px; max-width: 540px; }

.about-facts { list-style: none; border-top: 1px solid var(--line); }

.about-facts li {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.about-facts strong { font-size: 13px; color: var(--muted-dim); font-weight: 600; }

.about-facts span { font-size: 16px; color: var(--paper); }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-grid h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; margin-bottom: 18px; }

.contact-grid > div:first-child p { font-size: 17px; max-width: 420px; }

.contact-card {
    background: rgba(15, 31, 25, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid var(--line);
    padding: 36px;
    border-radius: 8px;
}

.contact-card .btn { width: 100%; justify-content: center; margin-bottom: 8px; }

.contact-detail { padding: 16px 0; border-top: 1px solid var(--line); }

.contact-detail:last-child { padding-bottom: 0; }

.contact-detail .label { font-size: 12px; font-weight: 600; color: var(--muted-dim); display: block; margin-bottom: 6px; }

.contact-detail .value { font-size: 15px; color: var(--paper); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 32px 0; }

.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

.footer p { font-size: 14px; color: var(--muted-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .mainnav, .topbar-actions .btn { display: none; }
    .nav-toggle { display: block; }

    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .graph-wrap { margin: 0 auto; }

    .consult-grid { grid-template-columns: 1fr; gap: 32px; }
    .problem { grid-template-columns: 1fr; gap: 10px; }

    .education-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .workshop-note { grid-template-columns: 1fr; gap: 12px; }
    .track-grid { grid-template-columns: 1fr; }
    .short-course-grid { grid-template-columns: repeat(2, 1fr); }
    .work-item.featured { grid-template-columns: 1fr; }
    .work-item.featured .work-media { border-right: 0; border-bottom: 1px solid var(--line); }
    .work-item.featured .work-body { padding: 28px 26px 30px; }
}

@media (max-width: 720px) {
    .work-grid { grid-template-columns: 1fr; }
    .cap-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .stat-strip { grid-template-columns: 1fr; gap: 20px; }
    .short-course-grid { grid-template-columns: 1fr; }
    .section { padding: 72px 0; }
    .mq-item { font-size: 21px; }
    .graph-caption { border-radius: 16px; align-items: flex-start; }
    .graph-query { white-space: normal; font-size: 14px; line-height: 1.5; padding-top: 2px; }
    .work-item.featured h3 { font-size: 23px; }
}

/* ---------- Shared additions for multi-page ---------- */
a.track-card { display: block; color: inherit; text-decoration: none; }

.mainnav a[aria-current="page"] { color: var(--paper); }

.phase-link { margin-left: 6px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }

.edu-teaser .section-head .btn { margin-top: 24px; }

.page-hero .hero-copy { max-width: 780px; }

.page-hero .hero-copy .lede { max-width: 660px; }

.crumb { margin-bottom: 22px; font-size: 14px; color: var(--muted-dim); }

.crumb a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

.crumb a:hover { color: var(--accent); border-color: var(--accent); }

#tracks .track-grid, #regular .course-list, #short .short-course-grid { margin-bottom: 0; }

#advanced .education-grid { margin-top: 0; }
